I have been researching a puzzling condition where empty media files, such as an image field, generate the following notices. The issue only shows up if view_datasource is enabled.
Notice: Undefined index: title in theme_image_formatter() (line 616 of /home/ftmedia/public_html/modules/image/image.field.inc).
Notice: Undefined index: alt in theme_image_formatter() (line 603 of /home/ftmedia/public_html/modules/image/image.field.inc).
Notice: Undefined index: uri in theme_image_formatter() (line 602 of /home/ftmedia/public_html/modules/image/image.field.inc).
Additional issues or symptoms:
- the field attempts to be displayed even though it is empty (see attached image)
- default images (in the case of an image field) are ignored
Not being sure if the issue exposed with views_datasource was a cause or symptom, I built a separate dev site that only has the following contributed modules enabled:
- ctools
- views
- views_datasource
I created only 1 node, a test node with an empty image field.
The attached image (using Google Chrome) illustrates the problem.
I have enabled the views modules but have not created any views.
Drupal: 7.14
views: 7.x-3.3
views_datasource: 7.x-1.x-dev (2012-Jun-04)
Thank you in advance for any direction with this issue.
-George Aiello
Comment | File | Size | Author |
---|---|---|---|
views_datasource_image_issue.jpg | 89.14 KB | gaiello |
Comments
Comment #1
gaiello CreditAttribution: gaiello commentedI neglected to mention that this issue showed up (for me) on June 6 when I updated to the latest dev version. I did not experience the issue before then.
-George Aiello
Comment #2
gaiello CreditAttribution: gaiello commentedAfter a more close reading of node/1613310 I believe this issue is a duplicate of that. So, I am changing the status of this to closed.
Sorry for the duplication.
-George Aiello
Comment #3
jarune CreditAttribution: jarune commentedThe same notices also appear when previewing a node before creating one, in this case the image is also broken.
I am not using views_datasource so it's not related to it.
Comment #4
JoachimF CreditAttribution: JoachimF commentedI'm also not using Views Datasource. Getting the following message:
Notice: Undefined index: uri in theme_image_formatter() (line 602
All images are displaying as intended.
Comment #5
moredhel CreditAttribution: moredhel commentedI have the same error and all images seem to display properly, however as far as I can figure out it means there is an image which is broken or sort of broken, the trick is finding out which one.
Resizing them before uploading seems to help for me, although I don't look forward to resizing all pictures nor do I want to resize all of them because some are full size for a reason.