- last update
9 months ago 63 pass - First commit to issue fork.
- πΊπΈUnited States weekbeforenext Asheville, NC
This functionality seemed to be important enough to be included in the main module. My site doesn't use the redirect_domain sub module, so I created MR !102 working towards a main module solution.
Next steps:
- Manual testing
- Review/fix pipeline issues
- Write tests
I opted to set the new config value to false if the module is newly installed, but to true if the module is being updated. This is because a site could have mixed-case aliases and redirects and I don't want it to break functionality. I guess this isn't completely foolproof because a site can have aliases before enabling this module.
Thinking "out loud"
An additional feature when toggling the case-sensitivity off or updating the module might be to check if the site does have mixed-case URLs and provide a log message. We could provide a validation error that doesn't allow the user to toggle the option off if there are paths that would be affected. Maybe a batch update feature, if one doesn't already exist.
- Status changed to Needs review
2 months ago 6:23pm 26 June 2024 - πΊπΈUnited States weekbeforenext Asheville, NC
Made some updates to the update hook because it's not working on my site, but also continues to not work on my site.
The original issue I experienced was an alias was changed, only capitalizing some letters. When this happened, a redirect was created from a completely lowercase version to a mixed-case version and caused a redirect loop.
Aside from the update hook not setting the new config value, my updates do allow for toggling between allowing mixed-case URLs in redirects and aliases and working only with lower case URLs.
Notes
In thinking about possible validation and checking if there are already aliases or redirects with mixed-case, a query like this seems to work:
select * from path_alias where alias regexp binary '[A-Z]';
I would like some input on the direction I'm heading before I add more functionality and tests.
- Status changed to Needs work
29 days ago 8:07am 10 August 2024 - π¨πSwitzerland Berdir Switzerland
What's the use case for this?
I've just merged π Public method Redirect::generateHash() should unify path before generating the hash Active which would need to be adjusted for this as well.
- πΊπΈUnited States weekbeforenext Asheville, NC
New config to indicate whether the site allows mixed-case paths or lowercase only. Based on that indicator, we ensure redirects aren't created that cause redirect loops. I think a similar functionality was available in the Drupal 7 version, so I went this route.
I don't know the history of not including it for D8+, so happy to pivot to another path that protects us against redirect loops.