?
avatar gijs007
gijs007
20 Apr 2015

Steps to reproduce the issue

Create a link inside an article to a different article that doesn't have a menu linking to it.

Expected result

I'd expect this article to be a child of the article that links to it/or as a child of the linking article's menu entry.

Actual result

The item automatically gets ROOT as parent.

As a result of the ROOT parent the article shows modules that have been assigned to the root/home page and the breadcrumbs don't work correctly.

System information (as much as possible)

Not relevant.

Additional comments

I've opened up this thread on the Joomla forum: http://forum.joomla.org/viewtopic.php?f=706&t=883176&p=3293783#p3293783

But as far as I know there is currently no way to assign a parent to an article that doesn't have a menu entry to itself.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar gijs007 gijs007 - open - 20 Apr 2015
avatar gijs007
gijs007 - comment - 20 Apr 2015

As you can see in this screenshot the article is linked to, trough a different article.
screen shot 2015-04-20 at 13 46 44

As a result this article gets the parent "ROOT" (marked in green) and has modules and H1 title show up (marked in red) which are set for the home page.
screen shot 2015-04-20 at 13 47 18


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

avatar Bakual
Bakual - comment - 20 Apr 2015

The way Joomla works, this is actually expected behavior.
The menu item where your link is, would be a wrong menu item for the article you linked.

You can create hidden menu items (eg one to the castegory of the article(s) to work with such a setup where some articles don't have visible menu items.

Closing as expected behavior and not a bug.

avatar Bakual Bakual - change - 20 Apr 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-04-20 20:25:32
Closed_By Bakual
Labels Removed: ?
avatar Bakual Bakual - close - 20 Apr 2015
avatar Bakual Bakual - close - 20 Apr 2015
avatar gijs007
gijs007 - comment - 20 Apr 2015

Just because it's expected behaviour doesn't mean it can't be improved, right?
The workaround with hidden menu's is frustrating, user unfriendly and most importantly doesn't allow us to make an article a child of a visible menu entry..

avatar Bakual
Bakual - comment - 21 Apr 2015

Just because it's expected behaviour doesn't mean it can't be improved, right?

Sure, it could be improved, But your sugegstions would make it worse. You would not have a unique URL for an item anymore. The URL would be different depending on where the link comes from. If you for example link from 5 articles to that single item, you would get 5 different URLs.

Just create a hidden menu item for it. Best create one for the category. You don't have to do one for each article.

avatar gijs007
gijs007 - comment - 21 Apr 2015

Item's already don't have unique URL's as it is..
I'm not suggesting that the URL is different from where the link comes from, I'm suggesting that we can set a parent (menu) item in the article manager for each article.

I've created a hidden menu, with an assigned category.
Now this creates a new (blog) page for the category which is accessible trough the breadcrumbs, despite the item being in a hidden menu. (see the pink marked part)

issue

In the red marked parts, you can see that the article still isn't linked as child of the actual menu entry..
There is no way to make a hidden menu entry that links to an item in an active menu..

avatar Bakual
Bakual - comment - 21 Apr 2015

As said, expected behavior. You can try to convince @Hackwar, but I doubt you will have any success :smile:

avatar Hackwar
Hackwar - comment - 21 Apr 2015

@Bakual is correct here. You wont convince me that that is any good idea. There are so many issues here, that I don't know where to start. We would have to look up the data for every article link in the database each time. How would you decide which link in an article takes precedence? If you set this in the article, the router has to know about this article structure. So I not only have to check if the current URL segment is a category element, but also if this might be a parent article of a later article. So I would have to check each segment of a URL against the aliases in the DB. That would mean 5 queries simply to parse a URL like //this/is/a-parent/article/21-child-article. Likewise for building a URL.

The router does the best it can with regards to unique URLs. But when people (meaning mostly developers) use it wrong, it can't do any better. The new router will go a gigantic step forward in that regard.

Regarding the user unfriendly-ness: I agree. It is not ideal right now. But instead of breaking the router for good, why not bring back the feature of Joomla 1.0, where you could create a menu item in the article edit screen for that article with 2 clicks? That sounds WAY better than the alternative.

A better solution would even be to think about the current backend UI and improve it in general in these regards.

avatar gijs007
gijs007 - comment - 21 Apr 2015

I don't see why it would need 5 queries to parse a URL like that, like I said you can just use one query to assign an article as child of one menu item. Unless you would want to make it possible to go "deeper" and assign one such child article as a parent of another article again (I don't see why anyone would want to do such a thing since you might as well assign it as a child of the same menu item). But in that case wouldn't it be smarter to store the whole relationship with the article? -I'm not a programmer so I'm not sure if this is possible or what the limitations to such an approach are.

I understand query's can be expensive in performance, but wouldn't a cache of some sort resolve this problem for most users? -IMO solving strange quirks like this is more important than a slight performance penalty, especially considering the servers most people use are quite powerful.

Although your suggestion would solve the user interface unfriendliness issue we would still have the problem as I showed in my last reply. -Unless some way of creating hidden menu items within a non hidden menu is made. such an option would be an improvement, and it would be even better if it could be filtered in the menu manager so that these "placeholders" can be hidden. But then again I don't see why this is any different in coding perspective from assigning parents trough the article it self since it only changes the location of the place to configure this.

avatar Hackwar
Hackwar - comment - 22 Apr 2015

Of course we can introduce caches. But there are limits to this and giving this a wild guess, I would say introducing something like this would kill the top 30% of all Joomla sites in terms of performance. If you want, you can create an extension for your personal site to introduce this feature. That is perfectly possible. But hell will freeze over before something like that is introduced into core.

A solution for your hidden-items problem would be to create the whole menu as a hidden menu and then create a second menu with menu-alias items to the original menu and only display that one.

avatar Bakual
Bakual - comment - 22 Apr 2015

If you need cache to work around bad perfomance of the architecture, then you should rather rethink the architecture you propose. :smile:

Add a Comment

Login with GitHub to post a comment