After i click Add Image text/icon popup appears correctly, but main page goes to mypage/img_assist/load/textarea?textarea=body, which is blank page.

Also, after i upload image i get "Image ID not found"

both bugs showed up after upgrading to 5.x-1.0, on drupal 5.1

see screen - it is after clicking add image and uploading one in popup.

CommentFileSizeAuthor
imgassist_bug.jpg44.15 KBpalik

Comments

tormu’s picture

Title: main page goes to blank when clicking add image » "Image ID not found" + main page goes to blank when clicking add image

Yep, I just stumbled over upon the same problem with the image ID.
1. I click the add image icon
2. I click upload to add a new image, then browse for an image and enter the title and press submit
3. It should show the image details so I can select the size and align and enter description, but instead of that it shows the error msg "Image ID not found".

The image does get uploaded though, and I can add images that are already uploaded, but adding a new one doesn't go through. It may have something to do with permissions maybe, because it did work yesterday allright - definately something that needs to be looked on, because I'm logged in as the user 1 now and still the same.

tormu’s picture

line 715 on the img_assist.module prints the error, $output = t('Image ID not found'), in case the $nid = arg(2) isn't numeric. When I just change the error output to $output = t("Image ID not found - $nid") it prints "Image ID not found - ".

When adding an existing image to an article, the arg(0) . "/" . arg(1) . "/" . arg(2) . "/" . arg(3); returns "img_assist/properties/xx/", but when uploading a new one the same prints out "img_assist/properties//" :L

zoo33’s picture

Status: Active » Fixed

Sorry, I did some quick changes right before the 5.x-1.0 release and made a couple of stupid mistakes. I just committed a fix, so the dev release should be updated within a few hours. Will make a new release soon.

Thanks four your detailed reports!

palik’s picture

Status: Fixed » Active

ok dev release fixed missing ID problem, but not "main page goes to blank when clicking add image" problem... please read my first post for details.

palik’s picture

oops, i think just found what's the problem - page reload is appearing ONLY on firefox (which has just been updated... ), i uploaded old dev version of the module and problem did not dissapeared, so i tried IE instead - it works! Opera - works. FF - can't add image :(

Maybe somebody who knows js bit more could look into this, why ff goes to href="..." after clicking link and IE/Opera doesn't?

tormu’s picture

Title: "Image ID not found" + main page goes to blank when clicking add image » main page goes to blank when clicking add image

Just changing the title as the image ID problem seems to be solved - thanks :)

zoo33’s picture

Sorry, I can't reproduce your problem. Using current dev version of img_assist and Firefox 2.0.0.3 the Add image link provided by the module works fine. It opens the popup window but the main window remains unchanged.

Are you using img_assist's Add image link or have you created your own? The behavior you're describing sounds like what would happen if the return false part was missing.

This is what it should look like:

<a id="img_assist-link-edit-body" class="img_assist-link" onclick="window.open(this.href, 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no'); return false" href="/img_assist/load/textarea?textarea=body" title="Click here to add images">Add image</a>
palik’s picture

hah, i've got that bug!

the winner is module doubleclick.module - i created test user and saw that he can add images without problem, so i started granting access to 'admin' modules for him, and afteg granting access to doubleclick - problem showed up!

so - is there any hope to find where is the problem? i really like doubleclick :)

god bless my coffe provider for this, i was starting to lose any hope :D

zoo33’s picture

Congratulations! :)
This is probably some kind of javascript conflict between the two modules as they both do javascript stuff with links. Try the Firebug extension for Firefox, that might show some interesting error messages...

zoo33’s picture

Title: main page goes to blank when clicking add image » "Image ID not found" + main page goes to blank when clicking add image
Status: Active » Fixed

I'm setting this to fixed as the first bug isn't related to this module and the other one is just that: fixed. Please file a bug report against doubleclick instead, about the way it's breaking innocent helpless links.

Anonymous’s picture

Status: Fixed » Closed (fixed)