I'm getting this Notice even after re-saving the field settings form and display formatter form:
Notice: Undefined index: dispaly_metadata in field_kaltura_field_formatter_view() (line 820 of sites/all/modules/contrib/kaltura/plugins/field_kaltura/field_kaltura.module)
A fix for line 820 is to change:
$settings[$key] = !empty($display['settings'][$key]) ? $display['settings'][$key] : $field['settings'][$key];
to
$settings[$key] = !empty($display['settings'][$key]) ? $display['settings'][$key] : isset($field['settings'][$key]) ? $field['settings'][$key] : null;
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1567302-kaltura-field-view-notice-5.patch | 1.41 KB | klausi |
| #1 | kaltura-1567302-dispaly.patch | 925 bytes | xurizaemon |
Comments
Comment #1
xurizaemonThanks Travis. Looks like a simple typo, though ("dispaly" instead of display).
Could you please back out your current modification and try this patch instead?
I would expect that with the fix posted above, you will find the field settings aren't applied correctly. This may behave a bit better.
Comment #2
travismccauley commentedI had assumed that the typo wasn't the problem since I don't see the 'display_metadata' anywhere else in the codebase and it also wasn't in either of the settings arrays. I'll check again though
Comment #3
xurizaemonTravis - did you need both fixes, or just one of the above?
Comment #4
travismccauley commentedHi - I still need both patches, yes.
I noticed that if I check the display_metadata checkbox, then I don't get the php notices at all (without needing either patch). I've chosen thumbnail only option for the display formatter, so I don't see the metadata even with the checkbox checked. I'm not sure what behavior that checkbox adds but if you check it, it makes the php notices go away.
Comment #5
klausiWhy is this needed?
If display_metadata is set to 0 then the empty check will evaluate to true and we try to load the setting from the field, which seems wrong to me. I think we can remove this loop altogether.
Comment #6
travismccauley commentedHi Klausi, Thanks for the patch. Sorry for the slooooow reply. I've been using my own patch, This seems to solve the problem for me. I'll keep an eye out too and report back any issues.
Thanks again!!
-Travis
Comment #7
Anonymous (not verified) commentedWhy has this patched not been rolled into the latest Dev version? You released an updated version of the module which this patch should have been in over 14 months ago. Your latest dev from September doesn't have it. Please correct this.
Comment #8
khal3dn commentedI have similar issues as below. How to solve it? Any idea? I appreciate your cooperation and understanding in this regard.
Notice: Undefined index: dispaly_metadata in field_kaltura_field_formatter_view() (line 820 of /home3/emslpnet/public_html/deaftube/sites/all/modules/modules/kaltura/plugins/field_kaltura/field_kaltura.module).
Notice: Undefined index: dispaly_metadata in field_kaltura_field_formatter_view() (line 820 of /home3/emslpnet/public_html/deaftube/sites/all/modules/modules/kaltura/plugins/field_kaltura/field_kaltura.module).
Comment #9
pumpkinkid commentedThe patch on #5 resolved these issues for me as well. Please correct this.