From e8c37522958d0127c62b8a5b08b7d92cd106942a Mon Sep 17 00:00:00 2001 From: Tom Udding Date: Sun, 28 Jul 2024 23:14:08 +0200 Subject: [PATCH] fix: index.php being interpreted as valid base path when assembling URLs This prevents all URLs from including `/index.php/` when using the URL view helper. To ensure that this also properly works for URLs constructed by the browser, we now have the `HashUrl` view helper for that. --- .../view/activity/activity/archive.phtml | 2 +- module/Application/src/Module.php | 8 ++++ .../Router/LanguageAwareTreeRouteStack.php | 6 +++ .../Application/src/View/Helper/HashUrl.php | 37 +++++++++++++++++++ module/Application/src/View/HelperTrait.php | 2 + module/Application/view/partial/admin.phtml | 6 +-- .../Application/view/partial/main-nav.phtml | 14 +++---- .../view/frontpage/organ/organ.phtml | 2 +- module/Photo/view/partial/years.phtml | 2 +- 9 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 module/Application/src/View/Helper/HashUrl.php diff --git a/module/Activity/view/activity/activity/archive.phtml b/module/Activity/view/activity/activity/archive.phtml index 20aa1e8c09..28ee2ec44d 100644 --- a/module/Activity/view/activity/activity/archive.phtml +++ b/module/Activity/view/activity/activity/archive.phtml @@ -27,7 +27,7 @@ use Laminas\View\Renderer\PhpRenderer;