openeuropa / oe_media

OpenEuropa Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oe_media_iframe_post_update_00005() fails if fields missing

donquixote opened this issue · comments

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.

See also #158.