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

CommentFileSizeAuthor
views_datasource_image_issue.jpg89.14 KBgaiello
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaiello’s picture

I 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

gaiello’s picture

Status: Active » Closed (duplicate)

After 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

jarune’s picture

Project: Views Datasource » Drupal core
Version: 7.x-1.x-dev » 7.14
Component: Code » image system
Status: Closed (duplicate) » Active

The 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.

JoachimF’s picture

Version: 7.14 » 7.22

I'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.

moredhel’s picture

I 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.

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.