OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Similar paths are now compared ignoring casing #8743

Closed AndreaPiovanelli closed 8 months ago

AndreaPiovanelli commented 9 months ago

Reference issue: #8742 Added StringComparer and forced lowercase where needed to ensure matching paths to ignore casing. This changes apply to new content or when autoroute is changed. This means that, for existing content, if user does not change the current url textbox, the path generation is skipped, thus keeping ambiguous paths if present. For this reason I opened a draft pull request for the moment, to find a way to avoid this ambiguity for existing content. This can be solved mainly in two ways: 1) Forcing the slug / url generation even if the matching between url and content routevaluedictionary is passed (https://github.com/OrchardCMS/Orchard/blob/9644ceda1f9b077d44aaa4ffaab103c19a59ddba/src/Orchard.Web/Modules/Orchard.Autoroute/Services/AutorouteService.cs#L217) 2) Adding a migration step (in Orchard.Autoroute or Orchard.Alias) forcing the regeneration of all ambiguous urls.

MatteoPiovanelli-Laser commented 8 months ago

@sebastienros @AndreaPiovanelliLaser should we merge this in, and worry about possible pre-existing path conflicts some other time, since this should prevent any new ones from cropping up?

sebastienros commented 8 months ago

I think you can merge, I approved the PR