statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.7k stars 508 forks source link

Link Fieldtype doesn't work correctly when used in Navigation blueprint #10630

Open fighter3005 opened 4 weeks ago

fighter3005 commented 4 weeks ago

Bug description

When trying to select an entry for the link in the sidebar, the overlay opens and closes instantly.

Bildschirmfoto 2024-08-14 um 12 27 44

How to reproduce

Use a table (grid) for a navigation element and put a field inside that opens and overlay, like linking a collection entry.

Logs

No response

Environment

"php": "^8",
"eminos/statamic-tabs": "v1.2.0",
"laravel/framework": "v11.20.0",
"laravel/tinker": "v2.9.0",
"statamic/cms": "v5.21.0",
"thoughtco/statamic-restrict-fields": "v1.1.0"

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

duncanmcclean commented 4 weeks ago

Can you provide the YAML for the navigation's blueprint? You can find it in resources/blueprints/navigation.

Nevermind, just discovered it happens when you use the Link fieldtype anywhere in a navigation blueprint. It's not specific to using it in the context of a Grid fieldtype.

For future reference: it seems like the initialOption/initialSelectedEntries props are empty when you save a nav item, then re-open it (without a page refresh).