You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a custom field (e.g. video) of a FieldtypeFile/Image (gallery) $page is a reference to a dummy page created on the fly to get the field’s value stored in the db (not in the field_video table as one might expect but in the field_gallery one, with each value saved in a json in the filedata column).
So because $page is different between ___wakeupValue() and ___formatValue() it results in _oembedObj returning null.
I created a PR that solves this issue by using the same dummy page per file but unless Ryan approves / merges it this issue remains.
Another way to go is to make changes to your files but it's clearly not the best as it would result in unnecessary calls to get the oembed data (since it's there in the db):
Hi,
There is an issue when using your module as a custom field for a FieldtypeFile/Image due to the way you are caching the oembed object.
In a custom field (e.g.
video
) of a FieldtypeFile/Image (gallery
)$page
is a reference to a dummy page created on the fly to get the field’s value stored in the db (not in thefield_video
table as one might expect but in thefield_gallery
one, with each value saved in a json in thefiledata
column).So because
$page
is different between___wakeupValue()
and___formatValue()
it results in_oembedObj
returningnull
.I created a PR that solves this issue by using the same dummy page per file but unless Ryan approves / merges it this issue remains.
Another way to go is to make changes to your files but it's clearly not the best as it would result in unnecessary calls to get the oembed data (since it's there in the db):
In
FieldtypeOembed.module
, replace line 150 with:And in
InputfieldOembed.module
, replace line 43 with:The text was updated successfully, but these errors were encountered: