Skip to content

[6.x] Hide Assets fieldtype's "Restrict to Folder" toggle when using a dynamic folder - #15635

Merged
jasonvarga merged 1 commit into
6.xfrom
fix/assets-restrict-toggle-dynamic-folder
Oct 16, 2026
Merged

jasonvarga merged 1 commit into
6.xfrom
fix/assets-restrict-toggle-dynamic-folder

Conversation

@joshuablum

Copy link
Copy Markdown
Member

Someone reached out via support because their Assets field wouldn't let them navigate outside its dynamic folder, even though "Restrict to Folder" was turned off.

Restricting navigation is intended: since #10808, a dynamic folder always restricts navigation and the restrict setting is ignored. The toggle was supposed to be hidden in that case, but its condition was 'dynamic' => 'not true'. dynamic is a select (id, slug, author), never true, so the condition always passed and the toggle stayed visible despite having no effect.

This PR changes the condition to 'dynamic' => 'empty', so the toggle only shows when no dynamic folder is set.

This is only a visual change. Existing restrict values stay in the blueprint YAML, and nothing reads them while a dynamic folder is set.

🤖 Generated with Claude Code

The `dynamic` option is a select (id, slug, author), so the `not true`
condition always passed and the toggle stayed visible, even though a
dynamic folder always restricts navigation regardless of its value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit 91da003 into 6.x Oct 16, 2026
65 checks passed
@jasonvarga
jasonvarga deleted the fix/assets-restrict-toggle-dynamic-folder branch October 16, 2026 15:35
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.

2 participants