Skip to content

Bug when create a new admin route with hyphen #25635

Closed
@diegocpires

Description

@diegocpires

Preconditions (*)

  1. Magento version 2.3-develop

Steps to reproduce (*)

  1. Create a new route, with hyphen in frontName. E.g.:
<route id="adminmodule" frontName="-">

    <module name="Contribution_AdminModule" />

</route>
  1. Create a new menu for Admin. E.g.:
    <add
        id="Contribution_AdminModule::new_page"
        title="Treinamento Menu"
        translate="title"
        module="Contribution_AdminModule"
        sortOrder="10"
        parent="Contribution_AdminModule::admin_module"
        action="-/index"
        resource="Contribution_AdminModule::new_page"
       />

Expected result (*)

  1. A new and functional rote, with hyphen in url

Actual result (*)

  1. Got an exception

1 exception(s):
Exception #0 (InvalidArgumentException): Param action doesn't pass validation: '-/index' does not match against pattern '/^[A-Za-z0-9/_]+$/'

Metadata

Metadata

Labels

Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions