Review main Merged

70640[BUGFIX] Resolving page slug ending with index and type suffix '.php'

Stefan Bürk CR +2 V +2 Hard +226 −38 updated 01/05/22, 11:42

Commit message

If a page slug ends with 'index' and site has a routing
configuration with a PageTypeSuffix with index and suffix
'.php' as default suffix, route resolving cuts 'index.php'
from the uri, ending with a slug without index in it and
thus not resolving the page and displaying 404 page.

The reason for this is the code fragment which strips the
document root from the uri as a cleanup for some systems,
and fixes an issue for calling id/type parameters with
index.php (main entry point), which has been added as a
bugfix in v9 with #88028.

There was a first attempt to fix this page resolving issue
with #94537, which has been a regression and reverted with
issue #94968.

To ensure everything works and regression is covered before
a new patch, there has been two patches with #95096 and #95362.

After the regression there has been a really deep analysis,
to get all puzzle pieces together over the time, which ended
in the pre-patches and finally in this patch.

The stripping of the document root has been implemented to
late in the resolving chain to solve #88028, thus the followup
fixes interferred with the resolving concept. This patch moves
this stripping from the page-resolving point some steps early
to the site-resolving step, and doing the stripping only on
the left site of the uri and avoiding a generall str_replace(),
thus fixing past issues and the current issue in the correct
place.

Furthermore tests for this issue are (re)added with this patch,
as they were removed with the revert.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 6

Files 5