Closed (fixed)
Project:
Field Redirection
Version:
7.x-1.2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
3 Sep 2011 at 12:16 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcusx commentedAs you can see in the patch (commit comments) I had to change some things to get it working with node reference fields.
The first thing was that I used an autocomplete widget to define my redirect destination which had no matching case in the switch structure.
Than the lookup of the path was always coming back empty from drupal_lookup_path. (If you want to use it instead of drupal_get_path_alias there is still an argument missing.
Finally the link in the admin message missed an "/" on the beginning to make it working and not just putting it on the end of the current page.
Hopefully this helps to make the module better. Thanks for your work.
regards
Marcus
P.S.:
@todo: I think we have to check for other widget names like user_reference_autocomplete as well but I didn't look into this.
Comment #2
damienmckennaThanks for finding those bugs. One small change request - you should not just prefix the path with a slash, it should instead be prefixed by base_path().
Comment #3
marcusx commentedYou are right. Added base_path() to path instead of changing the string in the t() of the message box. Which was a bad idea also as a translation would break.
New version enclosed.
Comment #4
damienmckennaI re-rolled your patch and simplified it a little: I merged the two noderef cases, added a userref case & merged it with the other one, and added the base_path() call within drupal_set_message() rather adding a whole extra variable just for it.
Comment #5
damienmckennaGah, that was the wrong patch.
Comment #6
damienmckennaI've committed this to both the 7.x-1.x and 7.x-2.x branches, thanks!