"Articles - Category" module that points to a category which includes articles with no other menu item pointing to them, and Articles integration option "Modern Routing" with "remove IDs from URLs" set to yes.
Links produced by the module would be nice clean SEO-friendly URLs without article or category number in them, and work properly.
Inconsistent links produced. Sometimes a URL of format ?view=article&id=64:lorem-ipsum&catid=29 and sometimes a 404 error brought on by URL with incomplete URI segments (do not match the category segments) especially after visiting a category blog.
Joomla 3.9
PHP 7.0.32
Global Config: SEO Friendly URLs - Yes
Global Config: Use URL rewriting - Yes
standard Joomla .htaccess
Articles option integration tab "URL Routing" -> Modern
Articles option integration tab "Remove IDs from URLs" -> Yes
Demo site: http://www.j39modern.dreamhosters.com
Demo site without Modern routing: http://www.j39legacy.dreamhosters.com
(both sites are vanilla installs)
For these sites the category/article structure is:
What We Do
Articles - Category module has
Category Filtering Type - Inclusive
Category - Continuing Education
Child Category Articles - Include
Category Depth - 3
Far more information in longer discussion at Joomla forum item:
https://forum.joomla.org/viewtopic.php?f=708&t=967034
I have heard this advice too many times here. Imo it's by default the best practice for the majority of joomla sites with modern router. Maybe do something more drastic in 3.10. I was thinking of making an new menu with just a menu item of list all categories disabled by default. And when someone upgrades or does a fresh install make a post install message which will say something like: if you want modern routing but you dont have a menu item for every category try enabling this menu "menu name item"....
"Just create a List All Categories menu item and set it to hidden.
This will normalize your urls even when you do not have a specific link to an article or its category."
Thanks. That's what I ended up doing on the problem site thanks to advice from the forum.
But I was encouraged to raise the issue here. I don't recall ever reading in official Joomla install literature that's something one must do if they want to use category article lists, or blogs. And we never had to with legacy routing. Probably a lot of other people in the same boat as me. And from what I have read on Github, Modern routing is the default and not optional for Joomla 4? So possibly a nasty surprise waiting for people. Unless it's already addressed in J4.
Same issue J4 (A5) currently. Non-friendly URLs generated. And no option for legacy. Not to mention other issues like Cat Blog not working. A ways to go.
Seems like if a List All Categories menu item is required to make Modern routing work properly for articles lists etc. with SEO friendly URLs and "remove IDs", then a List All Categories menu item sb baked in?
http://www.j4alpha5.dreamhosters.com/
Thanks for your attention.
A few days ago I created a plugin plg_system_routepatch-0-10.zip that should help with a monolingual website. I have not tested it with multilingual (associations may stop working). It is a lite version of PR #22229
The plugin may generate URL errors in 3rd party extensions (I tested a few without any problems).
In short:
/component/content/article/1- hello-world
/blue-category-menu-item/submenu1/article/1-hello-world?catid=4
/red-category-menu-item/submenu2/article/1-hello-world?catid=4
/green-category-menu-item/article/1-hello-world?catid=4
The plugin can be safely installed/uninstalled on Joomla 3.8.13 and the latest 3.9.
It overrides joomla namespaces / objects to patch routing errors.
It does not override any joomla core files.
The risk is SEO, I mean only pages without own menu items will be changed.
Old pages will be parsed correctly with one edge case for "Modern Routing" (error 404) mentioned at #19280 (comment)
Because of the edge case a part of this plugin (rules/NomenuRules.php
) can not be merged with J3.
Status | New | ⇒ | Discussion |
Labels |
Added:
J3 Issue
|
Title |
|
Status | Discussion | ⇒ | Confirmed |
Build | master | ⇒ | 4.0-dev |
Thank you for raising this issue.
Joomla 3 is now in security only mode with no further bug fixes or new features.
As this issue doesn't relate to Joomla 4 it will now been closed.
If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-08-28 04:56:33 |
Closed_By | ⇒ | alikon | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Just create a
List All Categories
menu item and set it to hidden.This will normalize your urls even when you do not have a specific link to an article or its category.