?
avatar astridx
astridx
25 Apr 2017

Steps to reproduce the issue

I have an alternative layout for com_content view article in protostar. Up to now I had the files default2.php and default2_links.php.
As I want to use this layout in a menu type, I created the file default2.xml

Expected result

I see this alternative layout when I create an article and I see this alternative layout in the options of com_content for selecting it as global for all articles.

Actual result

Before I created the default2.xml I saw the alternativ layout in the options of com_content for selection it as global. After creating the file defautl2.xml I do not see it any more in the options of com_content. I only see it, when I create a menu item.

avatar astridx astridx - open - 25 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Apr 2017
avatar astridx astridx - change - 25 Apr 2017
The description was changed
avatar astridx astridx - edited - 25 Apr 2017
avatar astridx astridx - edited - 25 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 25 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Apr 2017
Category com_content Layout
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Sep 2017

@astridx is this still a valid issue?

avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2017
Status New Information Required
avatar astridx
astridx - comment - 2 Sep 2017

@franz-wohlkoenig
Yes, I just tested it with Joomla! 3.8.0-beta5-dev

avatar astridx astridx - change - 2 Sep 2017
The description was changed
avatar astridx astridx - edited - 2 Sep 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Sep 2017

@astridx thanks for Update. Hopefully a Dev. come around.

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Sep 2017
Status Information Required Discussion
avatar AndySDH
AndySDH - comment - 28 Sep 2017

I can confirm and reproduce this.

avatar Bakual
Bakual - comment - 28 Sep 2017

According to this comment, it is actually intended behavior. But don't ask me why.
https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/form/field/componentlayout.php#L182-L183

The code which actually removes them from the list is a few lines later: https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/form/field/componentlayout.php#L195

The issue which introduced that code was https://developer.joomla.org/joomlacode-archive/issue-23054.html

b. Alternative menu items will be required to have XML files. So, any XML files and matching php files will be assumed to be alternative menu items. They will show on the menu item list but NOT on the alternative layout list.

avatar AndySDH
AndySDH - comment - 28 Sep 2017

Wow, that's some nice research you did there, great finds.
However, no idea why either, I do not see the reason why the two things (alternative menu items and alternative article layout) can't coexist. Just the fact that it's an alternative menu item doesn't necessarily mean you will never need to use it for an individual article that doesn't have a menu item.
Maybe we should address that. ?

avatar astridx
astridx - comment - 29 Sep 2017

I think we should explain it at least in a comment. The comment could be in the description of the alternative layout selection field. We have discovered this in our Joomla! User Group the first time and we were all convinced that it is a bug.

avatar Bakual
Bakual - comment - 29 Sep 2017

Please test #18159

avatar Bakual Bakual - close - 29 Sep 2017
avatar Bakual Bakual - change - 29 Sep 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-09-29 08:24:36
Closed_By Bakual

Add a Comment

Login with GitHub to post a comment