Skip to content

[6.x] Fix fieldtype picker showing the wrong list after switching blueprint types#14934

Closed
mynetx wants to merge 1 commit into
statamic:6.xfrom
mynetx:fix/fieldtype-picker-form-blueprint-cache
Closed

[6.x] Fix fieldtype picker showing the wrong list after switching blueprint types#14934
mynetx wants to merge 1 commit into
statamic:6.xfrom
mynetx:fix/fieldtype-picker-form-blueprint-cache

Conversation

@mynetx

@mynetx mynetx commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The fieldtype picker caches its list in a module-level ref that isn't keyed on whether you're in a form blueprint. Since the CP is an SPA, whichever picker you open first sticks — navigate from a regular blueprint to a form blueprint (or the other way around) and you get the wrong list until a full page reload.

This keys the cache by mode so each mode fetches and reuses its own list.

Fixes #14903

… types

The picker caches its fieldtype list in a module-level ref shared across the
whole CP session, but the cache wasn't keyed on blueprint mode. Form and regular
blueprints load different lists (forms request `?forms=true`), so whichever
picker opened first stuck until a full page reload. Key the cache by mode so each
mode fetches and reuses its own list.
@duncanmcclean

duncanmcclean commented Jul 4, 2026

Copy link
Copy Markdown
Member

This has already been fixed and merged. See #14919.

BTW: Thanks for all these PRs, much appreciated! 🙌

@mynetx mynetx deleted the fix/fieldtype-picker-form-blueprint-cache branch July 4, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fieldtype picker shows the wrong list after switching between form and regular blueprints (until reload)

2 participants