drupal_goto call fails when site uses several languages
jseffel - December 3, 2008 - 13:18
| Project: | DruTeX |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Steven Jones |
| Status: | patch (to be ported) |
Description
When a user clicks the "Generate PDF/Latex" links he/she will see a 404 if the site uses language prefixes in the URL (http://foo.bar//node/100) because Drutex uses the drupal_goto() call which only should be used for drupal-pages.
I made a quick hack just to make it work on out site.
| Attachment | Size |
|---|---|
| redir.patch | 470 bytes |

#1
I think drupal_goto() is still the preferred function call - if you look at the function, it ends up calling header(), but should be safer and allows other modules to react to the redirect. None of the modules in the core (and none of the 30+ contrib that I use) call header directly. I think the real issue is in the use of $base_url. The following patch works for me, can you see if it solves the problem for you?
#2
Committed to 6.x-1.x