Create a numeric category name, for example 2016. With SEF turned on, this will be seen as an article ID, and returns a 404 error. This can be worked around by aliasing the name as 'year2016'.
The router should be able to tell the difference between category names and article IDs.
Then, I guess, the field shouldn't validate with invalid data...
Who says it's invalid?
Hypothesis...
Invalid, meaning that we need to instruct authors, "don't create articles or categories that start with a number... because Joomla can't understand it"? If that's the way it works, then authors shouldn't be able to create them that way.
That's where it gets tricky. If you have a single article called "2016
news" the alias will be "2016-news" which CAN cause issues but will not
always cause issues. For example it won't cause an issue if it is displayed
as a single article menu item because the alias will then come from the
menu. So not a simple thing.
This is the same issue I've been having. Joomla! Shouldn't allow numeric starts to aliases. And instead send it to the end of the alias because it's too patchy otherwise.
As I stated above it all depends
But it shouldn't be an if then maybe well kinda works solution. Adding it to the end solves the problem completely? Or failing validation for the user to edit, maybe saying alias cannot start with numeric values. This solves the problem once and all.
Imposing an arbitrary restriction because our code doesn't know how to handle the situation isn't a solution IMO.
Tony if you can come up with a solution that prevents those problematic
URLs without breaking sites with the ones that work then go for it. Its not
not being fixed because anyone is lazy
This has been fixed in the modern routing in 3.7. Please test there and then close this.
With the current status of the modern aka experimental router being uncertain please keep this open for now
Agreed, this should remain open until a stable release is established.
Status | New | ⇒ | Confirmed |
I am closing this as resolved in 3.8 which has the referenced router code
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-18 13:15:23 |
Closed_By | ⇒ | brianteeman |
The same is true for an article alias that begins with a number.