Skip to content

Child page parent hook not found if page name has accents #770

Description

@jlambe
  • Themosis Version: 2.0.5
  • WordPress Version: 5.3.3
  • PHP Version: 7.3

Description

When creating two custom pages with a single / route. If you set the second page as the child of the first page and that your parent page has special/accent characters like é | è | à | ä | and more, the child page hook is not found and its default route is not reachable and displayed.

Steps to reproduce

$meetingPage = Page::make('parent', __('Réunions', APP_TD))
    ->setCapability('edit_posts')
    ->setIcon('dashicons-groups')
    ->setPosition(22)
    ->set();

$meetingPage->route('/', 'App\\Http\\Controllers\\Admin\\Meetings\\MeetingsController@index');

$createPage = Page::make('child', __('Ajouter', APP_TD))
    ->setCapability('edit_posts')
    ->setParent('parent')
    ->set();

$createPage->route('/', 'App\\Http\\Controllers\\Admin\\Meetings\\CreateMeetingController@index');

The $createPage home route is not reached.

Expected behavior

The home route for the child page should be triggered and show its content.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions