Download & Extend

drupal_goto call fails when site uses several languages

Project:DruTeX
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSize
redir.patch470 bytes

Comments

#1

Status:active» needs review

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?

AttachmentSize
342093-drutex-base_url.diff 907 bytes

#2

Assigned to:Anonymous» Steven Jones
Status:needs review» patch (to be ported)

Committed to 6.x-1.x

#3

Assigned to:Steven Jones» Anonymous

#4

Status:patch (to be ported)» closed (fixed)
nobody click here