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

Mismatched field definition for oe_timeline in 2.x branch #501

Closed
donquixote opened this issue Jan 4, 2022 · 0 comments
Closed

Mismatched field definition for oe_timeline in 2.x branch #501

donquixote opened this issue Jan 4, 2022 · 0 comments

Comments

@donquixote
Copy link
Contributor

Follow-up to #500.

Symptoms

After upgrading to Drupal 9 / oe_content 2.x, we have the following error in status report:

The node.oe_timeline field needs to be updated.

Investigation

I found that:

  • 'oe_content' contains a 'oe_content_timeline_field' module.
  • This module defines a field type 'timeline_field', in TimelineFieldItem.
  • It also defines field a storage definition using this field type: field.storage.node.oe_timeline.yml
    This is used by optional node types from optional submodules.
  • In the new version, the schema for the field type changes.
    The new version also has an upgrade hook, oe_content_timeline_field_update_8101(). This attempts to upgrade all existing field storages using this field type.

On our site, the upgrade hook successfully upgraded a field_oe_timeline field for paragraphs, but failed to upgrade the field storage definition for the oe_timeline field on node ct.

The reason: On our site, the field has no field instances, because none of the optional node modules are enabled.

The update hook uses $timeline_fields = $entity_field_manager->getFieldMapByFieldType('timeline_field');, but this misses field storages with no instances.

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

No branches or pull requests

2 participants