Closed (fixed)
Project:
Node Gallery
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
29 May 2009 at 00:09 UTC
Updated:
23 Oct 2009 at 05:40 UTC
Just installed the 6.x-1.x-dev version from May 14 and when I set up path auto using the following tokens, the tokens show up in the path instead of the desired alias
[parent-node-gallery-path] The path of the parent Gallery.
[parent-node-gallery-path-raw]n Unfiltered path of the parent Gallery. WARNING - raw user input.
[parent-node-gallery-title] The title of the parent Gallery.
[parent-node-gallery-title-raw] Unfiltered title of the parent Gallery. WARNING - raw user input.
Here's a path example
gallery/[parent-node-gallery-path-raw]/p5190348jpg
Comments
Comment #1
dddave commentedCould be a support request but I suspect it to be a bug. ;)
I only manage to get paths like in the example above. Tried various replacements but no success. Is this supposed to work already?
Comment #2
dddave commentedComment #3
dddave commentedBumping priority because this could really affect the usability on a live site.
Has anybody else tested the replacement patterns?
Comment #4
dddave commentedcorrect version
Comment #5
dddave commentedissue still exists
Comment #6
blueminds commentedThe token replacements work fine when images are uploaded into gallery as at that moment $node object caries the gid value. However, when you edit an image through regular node edit form the gid value is not present and therefore the token replacements do not work. Here is a fix that work for me:
Comment #7
dddave commentedWhat do the maintainers think?
Comment #8
dddave commentedLooks like the .dev from 01/07 still has this problem.
Is #6 a good fix?
Comment #9
kmontydddave and anyone else:
Have you tested this patch? Any issues?
Comment #10
kmontyWill commit with more review
Comment #11
kmontyOkay. Using the latest dev branch, I *cannot* verify this issue exists.
Steps taken:
1) Set Gallery pathalias to "gallery/[title-raw]"
2) Set Gallery Image to "[parent-node-gallery-path-raw]/[title-raw]"
3) Created a gallery that resulted in the path "/gallery/sample-gallery"
4) Uploaded four images that resulted in "/gallery/sample-gallery/image#"
5) Deleted the path aliases for the images
6) Went to node/13/edit (a gallery image node), checked "Automatic Alias" and saved.
7) The path alias had returned to "/gallery/sample-gallery/image13"
What is the problem people are having? Can I get exact steps to test?
Comment #12
dddave commentedNo problems on my side - just to dump to use it correctly I suspect. Sorry for the inconvenience.
Comment #13
dbeall commentedusing alpha10... save node, token works.. edit node token is as [token-raw].. delete url alias, bulk generate aliases, the proper path is generated.
edit.. The #6 fix works in alpha 10 for me to
Comment #14
dbeall commentedclarifiy...alpha10
Steps taken:
1) Set Gallery pathalias to "gallery/[title-raw]"
2) Set Gallery Image to "gallery/[parent-node-gallery-path-raw]/[title-raw]"
3) Created a gallery that resulted in the path "/gallery/sample-gallery"
4) Uploaded four images that resulted in "/gallery/sample-gallery/image#"
5) Went to gallery, edit image name or file name (a gallery image node), "Automatic Alias" is checked
6) Save changes
6) The path alias had returned as "/gallery/[parent-node-gallery-path-raw]/image13"
IF
1) goto url alias and delete that alias, then bulk generate node aliases with pathauto, generates proper path.
#6 fixes it.. Live site. Very nice module, I just love it!
Comment #15
dbeall commented@ddave, i did have your original issue at first just after install and set up.. the token didn't work, don't know what made it start working.. It may have been a cron run or cache clear.. that is actually a different issue than path token after editing an image node.. I guess we may have 2 issues going here?? just thought i would speak up so you don't go crazy about it.
Comment #16
dbeall commented@future assassin, @kmonty, @dddave, and others that may be interested...
I just did a new install of 6.x-2.0-alpha10 on live site and the tokens worked just fine right from the start, no hang ups, no problems..
I had patched alpha10 with #6 divamys fix before uploading module. Great module !
Comment #17
dddave commentedAs I stated in #12 I got it working. It was a mistake on my side.
Comment #18
dddave commentedSo this is working fine now for everybody?
Comment #19
kmontyIt should like @dbeall needed to patch the module before it worked. I'll have to look into the suggested code snippet.
Comment #20
kmontyComment #21
kmontyI adapted some of the changes from #6. If anyone was continuing to experience issues, it should be fixed by this commit.