Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
My dblogs are showing many rows of this this error constantly (several times per hour):
Warning: array_key_exists() expects parameter 2 to be array, null given in theme_image_formatter() (line 605 of /path-to-drupal/modules/image/image.field.inc).
The only issue I could find for it was posted for Drupal core -- http://drupal.org/node/1902444 -- but it was quickly dismissed as being a Views issue instead. However, there is no indication how to fix it, and I haven't found any issues in Views about it.
Does anyone know what to do about this?
Comment | File | Size | Author |
---|---|---|---|
#24 | fixed_image_warnings-1959558-24.patch | 625 bytes | kengilb |
| |||
#1 | fixed_image_warnings-1959558-1.patch | 597 bytes | BAHbKA |
Comments
Comment #1
BAHbKA CreditAttribution: BAHbKA commentedHere's a quick patch for this issue.
Comment #2
mikostel CreditAttribution: mikostel commentedThe above patch worked like a charm. Thanks BAHbKA!
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedSetting proper status in the hopes that the right one will get someone to review it.
Comment #5
jfurfey CreditAttribution: jfurfey commentedAny thoughts on whether the patch is safe to use in production sites? I realize it failed testing for official integration....
Comment #6
BAHbKA CreditAttribution: BAHbKA commented#1: fixed_image_warnings-1959558-1.patch queued for re-testing.
Comment #7
davidneedhamThis patch didn't fix the issue for me, but I think it may be a bigger issue than views. I see the exact error described when looking at a view, but none of the images load when viewing a node either. It looks like the src="myfoowebsite.com/" - which obviously isn't going to get too far. Is anyone else seeing that?
Comment #8
milekium CreditAttribution: milekium commentedThis patch didn't fix the issue for me, What I found to be the problem is to have an image fields in the view whose images files are not in the folder (sites/files..) where is suppose they should be; or having and image field linking to no image files. I guess when views try to render the image, which does not exist as a file in the folder but it does exists as a field, generates this error. placing back the images files fix the error.
Comment #9
Summit CreditAttribution: Summit commentedHi,
This patch did remove the error, if something else is wrong this is not related to the patch I think, so please commit.
Greetings, Martijn
Comment #10
RKopacz CreditAttribution: RKopacz commentedI just applied this patch in response to getting the same error. It is still displaying the error. Does anybody have any other ideas?
I was just getting ready to go live with a newly upgraded-from-6 site. A bit of additional info, all was working fine until I upgraded my local dev environment to php 5.3.8. It was in 5.2.x before then. Not sure if that makes a difference.
Comment #11
MaWebDesigns CreditAttribution: MaWebDesigns commentedMaybe I'm just dumb, but I am trying to manually patch this - but I can't find the file: /modules/field/views_handler_field_field.inc anywhere in my site.
I found the modules/field folder - but not the views_handler_field_field.inc file. Any suggestions?
I have to manually do patches due to my server setup (no terminal access, and we are currently looking to change hosting providers).
Thanks in advance.
UPDATE: Never Mind - found it. However, the patch did not fix my issue. The only workaround I had was to specify an image for the product/element that was the cause of the error (i.e. image could not be NULL).
Thanks
Comment #12
davidneedhamHey @MaWebDesigns: it's a common mistake, but patches usually start at the root of the module it's patching. And (rather confusingly) Views contains a folder called "modules". So what you should be looking for is sites/all/modules/views/modules/field/views_handler_field_field.inc. Hope that helps!
Comment #13
MaWebDesigns CreditAttribution: MaWebDesigns commentedThanks Dave, as soon as I posted this - I found the file and updated.
Unfortunately, it still didn't fix the errors.
Comment #14
RKopacz CreditAttribution: RKopacz commentedFor what it's worth, I saw this error after an upgrade from 6 to 7. Also, I found that it goes away when using fields, but appears when using view modes, after the patch is applied.
Comment #15
justkristin CreditAttribution: justkristin commentedPatch didn't fix things for me, either.
Comment #16
justkristin CreditAttribution: justkristin commentedChanging status in hopes that another solution might be searched for...
Comment #17
DHL CreditAttribution: DHL commentedAre you guys have this error message shows at the front end pages ?
For my website, this error message only show at back end configure page.
*I didn't try this patch yet.
Comment #18
Horroshow CreditAttribution: Horroshow commentedThe patch works also with v3.7
Comment #19
suffering drupal CreditAttribution: suffering drupal commentedI didn't have this error at first, then I activated language support for Article type content and it suddenly appeared. On deactivating language support after updating some first Articles from English to Spanish I though it would disappear again. However instead now I have it 7 times on ALL pages AND to see for Anonymous visitors, great!
Since I just have decided to include a Drupal Error & Struggle blog on all websites, you will now be able to follow all my struggles and frustrations on each of the never ever finished (never more than say 60%) Drupal sites, starting with http://visitaramsterdam.info/blog
As you can see there, the above changes were only to find a way out of even an earlier problem. Instead, problems got more and worse.
In fact I just discover that now pictures have disappeared from the carrousel at the bottom...
Anyway, for the short "solution" how can I at least avoid them to appear on visitors pages?
Comment #20
hefox CreditAttribution: hefox commented#920840: Broken images displayed and PHP notices when file/image field values are missing for when this error occurs during entity view
Comment #21
kamenrs CreditAttribution: kamenrs commentedThe patch worked for me perfectly.
Thanks a lot!
Comment #22
ennetws CreditAttribution: ennetws commentedThe patch works, thanks.
Comment #23
mstrelan CreditAttribution: mstrelan commentedComment #24
kengilb CreditAttribution: kengilb at Pac-12 Networks commentedRerolled #1 against 7.x-3.21.
Comment #25
devad CreditAttribution: devad as a volunteer commentedI have applied patch #24 manualy to 7.x-3.24 and it did fix my log errors.
The patch needs reroll though... so not marking it as RTBC.
Comment #26
DamienMcKennaComment #27
DamienMcKennaComment #28
DamienMcKennaCould someone please explain how to reproduce this error? I'd like to add some test coverage to make sure it works correctly and doesn't break again. Thank you.
Comment #29
DamienMcKennaComment #30
2pharelated?
https://www.drupal.org/project/drupal/issues/920840