Hi, I installed path_redirect but everytime I tried to add a new redirect from admin/build/path-redirect/add I was, ironically, redirected to the home page.

Looking at code in path_redirect.module I found a weird problem in path_redirect_edit_form():

The fieldset created by:

$form['type'] = array(
    '#type' => 'fieldset',
    '#title' => t('Redirect Type'),
    '#collapsible' => true,
    '#collapsed' => ($edit['type'] == PATH_REDIRECT_DEFAULT_TYPE),
  );

was the cause of the problem.

I just changed the key to 'redir_type' like this:

$form['redir_type'] = array(
    '#type' => 'fieldset',
    '#title' => t('Redirect Type'),
    '#collapsible' => true,
    '#collapsed' => ($edit['type'] == PATH_REDIRECT_DEFAULT_TYPE),
  );

and everything works ok now.

I hope this helps somebody else.

Comments

HorsePunchKid’s picture

Very odd. Do you (or anyone else) happen to have any idea why that would make a difference? If you change it back, does it start sending you back home again? Just to be clear, was it redirecting you when you submitted the new redirect, or when you first went to the page?

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

I've never seen this problem either. Perhaps it is caused by an interaction with another module?

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

More than 2 weeks needing more info...I assume this was some other random bug.