Hi,
I've tried making a url redirect with a node reference. I have tried checking/unchecking all of the boxes for "force redirect" and "override path" but neither of them works as desired.
The closest I can come is to have the "override path" checked which gives me this:
http://example.com/?q=node/56&=node/44
Obviously, it is appending the desired url path instead of replacing.
I am using the token [node:field_proposed_change_url-nid] field_proposed_change_url is the name of my reference field which has test [nid:44] filled in from the prepopulate module.
If anyone can help, I'd appreciate it. I'm out of ideas.
Comments
Comment #1
fagothat's strange. Does a "static redirect" like just "node/2" work right?
Comment #2
Ariesto commentedGood trouble-shooting question.
Yes, a static redirect works perfectly in a seperate rule that I use.
However, I cloned the problematic rule and changed the "dynamic" reference address to what it should be, "node/44". Instead of working properly it gave me:
</h3> ?q=node/64&=node/44The only difference in these two rules is that the broken rule has a "Load a Referenced Node" action before the page redirect action. Inside the load a referenced node I have the "content containing the node reference" as "saved content".
The above suggests to me that something is ary in my Load a reference node settings. Below is the log code:
Comment #3
Ariesto commentedThe related group support question is here:
http://groups.drupal.org/node/18982
It outlines the results of a bunch of tests that I ran with the various checkboxes.
Comment #4
fagoDid you test both rules on the same event? Please try a new rule with a static destination target for the same event.
Comment #5
Ariesto commentedMystery Solved. Re-creating the rule showed where I was going astray. My broken rules were using "?=node/[referenced_node:nid]". The difference was that the "?=" was unnecessary. I guess drupal took the "?=" operator as an indication that you wanted to load both the normal address and the override one, resulting in the "&=" append.
I suggest that you either add a simple "if statement" to the rules code that checks for "?=" in the redirect address box, or at the very least make a note on the redirect page that the web address should NOT include "?=" even if clean urls are not enabled.
I will write up a doc on how to make redirects later today.
Thanks for the trouble-shooting support.
Comment #6
Ariesto commentedRough Docs here:
http://drupal.org/node/383138