[development] Drupal 6 drupal_goto query
John Morahan
john.morahan at gmail.com
Fri Apr 29 13:39:35 UTC 2011
drupal_not_found() sets $_REQUEST['destination'] which overrides
drupal_goto, so you may need to unset it first. See for example
http://api.drupal.org/api/drupal/modules--search--search.module/function/search_box_form_submit/6
On 29 April 2011 07:11, Vaibhav Jain <in.vaibhavjain at gmail.com> wrote:
> I used that Carl, and used the PHP code option. Got the same issue as when
> creating a custom callback.
>
>
> On Fri, Apr 29, 2011 at 11:39 AM, Carl Wiedemann <carl.wiedemann at gmail.com
> > wrote:
>
>> You might consider http://drupal.org/project/customerror
>>
>>
>> On Thu, Apr 28, 2011 at 11:26 PM, Vaibhav Jain <in.vaibhavjain at gmail.com>wrote:
>>
>>> Hello List,
>>>
>>> I am trying to use drupal_goto and not able to use as I would like to.
>>>
>>> I am trying to create a custom callback for 404 pages and redirect them
>>> to homepage.
>>> I know this can be done via drupal default mechanism, but my homepage is
>>> on panels, and have a condition check of drupal_is_front_page, so cannot be
>>> used.
>>> Also the URL does not change when we use default 404 mechanism.
>>>
>>> Now, If I use drupal_goto('HOMEPAGE'), it stucks in a redirection loop,
>>> and it is never redirected to homepage.
>>>
>>> I tried printing the output in common.inc, where this function is
>>> defined.
>>> On the very first line, i do get the correct path, but when it is passed
>>> in header, it changes to current url, and thus stucks in loop.
>>> I also tried using the header function directly and it worked.
>>>
>>> Is this some kind of bug in core, Or am i doing something really silly
>>> which i am not aware of.
>>>
>>> Any help appreciated.
>>>
>>> --
>>> Thanks,
>>> Vaibhav Jain
>>>
>>
>>
>
>
> --
> Regards,
> Vaibhav Jain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110429/49080179/attachment.html
More information about the development
mailing list