Problem/Motivation
After updating from WxT 5.6.1 to 6.3.0, the following message appears in the page footer:
InvalidArgumentException: Field field_link_provider is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 630 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
This error message is triggered in wxt_bootstrap_preprocess_paragraph() due to this line:
$field_definition = $variables['paragraph']->getFieldDefinition('field_link_provider');
I note that field_link_provider exists in WxT 6.3.0 on config/optional. There is no mention of it in WxT 5.6.1.
Proposed resolution
There should be a guard in wxt_bootstrap that checks for field_link_provider before calling ::getFieldDefinition().
Perhaps there should also be an update hook to create field_link_provider.
Remaining tasks
Confirm the correct solution. Implement.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | wxt_bootstrap-missing_field_link_provider-3626039-4.patch | 1.1 KB | liam morland |
Comments
Comment #2
liam morlandA potential fix is here:
https://github.com/drupalwxt/wxt_bootstrap/pull/40
Comment #3
liam morlandComment #4
liam morlandThis patch is the contents of the pull request mentioned in #2.