No Code Attached Yet J3 Issue
avatar stutteringp0et
stutteringp0et
2 Nov 2018

Steps to reproduce the issue

Copy /components/com_newsfeeds/views/newsfeed/tmpl/default.php to /templates/protostar/html/com_newsfeeds/newsfeed/default.php and to
/templates/protostar/html/com_newsfeeds/newsfeed/alt.php

Edit /templates/protostar/html/com_newsfeeds/newsfeed/default.php add "default" just after the first closing PHP tag.
Edit /templates/protostar/html/com_newsfeeds/newsfeed/alt.php add "alt" just after the first closing PHP tag.

Create a newsfeed, and change its layout to "alt"

Create a menu item to a single news feed to display this test.

Expected result

Overridden alternative layout displayed

Actual result

Overridden default layout displayed

System information (as much as possible)

J3.9, PHP 7.2 FPM, NGINX

Additional comments

It appears that the layout override does work, it just doesn't load anything other than a file named default.php

avatar stutteringp0et stutteringp0et - open - 2 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Nov 2018
avatar tonypartridge
tonypartridge - comment - 2 Nov 2018

If you remove the default.php file does alt then load?

avatar stutteringp0et
stutteringp0et - comment - 3 Nov 2018

No sir. Nothing I've tried loads alt. The reason I added the default test is to show that the override works and which is loaded

avatar uglyeoin
uglyeoin - comment - 4 Nov 2018

I believe overrides only work if the original template exists in the main component directory. Thus is it is not an override but a unique template which will not be overridden by an update so it can go in the normal folder. At least that was what I thought happened.

avatar mbabker
mbabker - comment - 4 Nov 2018

Menu items are goofy beasts when it comes to alternate layouts in that they define the layout to be used. So you need the appropriate XML file to go along with it if you're trying to do something as a new layout.

avatar stutteringp0et
stutteringp0et - comment - 5 Nov 2018

OK, I'll look into that. I remember something about XML files in the override document

avatar brianteeman brianteeman - change - 6 Nov 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 6 Nov 2018
avatar stutteringp0et
stutteringp0et - comment - 8 Nov 2018

I've tested this against com_content and I can create any override layout name I desire. It doesn't need to exist in components/com_content/view/article/tmpl in order to be selected and the override to operate as expected.

I have also tested this behavior against com_contact, and it behaves like com_newsfeeds, only default.php is activated as an alternative layout although alternate files are displayed and can be selected.

avatar SharkyKZ
SharkyKZ - comment - 8 Nov 2018

If Article behavior is considered correct, it can be changed in other places. Related commit 80fffd9.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Mar 2019
Category com_newsfeeds
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Removed: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - unlabeled - 4 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar jwaisner jwaisner - change - 24 Mar 2020
Status Discussion Information Required
avatar jwaisner
jwaisner - comment - 24 Mar 2020

@stutteringp0et Is this still being experienced in the latest J3 build?


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

avatar brianteeman
brianteeman - comment - 25 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As explained above #30676 this is not an issue to be resolve. It just didnt work the way that you expected it to.

Please close

avatar Quy Quy - change - 25 Aug 2022
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2022-08-25 23:41:01
Closed_By Quy
Labels Added: No Code Attached Yet
Removed: ?
avatar Quy Quy - close - 25 Aug 2022

Add a Comment

Login with GitHub to post a comment