Problem/Motivation

I used the drupal module upgrade for a simple module with a single route. Original Drupal 7 'access calback' is => TRUE:

array(
        'page callback' => 'zip_search_search',
        'type' => MENU_CALLBACK,
        'access callback' => TRUE
    );

The resulting requirements key in routes.yml is like this:

requirements:
    _access: 'true'

In my drupal 9 Project, this is not recognized as supposed. It needs to be:

requirements:
    _access: 'TRUE'

See https://www.drupal.org/docs/drupal-apis/routing-system/structure-of-routes

Steps to reproduce

dmu-upgrade a simple module with a page callback and 'access callback' => TRUE in its hook_menu.

Proposed resolution

Should output

requirements:
    _access: 'TRUE'
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

soerenP created an issue. See original summary.

mohit.bansal623 made their first commit to this issue’s fork.

joseph.olstad’s picture

  • joseph.olstad committed a05fd3c on 8.x-1.x
    Issue #3238725 by mohit.bansal623, soerenP, joseph.olstad: _access key '...
joseph.olstad’s picture

Status: Active » Fixed

this "should" be fixed now with this change, knock on wood.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.