check if field layout element belongs to an enabled plugin #14219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When adding a field layout element to a tab, check if it belongs to a disabled plugin, and if it does - don’t add it as an element.
Scenario:
Commerce plugin is installed, Addresses field layout is adjusted - from that point on, there’s a reference to
UserAddressSettings
(attributecommerceSettings
) in the Address element field layout.If you now disabled the Commerce plugin and try to edit or add an address (e.g. to your account) or try to edit the Address element field layout, you’ll get
Invalid Configuration; Unable to locate message source for category 'commerce'.
error.This PR checks if the layout element belongs to a plugin and only adds it to the layout’s tab if it doesn’t or if the plugin it belongs to is enabled.
Related issues
n/a