Problem/Motivation

Working on #1255092: Return "/" instead of the internal path when asked for the URL of the frontpage, I found that by setting a path with parameters as front page makes PathMatcher::isFrontPage() to fail. It seems that path condition checker relies on it.

Steps to reproduce

In a fresh Drupal 10.2 installation (standard profile):

  1. go to Configuration -> Basic site settings
  2. change the default front page to "/node?a=1"
  3. go to Structure -> Block layout and click on configure the "Powered by Drupal" block in the Footer Bottom region
  4. in the Visibility settings, restrict it to be hide in the front page by adding "" to Pages text area and selecting "Hide for the listed pages". Save the block
  5. go back to the site front page. The "Powered by Drupal" is displayed and it shouldn't

Proposed resolution

I think is that the main question here is, should query parameters not being permitted in front, 403 and 404 page paths? In such case it should be documented and some sort of validation being added. Otherwise, query parameters should be fully supported for them.

I found that the front page inbound path processor is aware of query parameters usage in the front page site settings.

Remaining tasks

TBD.

User interface changes

TBD.

API changes

N/A

Data model changes

N/A

Release notes snippet

TBD.

Comments

manuel.adan created an issue. See original summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.