On a fresh install of D6 and the recommended version of img_assist I get the following error:

notice: Undefined index: #suffix in /path/to/drupal/sites/all/modules/img_assist/img_assist.module on line 158.

patch attached which adds isset($element['suffix']) to line 156

CommentFileSizeAuthor
#2 img_assist.patch733 bytesemmajane
img_assist.patch859 bytesemmajane

Comments

sun’s picture

Status: Active » Needs work

This patch completely disables Image Assist, while the notice is just about PHP complaining on a not yet initialized $element['#suffix'] string we are appending our link/button to. This might be fixed in 2.x already, so if you want to provide a better patch, you might have a look on how it is done in 2.x first.

emmajane’s picture

StatusFileSize
new733 bytes

Argh! Sorry. Trigger happy on that isset. This is actually (another) case of trying to append a non-existant variable with $variable .= $output; I've removed dot before the equals and the WORKING patch is now attached. ;)

sun’s picture

Well. Now you are eliminating/overwriting any previously set #suffix on a form element instead of appending ours... ;)

Again, please have a look at 5.x-2.x, because I'm sure we fixed this PHP notice there already.

emmajane’s picture

I have looked at the 2.x code. I appreciate that things have changed significantly. Could you please change the recommended download to one that doesn't throw errors on a fresh install? That would be completely, fantastic, thanks!!

sun’s picture

Sorry, but no. 2.x has a fixed roadmap and won't be released sooner. See #299686: Image Assist 2.0 for further information.

Either provide patches for 1.x or mark this and the other issue won't fix, please.

sun’s picture

Status: Needs work » Fixed

I just discovered that this has already been fixed in 1.x, but was only available in the development snapshot. Hence, I have created a 6.x-1.0 stable release now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.