?
avatar woluweb
woluweb
27 Jun 2018

Steps to reproduce the issue

  1. enable Modern Router in Articles Options (without or with ID)
  2. when there is no menu item "Category Blog/List" or "Single Article" pointing to a given article, then its url is weird, for example
    http://jcm.cloudaccess.host/?view=article&id=4:router-issue&catid=2
    We typically have this when the article appears on the homepage showing "Featured Articles"

Expected result

URL should be "nice", probably something like
http://jcm.cloudaccess.host/router-issue (alias of the article)

Actual result

http://jcm.cloudaccess.host/?view=article&id=4:router-issue&catid=2
All other urls do work normally (when a menu points to the Category or to the Single Article).

System information (as much as possible)

Joomla version: already observed on Joomla 3.8.8 (but it also occurs on 3.8.9 or 3.8.10 so this is not an issue caused by the two releases of yesterday)

Additional comments

I experienced this first on a hosting of the type "joomla.com" and first throught it was an issue related to some server configuration. But then I could reproduce it on other websites hosted elsewhere.
Also I had a chat about this with Rowan and she faces the same issue. So obviously it is quite general and not linked to my own typical configuration of Joomla sites.

avatar woluweb woluweb - open - 27 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jun 2018
avatar woluweb woluweb - change - 27 Jun 2018
Title
Modern Router : url issue when no menu item points to an article having no Single Article or Category Blog menu item pointing to it
Modern Router : url issue when no menu item points to a given article
avatar woluweb woluweb - edited - 27 Jun 2018
avatar woluweb woluweb - change - 27 Jun 2018
The description was changed
avatar woluweb woluweb - edited - 27 Jun 2018
avatar mbabker
mbabker - comment - 27 Jun 2018

It's expected behavior. If there isn't a menu item for either the article or any of its parent categories, then it is impossible to create a "nice" URL. Note that the archived and featured menu items can't be used as a "parent" in this case, those two views represent a status on content items and don't exist as part of the content hierarchy (categories/menus).

The best way to deal with this is a hidden menu item for a categories view at the root of your category tree.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2018
Status Expected Behaviour Closed
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 27 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Jun 2018
Status New Expected Behaviour
Closed_Date 0000-00-00 00:00:00 2018-06-27 12:54:07
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 Jun 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jun 2018

Closed as expected Behaviour.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20892.

avatar woluweb
woluweb - comment - 27 Jun 2018

Txs for the quick reaction.
Yes indeed, creating a menu item (Single Article or Category Blog/List | displayed or not) was the way I would "solve the issue".
But I am even happier now that I know that it was not even an "issue" but expected behaviour ;)

BTW, txs to all the people involved in all the work done on the two releases of yesterday. #jpositive #ILikePeopleWhoTestBefore #IHatePeopleWhoCriticizeAfter

avatar mbabker
mbabker - comment - 27 Jun 2018

It's one of the behavior quirks that doesn't exist in the new router compared to the older implementation (where the older one would try a lot harder to create "friendly" URLs even in cases where it made no sense). So if you add to your checklist something about ensuring there is at least one category menu item (hidden or not) for each category branch then you'll be OK (and like I noted, this is best done with a categories menu item for the root of your category tree that way you always have one and you don't have to think about it later if you add a new branch to your category tree and its content has "ugly" URLs).

Add a Comment

Login with GitHub to post a comment