Enter an internal Drupal path or path alias to redirect (e.g. node/123 or taxonomy/term/123). Fragment anchors (e.g. #anchor) are not allowed.

The description (above) on the "From" field (redirect source) on the "Add Redirect" form implies that the path needs to exist internally. This can be confusing for a user if they're trying to enter redirects after, say, a site migration from their old urls. I propose the following change to the description:

Enter a path to redirect. The path can be an internal Drupal path or path alias (e.g. node/123 or taxonomy/term/123), or a non-existent path (e.g. an old url after a site migration).
Fragment anchors (e.g. #anchor) are not allowed.

Patch is attached.

CommentFileSizeAuthor
redirect-source_description-0.patch1.13 KBdrclaw

Comments

drclaw created an issue. See original summary.

chris matthews’s picture

Status: Needs review » Needs work

This patch is over 2 years old and does not apply to the latest 7.x-1.x-dev so it will of course need to be reworked.

Checking patch redirect.admin.inc...
error: while searching for:
  $form['source'] = array(
    '#type' => 'textfield',
    '#title' => t('From'),
    '#description' => t("Enter an internal Drupal path or path alias to redirect (e.g. %example1 or %example2). Fragment anchors (e.g. %anchor) are <strong>not</strong> allowed.", array('%example1' => 'node/123', '%example2' => 'taxonomy/term/123', '%anchor' => '#anchor')),
    '#maxlength' => 560,
    '#default_value' => $redirect->rid || $redirect->source ? redirect_url($redirect->source, $redirect->source_options + array('alter' => FALSE)) : '',
    '#required' => TRUE,

error: patch failed: redirect.admin.inc:350
error: redirect.admin.inc: patch does not apply
wylbur’s picture

Status: Needs work » Closed (outdated)

Closing this as Outdated as Drupal 7 is EOL.