I upgraded Drupal to 5.2, then update.php
Then upgraded both img_assist and image to their newest dev shots and ran update.php
Then I updated an article that contained image and BOOM, pathauto-module changed the url completely, like the article I was editing would have been type "image".

Url should have been like /news/666/title, but it was now /image/666
Turning the img_assist off corrects it again, so I guess that's what's causing it. Updating the pathauto module to newer version didn't help either.

Then I tried to check the img_assist_map-problem which was contributed a patch if it really worked, and ran into this:
img_assist_map_save()-function that gets the $node as its parameter. $node is the right one, but for some reason $node->type is image, not the type that the node is for REAL. Every CCK-created type that I try to edit gets updated as "image", not the type they should.

CommentFileSizeAuthor
#2 img_assist-179065-070928.patch752 byteszoo33

Comments

tormu’s picture

So try print_r($node); as the first line in the img_assist_map_save()-function (line 1386) and then try to edit any type of custom node created with the CCK - that's when I get the $node->type to be "image", which of course f0ks things up proper.

zoo33’s picture

Priority: Normal » Critical
Status: Active » Reviewed & tested by the community
StatusFileSize
new752 bytes

Wow, this is a real nasty one.

It's a simple case of confusing '=' with '=='. I think it appeared in #173454, and I can't deny that it was I who wrote it. Sorry!

This patch fixes it.

zoo33’s picture

Status: Reviewed & tested by the community » Fixed

I just committed this. It was such a bad bug and such an easy fix so I thought I shouldn't wait for a review.

Anonymous’s picture

Status: Fixed » Closed (fixed)