Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Fix linking to addon fields #10324

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

edalzell
Copy link
Contributor

In our site builder, we have field sets that link to other fieldset fields:

  -
    handle: image_asset
    field: 'simple::image_asset.image_asset'

When you try to load a blueprint containing this, you get an error :

ErrorException: Undefined array key "type"

/Users/erin/Development/cms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:256
/Users/erin/Development/cms/src/Fields/FieldTransformer.php:152
/Users/erin/Development/cms/src/Fields/FieldTransformer.php:128

This is because Statamic's Arr helper class is used and it converts :'s to '.' so you get simple..image_asset.image_asset as the key, which isn't found.

@edalzell edalzell changed the title Support linking to addon fields [5.x] Support linking to addon fields Jun 18, 2024
@edalzell
Copy link
Contributor Author

Not sure why the linting failed, it's not code I changed.

@jasonvarga jasonvarga changed the title [5.x] Support linking to addon fields [5.x] Fix linking to addon fields Jun 19, 2024
@jasonvarga jasonvarga merged commit 08a4c61 into statamic:5.x Jun 20, 2024
17 checks passed
@edalzell edalzell deleted the fix/imported-addon-fields branch June 26, 2024 17:54
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