silverstripe/silverstripe-cms — pull request #38 by chillu (2011-11-14 14:45:17+00:00)
Title: Multibyte urlsegment

In short: Allow unicode characters in SilverStripe URL paths = URLSegment (unrelated to domains or query parameters).

Client request from an internal ticket: http://helpdesk.silverstripe.com/tickets/6756
Also rewrite the same change a bit differently for post-2.4: https://github.com/chillu/silverstripe-cms/commit/96421367b1764323ae87d2b2778d26207e0c987b

The underlying datamodel changes mean that we can't easily adapt the existing JS logic, which hardcodes a single regex. You can customize these rules on the server, meaning the client logic doesn't match any longer. I think its overkill to get the clientside to match up via JS, and used an ajax call instead. That has the disadvantage of being async though, so we can't prompt the user about "Do you want to change your URL from X to Y?" without risking a disruptive dialog seconds after the user action. I've made this a generic "Do you want to update the URL from your new page title?", which actually matches the 2.4 behaviour. Acceptable UX?

SiteTreeURLSegmentField seems a bit extreme, we originally had UniqueRestrictedTextField for this, now deprecated. AjaxUniqueTextField is still in there, but also still on behaviour.js etc. - is it OK to use a highly specialized field here?