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] Ensure container option isn't removed from Asset fields #10054

Closed

Conversation

duncanmcclean
Copy link
Member

In #9685, we made it so default values for fieldtype configs are stripped out of the config array, slimming down blueprint & fieldset YAML files.

However, this change has caused an unintentional side affect.....

  • When your site only has one asset container, the default value on Asset fields will be that of that asset container.
    • This means that no container is saved into the blueprint/fieldset's YAML file.
  • In the future, if you decide to create an additional asset container, because there's no default container to rely on (there's only a default when a single asset container is configured) and no explicit container is set on the fields, you'll see a lot of An asset container has not been configured errors

This can be easily fixed by ensuring the container config option is always saved, so when an additional asset container is created, existing Asset fields use the initial asset container since that's what's been set.

Fixes #10050.

@jasonvarga
Copy link
Member

Thank you but I think there is a bigger issue with how the defaults are being stripped out. I'm trying to resolve it in #10059

@jasonvarga jasonvarga closed this May 13, 2024
@duncanmcclean duncanmcclean deleted the fix/ensure-container-isnt-removed-from-asset-fields branch May 14, 2024 08:03
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.

Adding a second asset container for first time causes error
2 participants