Installed node_gallery on Drupal 6.14 with default settings. Configured PathAuto node settings as:

Pattern for all Gallery (Node Gallery) paths: set/[title-raw]

Pattern for all Gallery Image (Node Gallery) paths: set/[parent-node-gallery-title-raw]/[title-raw]

I created a couple galleries using an account other than uid=1, worked fine.

Opened galleries and images separately and edited their content; everything worked fine.

Then I added a couple CCK fields and taxonomy vocabularies. I went back to image nodes to update their content with CCK and taxonomy values. After I updated the second image node, I noticed the two gallery image nodes I edited lost their PathAuto URL values PARTLY.

These are the recent URLs of those two gallery image nodes:

http://example.com/set/[parent-node-gallery-title-raw]/snow-blind
http://example.com/set/[parent-node-gallery-title-raw]/navajo-land

The token [parent-node-gallery-title-raw] lost its value "wallpapers" after the CCK and taxonomy updates.

Rest of the nodes still have their URLs correct, since they have not edited yet:
http://example.com/set/wallpapers/fallen-leaf
http://example.com/set/wallpapers/kinderdijk-sunset
...

Comments

osman’s picture

UPDATE:
I gave "create url aliases" and "administer pathauto" permissions to my test user. Opened the gallery image nodes to edit, the "Automatic alias" checkbox in URL path settings was unchecked.

Check the box and saved the node, but it didn't save the form settings or ignored it.

Removed CCK fields and tested. Same results...

Removed taxonomy vocabularies and tested. Same results.

Node is back to its original state, but still not saving the path correctly.

justintime’s picture

@osman,

It's gotta be something in the taxonomy/CCK steps you're doing. Can you redo the steps necessary to reproduce, but do each CCK/taxonomy modification one at a time? If you can narrow it down to one very specific operation with the details included so that we can reproduce the error, then we can hopefully fix the issue for you.

osman’s picture

@justintime, thanks for the quick response.

Unfortunately still having the same problem, even I removed all those custom CCK fields and taxonomy vocabularies from gallery image node type. It is basically reset to defaults.

I am going to delete all node_gallery content and uninstall the module then will re try to reproduce the problem. Hopefully I will fail, and it will work without any problem :-)

I'll post the results here.

osman’s picture

@justintime:
Deleted all the gallery and gallery image nodes. Uninstalled the module and reinstalled it. Set the same PathAuto rules.
Added images and galleries are automatically updated with PathAuto settings.

Until, I started editing gallery images. As soon as I save those images their path transformed into a mix of translated tokens and untranslated token:

http://example.com/set/[parent-node-gallery-title-raw]/snow-blind

Since the pathauto rule is set/[parent-node-gallery-title-raw]/[title-raw] and only the middle part (a node_gallery token) is not translated, I suspect it is the core code of node-gallery then anything else.

Doest this make any sense?

p.s. This time I didn't modify node_gallery node types nor any other node_gallery settings at all.

justintime’s picture

Hmmm, well, there's hope, because I have very much the same config as you, and I can't seem to reproduce it yet ;-)

My Pathauto is set to event/[parent-node-gallery-title-raw]/[title-raw]. Editing images doesn't seem to break it for me. What specifically are you editing on your image nodes?

osman’s picture

Well, unfortunately it happens whether I change anything or not. I tried updating the node without actually changing anything, Edit and save.
I also tried, Edit, change description and save.

Both scenarios ended up with the same mutated URLs.

p.s. Nothing odd in recent log entries either.

dbeall’s picture

stick my nose in here for a second..
@osman, are you editing the image nodes without using the gallery node as the control mechanism..
if so, that may be the problem.. as the gallery node is the control function

osman’s picture

@dbeal, I am editing the content itself, through the normal edit link of the node. I am not talking about altering the module's codebehind or any other PHP editing in anyway. Only the regular Drupal way, through the tab links; view and edit.

All due respect, I am not a novice to Drupal or module development. But frankly this is an odd situation. Apparently, it is not the node creation causing the problem, but re-saving the node make it loose its token(s). In this case, [parent-node-gallery-title-raw] gets ignored on re-save. I need to check if other available tokens are effected too. I'll get back to you on that.

I'll also compare it with DEV version to see if anything has changed in token functions, just curious.

kmonty’s picture

dbeall’s picture

@osman, I was just checking so I could try to reproduce the error.
I had seen the #654870 issue, but have not been able to reproduce the problem.
I haven't had any problem with tokens since this issue #475974: Path auto problems - replacement patterns not working

justintime’s picture

@osman, are you 100% sure you're using alpha11? There's a drupal build bug where it displays alpha9 as the most recent release on the project page. This was a bug present in alpha9 and alpha10. If you're using alpha11, could you give CVS head of the 6.2 branch a shot?

justintime’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Changing to a suppport request and postponing until @osman updates us on his status.

osman’s picture

Hey Justin,
I was off of this project and got busy with others. I didn't have any chance to test it until today.

You might be right, I might been using alpha9, I am not really sure. I updated it to alpha12 before I read your post.

Anyways, alpha12 fixed the problem. It works fine now.

Thank you for your patience.

justintime’s picture

Status: Postponed (maintainer needs more info) » Fixed

Sweet!

Status: Fixed » Closed (fixed)

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