This is really strange. Everything worked, and all of a sudden this error shows up:
warning: Invalid argument supplied for foreach() in /home/path/sites/all/modules/colorbox/colorbox.module on line 337.
I did some update on drupal core, emfield and colorbox, today and yesterday, but this error was visible before that (i'm not sure, i didn't check recently :/), because it's indexed on Google :@
I tried to downgrade modules but nothing is changed. And colorbox popup is working, only problem I have is this warning and it's ugly to leave it as it is.
This is the site: http://msp.telekomapp.com/media/gallery/gallery-by-events/rolling-stones...
Does anyone have an idea?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#1 | colorbox_link_alter_999986.patch | 907 bytes | frjo |
Comments
Comment #1
frjo CreditAttribution: frjo commentedYou should not write errors to the screen on a production site, set it to only log instead. Looks better for your users and unnecessary information is not revealed.
Have you tested stuff like clearing the cache etc?
I guess you are using the image module. The line in the error comes from the function colorbox_link_alter() that tries to add a colorbox class to the image link sizes on the image node.
You can also test this patch. It just ads a check to see if $node->images is an array or not.
Comment #2
vojvotkinja CreditAttribution: vojvotkinja commentedHm, I'm kinda newbie so I didn't knew about this option to turn of showing of warning messages, sweet :) I'm a little afraid to apply this patch because client will update modules and then patch will be overwritten, or am I wrong?
Thanks for your help!
Cheers!
Comment #3
frjo CreditAttribution: frjo commentedYes, updating a module will overwrite any changes you may have done to it.
I do not suggest you test the patch on your production site, testing should always be done on a separate testing/development/local site.
If the patch do fix the problem I could consider committing it so it will be part of the next release of the Colorbox module.
Comment #4
frjo CreditAttribution: frjo commentedCommitted to 6-dev.