I just installed this module for the first time and received this error: Call to undefined function _image_get_sizes() .. line 140 when I visit admin/settings/image_watermark.
The included README.txt suggests this module does not depend on Drupal image module:

This module requires no patches to Drupal nor image module.

but an issue queue for another module reports the same error against the drupal image module.

CommentFileSizeAuthor
#3 watermark.imageapi.patch643 bytestexas-bronius

Comments

drewish’s picture

an earlier update to the image module changed the name of the function and results it returns. this module will need to be updated for it.

texas-bronius’s picture

Is that to say then that watermark also requires the image module (contrary to docs)?

texas-bronius’s picture

Assigned: Unassigned » texas-bronius
Status: Active » Reviewed & tested by the community
StatusFileSize
new643 bytes

Somewhere I thought I read that modules aren't technically supposed to ride on image.module api functions. Due to the abundance of images that do, however, it looks like image.module has been updated to include a pass-thru on the deprecated function name.

Be that as it may, here is a patch to just strip the leading "_" off the function call to _image_get_sizes in watermark.module:140.

In terms of the way things work here, I assigned myself the task, but I'm not the one doing the review/commit. Is this still the right thing to do?

schnizZzla’s picture

1. "This module requires no patches to Drupal nor image module."
This sentence is easily misunderstood. It means: "This module requires no patches to Drupal nor PATCHES to image module."

2. Sending a patch, changing the status to "ready to be commited" but asking questions might be a little bit confusing. If the patch is tested and working correctly, please ask the maintainer to commit it. A follow up is sufficient.

3. Assigning an issue: If I understand that right, this is showing others that you are going to care for that problem.

texas-bronius’s picture

Assigned: texas-bronius » Unassigned
Status: Reviewed & tested by the community » Needs review

ok good call.. thanks for the clarification.
So if I were just feeling ueber-confident, could I technically commit to .dev via cvs (if I had that set up), or is that entirely locked down to just the module maintainers?

Pushkar Gaikwad’s picture

Guys I am having exact same problem. I have already changed the function name as well as have installed image module. I have tried all the combinations but still it is giving me same error Fatal error: Call to undefined function: _image_get_sizes() in /home/myname/public_html/sites/all/modules/watermark/watermark.module on line 140 () OR Fatal error: Call to undefined function: image_get_sizes() in /home/myname/public_html/sites/all/modules/watermark/watermark.module on line 140 depending on the edited function name.

WHat is going wrong ? I am using 5.x drupal and module version.

Pushkar Gaikwad’s picture

Sorry, got double posted due to internet problem

EdinburghRob’s picture

poseidon123, do you have this module installed:
http://drupal.org/project/image

I was getting the same error, because I was confusing the Image module withe CCK Image field type (which is listed in admin/build/modules as 'Image')

asanchez75’s picture

you should have installed before the image module.
Regards,
Adam