?
Related to # 4341
Referenced as Related to: # 4341

User tests: Successful: Unsuccessful:

avatar butterflydevelopment
butterflydevelopment
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

original report

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 butterflydevelopment butterflydevelopment - open - 17 Oct 2014
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 17 Oct 2014
Category Components Front End
avatar brianteeman brianteeman - change - 17 Oct 2014
The description was changed
Title
Bug 4341
Alternative menu item not loading the php files in the override dir
Rel_Number 4341
Relation Type Related to
avatar Bakual
Bakual - comment - 17 Oct 2014

This change is good.
A similar fix has been applied to Joomla 3 last year. See #1553

avatar brianteeman brianteeman - alter_testresult - 17 Oct 2014 - bakual: Tested successfully
avatar mbabker mbabker - close - 4 Dec 2014
avatar mbabker mbabker - change - 4 Dec 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-12-04 22:49:47

Add a Comment

Login with GitHub to post a comment