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

oe_media_iframe_post_update_00005() fails if fields missing #182

Open
donquixote opened this issue Dec 12, 2021 · 1 comment
Open

oe_media_iframe_post_update_00005() fails if fields missing #182

donquixote opened this issue Dec 12, 2021 · 1 comment

Comments

@donquixote
Copy link

donquixote commented Dec 12, 2021

During updb:

[error] Attempt to create a field oe_media_iframe_thumbnail that does not exist on entity type media.
[error] Update failed: oe_media_iframe_post_update_00005

The reason: function oe_media_iframe_post_update_00005() assumes that field storage definitions exist for oe_media_iframe, oe_media_iframe_ratio, oe_media_iframe_thumbnail.

If one of those is missing, the update hook will fail.
It could easily be the case that on some projects, developers intentionally removed some of those fields.
(I have not really studied why, I took this project from somebody else)

The title of the update hook is "Create Iframe media fields.", which is a bit weird because these fields do exist in prior versions. So either this hook is meant to change existing field configurations, or it is meant to restore field definitions that were removed.

Either way, if the field instance (field.field.*) is missing, it is likely that the field base (field.storage.*) is also missing.

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

1 participant