Open orchardbot opened 10 years ago
@sebastienros commented:
I am opening this one just to find some answer, not that it's actually solvable.
I think that using AttributeRouting could be a solution. Would need to investigate more on that.
Can it be solved?
danielsummers created: https://orchard.codeplex.com/workitem/20747
In the process of migrating a blog from WordPress to Orchard, I created an autoroute pattern of
{Content.Container.Path}/{Content.Date.Format:yyyy}/{Content.Slug}.html
to match the one I had in WordPress. This works; Orchard creates it, IIS serves it, etc. However, when I edit a page without modifying the URL, after clicking "Save" or "Publish Now", I get an error that a list of prohibited characters is in my slug. The offending character is the "." from the .html above.
I understand not wanting a "." in the actual slug; however, that validation logic (from AutorouteService.cs in the Orchard.Autoroute project) is also being applied to the entire permalink. On my local checkout, I've modified AutorouteService.cs line 169 to remove the period/full-stop character from the RegEx validation string. This allows me to edit the post without wiping out the slug to avoid the error.