Backdrop 1.19.0 provides a new mechanism for redirecting deprecated menu paths.

When renaming a menu path, modules should provide a redirect from the old path to a new one. This occurred frequently in Backdrop core when changing various paths that contain the word "edit" to "configure":

In Backdrop versions prior to 1.19.0, the backdrop_goto_deprecated() function was used directly as a page callback in hook_menu() implementation functions.

In Backdrop versions 1.18 and lower:

  $items['admin/settings/media'] = array(
    'page callback' => 'backdrop_goto_deprecated',
    'page arguments' => array('admin/config/media'),
    'access arguments' => array('administer image styles'),
    'type' => MENU_CALLBACK,
  );

Backdrop 1.19.0 introduced system_redirect_deprecated_page(), which should be used instead when doing redirects of deprecated menu paths. It improves upon backdrop_goto_deprecated() by also supporting menu placeholders.

In Backdrop versions 1.19.0 and higher:

  // It can do normal redirects as before:
  $items['admin/settings/media'] = array(
    'page callback' => 'backdrop_goto_deprecated',
    'page arguments' => array('admin/config/media'),
    'access arguments' => array('administer image styles'),
    'type' => MENU_CALLBACK,
  );

  // But also handle redirects containing placeholders:
  $items['admin/config/media/image-styles/edit/%image_style'] = array(
    'page callback' => 'system_redirect_deprecated_page',
    'page arguments' => array('admin/config/media/image-styles/configure/%image_style'),
    'access arguments' => array('administer image styles'),
    'type' => MENU_CALLBACK,
  );

This is particularly applicable in the core renaming of "edit" to "configure" for several core menu paths, including menus, image styles, content types, vocabularies, and more. Backdrop uses the word "configure" when modifying configuration files, and the word "edit" when modifying content stored in the database. This resulted in several large renamings of menu paths compared with earlier versions of Backdrop and Drupal 7.

Introduced in branch: 
1.x
Introduced in version: 
1.19.0
Impacts: 
Module developers