Discussion about reloading issue when clicking on mixed reference links in Sanity Studio
13 replies
Last updated: Apr 27, 2021
F
Here's something I just noticed (still on v.2.8.1): when clicking on š from an array field consisting of multiple (mixed) reference types, the whole studio app is being reloaded completely (Connecting to Sanity ...) whereas clicking on such a link from non-mixed references the app goes there gracefully as expected. The link icon is shown differently too: it's smaller for the directly linked references.
Apr 27, 2021, 12:49 PM
F
It appears that the untyped links perform a lookup of the type (mapping the _id to the correct _type), then perform a redirect to the edit page. Because it fully reloads the app, it feels a bit abrupt.
Apr 27, 2021, 12:51 PM
P
There was a regression where it was temporarily possible to reference draft documents, which would give these link issues. Could you try upgrading to the latest version of the studio and check if any refs to drafts exist? If so, it'd be good to correct them.
Apr 27, 2021, 1:20 PM
F
I don't think this is it, I am not referencing any drafts.
Apr 27, 2021, 1:53 PM
P
Could you share how you've implemented the mixed reference field? Also, is it using any custom components?
Apr 27, 2021, 2:05 PM
F
The link href is: - compared to for non-mixed (and honestly, non-array type). As you can see, the type is already set here.
/intent/edit/id=89f42315-a5f8-4e58-83cc-c9f24c0386d7/
/intent/edit/id=7c191231-3dae-4c88-8126-24f696f85437;type=propertyType/
Apr 27, 2021, 2:10 PM
P
That's correct - intent links need a type indeed, so that would explain the reloading at least š I've seen the same behaviour on a project that was on a lower version, where it disappeared after an upgrade. Did you try upgrading to
v2.9.1to see if it resolves the issue?
Apr 27, 2021, 2:13 PM
P
That's correct - intent links need a type indeed, so that would explain the reloading at least š I've seen the same behaviour on a project that was on a lower version, where it disappeared after an upgrade. Did you try upgrading to
v2.9.1to see if it resolves the issue?
Apr 27, 2021, 2:13 PM
F
I will try to upgrade now
Apr 27, 2021, 2:13 PM
F
user M
that worked! I should have upgraded sooner, but I thought to hold off seeing some other regressions popping up here.Apr 27, 2021, 2:17 PM
F
Even the š icons are nice and consistent now! Thanks!
Apr 27, 2021, 2:18 PM
P
Apologies for the regression - we had an unforeseen issue with the search update that we had to revert as a result. We're working on a fix, but the latest version is stable as far as I've seen š
Indeed they are! The components team migrated reference inputs to Sanity UI
āØ
Indeed they are! The components team migrated reference inputs to Sanity UI
āØ
Apr 27, 2021, 2:19 PM
P
Apologies for the regression - we had an unforeseen issue with the search update that we had to revert as a result. We're working on a fix, but the latest version is stable as far as I've seen š
Indeed they are! The components team migrated reference inputs to Sanity UI
āØ
Indeed they are! The components team migrated reference inputs to Sanity UI
āØ
Apr 27, 2021, 2:19 PM
F
user M
any thoughts on https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1619508740496800 ?Apr 27, 2021, 2:20 PM
Sanityā build remarkable experiences at scale
Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.