I am using Display Suite to control search results pages, and I switched the format of the YouTube field from using the actual video to use the thumbnail (like I have done before in Views and Display Suite and it works fine) but for this one, it breaks. Here is the error I get:
Notice: Undefined index: youtube_autoplay in youtube_field_formatter_settings_summary() (line 291 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_showinfo in youtube_field_formatter_settings_summary() (line 292 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_controls in youtube_field_formatter_settings_summary() (line 293 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_autohide in youtube_field_formatter_settings_summary() (line 294 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_iv_load_policy in youtube_field_formatter_settings_summary() (line 295 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_autoplay in youtube_field_formatter_settings_summary() (line 291 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_showinfo in youtube_field_formatter_settings_summary() (line 292 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_controls in youtube_field_formatter_settings_summary() (line 293 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_autohide in youtube_field_formatter_settings_summary() (line 294 of /sites/all/modules/youtube/youtube.module).
Notice: Undefined index: youtube_iv_load_policy in youtube_field_formatter_settings_summary() (line 295 of /sites/all/modules/youtube/youtube.module).
So I looked at that code, it looks like it is trying to make an array of the settings for the format, and since it is a thumbnail and not video, those settings don't exist.
$settings = $display['settings'];
$parameters = array(
$settings['youtube_autoplay'],
$settings['youtube_showinfo'],
$settings['youtube_controls'],
$settings['youtube_autohide'],
$settings['youtube_iv_load_policy'],
I tried deleting this search results view in Display Suite and starting over from scratch, but no luck. If I switch back to Video and save it, the error goes away. But then it comes back when I switch back to thumbnail. So it seems like we need some logic / error handling around there but I am not sure how to do that.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | youtube-display-setting-errors-2187393-2.patch | 1.15 KB | guschilds |
Comments
Comment #1
jmac99999 commentedAlso, forgot to mention, the search results page / view still loads on the front end. The error only shows up when trying to edit that view in Display Suite.
Comment #2
guschilds commentedHi skurkee,
Thanks for bringing this to our attention.
Looking back at the code, it was a silly mistake. It has been fixed in the attached patch.
Please test it and let us know if it fixes the bug for you. We can then get it committed.
Thanks again,
Gus
Comment #3
jmac99999 commentedHi Gus,
Thanks for the patch, that fixed the issue. I appreciate it very much!
Comment #4
jmac99999 commentedThe supplied patch fixed the issue.
Comment #5
guschilds commentedAfter having positive results when testing a patch, please mark the issue as RTBC.
We can then close the issue once that patch is committed into the module.
Thanks for testing it and letting us know!
Comment #6
guschilds commentedThe fix has been committed into 7.x-1.x (commit). Thanks again.
Comment #7
jmac99999 commentedSorry, I thought I just needed to mark it as closed. First time on here... Thanks again.
Comment #8
guschilds commentedNot a problem. I often have to reference this guide to remember when/how to change the status.