If you have a link to a redirect that is then translated, language path checking breaks. Example:
I create a page at /about-us.
I create a link from the home page to /about-us.
I update the node to use /company/about-us which creates a redirect from /about-us to /company/about-us.
I translate the site using content translation and path prefixes.
A translated version of /company/about-us becomes /es/empresa/sobre-nosotros.
My translated link on the translated homepage tries to go to /es/about-us and 404s even with the global redirect language path checking enabled.
It needs to follow the redirect in english from /es/about-us to /es/company/about-us, then the global redirect language path checking can take it from there.
I have a patch for this that I will post.
Comment | File | Size | Author |
---|---|---|---|
#6 | globalredirect-n2786639-6.patch | 5.77 KB | DamienMcKenna |
| |||
#6 | globalredirect-n2786639-6.interdiff.txt | 2.28 KB | DamienMcKenna |
Comments
Comment #2
tnathanjames CreditAttribution: tnathanjames at Mediacurrent commentedHere's the patch.
Comment #3
j4 CreditAttribution: j4 commentedHi I get this error when i attempt to use the patch:
Fatal error: Call to undefined function redirect_load_by_source() in C:\Users\Jaya\Sites1\devdesktop\ashoka-global-redesign\sites\all\modules\globalredirect\globalredirect.module on line 149
Thanks!
Jaya
Comment #4
tnathanjames CreditAttribution: tnathanjames at Mediacurrent commentedMy patch doesn't check for the redirect module before using a function from it. That should be added to the patch. Enabling the redirect module should make the error go away after applying this patch.
Comment #5
Chris Matthews CreditAttribution: Chris Matthews commentedComment #6
DamienMcKennaReworked so that piece of logic is only triggered when the Redirect module is installed.
I guess ideally that would be handled via a hook or something..