?
Related to # 4724
Referenced as Related to: # 4724
avatar BorislavZlatanov
BorislavZlatanov
25 Sep 2014

What I did
I created an alternative menu item for com_wrapper. The steps:
1) Copy from /components/com_wrapper/views/wrapper/tmpl the files default.php and default.xml.
2) Paste them in /templates/[template_name]/html/com_wrapper/wrapper
3) Rename them to custom.php and custom.xml
4) Edit custom.xml, changing title="COM_WRAPPER_WRAPPER_VIEW_DEFAULT_TITLE" on line 3 with title="custom"
5) In Joomla's backend, create a new menu item and choose type Wrapper => custom. Publish the menu item.

What happened
Changes to the custom.xml file get applied to the backend page for the alternative menu. But changes in the custom.php file do not get applied to the frontend page for that menu. It appears that the PHP file is not parsed at all because even obvious syntax errors do not have any effect. (Just to note, when editing /components/com_wrapper/views/wrapper/tmpl/default.php, changes do get applied.)

What should have happened
Changes in the custom.php file should be applied to the frontend page for the alternative menu item.

Other information
I believe this is a common problem. See here ( http://joomla.stackexchange.com/questions/4388/list-all-categories-com-content-views-categories-alternative-layout-not-workin ) for a clear and concise example, and here ( http://forum.joomla.org/viewtopic.php?f=579&t=578662 ) for a longer thread with many people reporting issues along these lines.

My environment
Joomla 2.5.24. XAMPP 1.8.3 on Win7. PHP 5.5.6, MySQL 5.6.14, Apache 2.4.7

I'd be happy to provide any other info if needed. Alternative overrides are a really important functionality. :)

avatar BorislavZlatanov BorislavZlatanov - open - 25 Sep 2014
avatar Bakual
Bakual - comment - 25 Sep 2014

I just tested it with the steps you said and added a <h3>test</h3> prior to the <div class="contentpane<?php echo $this->pageclass_sfx; ?>">. It works fine in Joomla 3, but is indeed broken in 2.5.

So I can confirm it for Joomla! 2.5.25.

avatar Bakual Bakual - change - 25 Sep 2014
Labels Added: ?
avatar Bakual Bakual - change - 25 Sep 2014
Category Components Front End
avatar Bakual Bakual - change - 25 Sep 2014
The description was changed
Status New Confirmed
avatar nicksavov nicksavov - change - 15 Oct 2014
Labels Added: ?
avatar butterflydevelopment
butterflydevelopment - comment - 17 Oct 2014

We are working on this at Butterfly!


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

avatar nicksavov
nicksavov - comment - 17 Oct 2014

Please test the fix at #4720

avatar butterflydevelopment
butterflydevelopment - comment - 17 Oct 2014

changed JRequest::getCmd('layout', 'default') to JRequest::getString('layout', 'default') at JController.
getCmd removes colons(:) which are required for template overrides to work

This should be now working with any type of component template overwrite

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

avatar zero-24 zero-24 - close - 17 Oct 2014
avatar jissues-bot jissues-bot - close - 17 Oct 2014
avatar brianteeman brianteeman - change - 17 Oct 2014
Status Confirmed Closed
Rel_Number 4724
Relation Type Related to
avatar brianteeman
brianteeman - comment - 17 Oct 2014

Please see #4724 for a solution

avatar jissues-bot
jissues-bot - comment - 17 Oct 2014
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Closed_Date 0000-00-00 00:00:00 2014-10-17 06:20:52
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment