- 🇦🇺Australia acbramley
Not sure if we still need an issue summary update, the steps are fairly clear.
Here's one approach with a test only patch. The test fails still because of another issue with the fix but it gets us closer...
- 🇦🇺Australia acbramley
Fix for
Warning: Undefined array key 1 template_preprocess_html()
The last submitted patch, 39: 3043779-39.patch, failed testing. View results →
The last submitted patch, 39: 3043779-39-test-only.patch, failed testing. View results →
The last submitted patch, 42: 3043779-42.patch, failed testing. View results →
- 🇦🇺Australia dpi Perth, Australia
This is about the RequestPath condition.
The last submitted patch, 46: 3043779-46.patch, failed testing. View results →
- Status changed to Needs work
almost 2 years ago 6:39pm 3 February 2023 - 🇺🇸United States douggreen Winchester, VA
The problem is more pervasive than this. If you visit /index.php5 (as mentioned in #30 🐛 "Source path has to start with a slash" exception when hitting path prefixed with index.php with RequestPath condition Needs work ), something takes everything after "index.php" as the path alias, and you end up in PathAlias.php with the path part set to "5" which throws an error, and 🐛 AliasManager->getAliasByPath('//') PHP Warning Needs work does not fix that.
I don't understand why the test passes but it doesn't work in my browser.
In my browser (or curl)
$ curl -SIl https://mysite.ddev.site/index.php5 HTTP/1.1 500 500 Service unavailable (with message) Server: nginx/1.20.1 Date: Fri, 03 Feb 2023 18:37:53 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Cache-Control: must-revalidate, no-cache, private X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 9 (https://www.drupal.org)
I kicked the test bot to test it here, and this test passes (ignore the unrelated test failures). So I ran it locally and it also passes:
$ phpunit modules/block/tests/src/Functional/BlockTest.php PHPUnit 9.6.0 by Sebastian Bergmann and contributors. Warning: Your XML configuration validates against a deprecated schema. Suggestion: Migrate your XML configuration using "--migrate-configuration"! Testing Drupal\Tests\block\Functional\BlockTest .............. 14 / 14 (100%) Time: 00:46.416, Memory: 6.00 MB OK (14 tests, 247 assertions) HTML output was generated
- Status changed to Needs review
almost 2 years ago 8:54pm 3 February 2023 - 🇺🇸United States douggreen Winchester, VA
Sorry, I've isolated my particular problem to another module, so I'm restoring this to "needs review." Since this is a different (but similar problem) I'm not actually commenting on this patch.
The last submitted patch, 46: 3043779-46.patch, failed testing. View results →
- Status changed to Needs work
about 1 year ago 5:56pm 18 September 2023 - 🇺🇸United States pmagunia Philadelphia 🇺🇸
This issue is reproducible in Drupal 10.1 also.
- Status changed to Needs review
about 1 year ago 6:54am 21 September 2023 - last update
about 1 year ago 29,482 pass - 🇮🇳India priya.chat
I have tried a patch for this issue in Drupal 10.1, this may resolved the mentioned problem. kindly review.
- 🇮🇳India priya.chat
Hi @acbramley, I have tried previous patched for Drupal 10.1 , but didin't worked for me so I have given a try to first check if the path is valid for which we are validating the "/" value then apply the other checks. Thanks.
- Status changed to Needs work
about 1 year ago 2:39pm 21 September 2023 - 🇺🇸United States smustgrave
@priya.chat can you provide steps for how it's failing for you?
Can't drop test coverage though.
- 🇮🇳India priya.chat
Hi @smustgrave , I have applied patch on #33 and tried to access /index.php5 or /index.php.php on Drupal 10.1.x , getting error below
InvalidArgumentException: Source path .php has to start with a slash. in Drupal\path_alias\AliasManager->getAliasByPath() (line 185 of /core/modules/path_alias/src/AliasManager.php).
Kindly suggest, if I am following any wrong step to reproduce this issue.
- 🇺🇸United States joshuasosa
In my particular case, a visitor went to mysite.com/index.php) which causes a white screen error. #46 didn't work for me but #56 resolved the issue.
- 🇺🇸United States georob
Rerolled #56 for 10.3. Applies cleanly and addresses the issue as described by making the change in path auto module for requiring a slash.
- 🇺🇸United States georob
Reading the thread again, I've moved the initial test from #39 into the patch from #56 rerolled in #60 into this patch, #61.