I am using the imagefield module, but (for better or worse) chose the node type to be called 'image'.

This apparently causes a problem when the exif module tries to find the image's path, as if the node type is 'image', it apparently assumes the image module interface:

function _exif_get_image_path($fields, &$node) {
  if ($node->type == 'image') {
    return $node->images[IMAGE_ORIGINAL];
  }
...

Whereas, my node type is not from the image module, but an image field, which should use the subsequent code to determine the image's path.

I'm not sure of a way to determine if the node type is an Image module 'image' or some otherwise similarly named node type.

In my case, the image module is not even installed- perhaps only if this module is installed/active, the special node handling could be used?

Comments

cglusky’s picture

Hi Robert,
From the Exif Readme:

IMPORTANT: If you are using imagefield, do not call the content type "image"!!! Image
is reserved for using the Image module. If you call your content type image and you are
using imagefield, the module is not going to work.

I would suggest a couple things for the module maintainers:
1) Expand the info on the project homepage to include info from Readme. It was not clear to me that your module supported ImageField until I read the Readme.
2) You might be able to add a check with module_exists('image') in the function that Robert references to help avoid namespace issues. A bit more defensive I guess.

R,
C

robert.oconnell’s picture

Hmm, the version of Exif I am using (6.x-1.2) does not contain any admonishment the like of which you posted.
This appears to have been something that broke from my upgrade of 6.x-1.x-dev to 6.2-1.2, with a new validation/condition that was added.
What version do you see that warning in?

cglusky’s picture

using the latest -dev

it's in the readme there.

jphautin’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)