? ? Pending

User tests: Successful: Unsuccessful:

avatar joeforjoomla
joeforjoomla
27 Jan 2017

Reference #13637

Steps to reproduce the issue

Install a new template on Joomla 3.7

Try to open the preview using the URL such as:
http://joomla37/?template=mytemplate

Expected result

The frontend uses the latest installed template named 'mytemplate'

Actual result

The default template is still used

System information (as much as possible)

The code change in site.php included in the function 'getTemplate' caused the regression.

An additional line of code 510 must be added in order to unset the reference to the array before reassigning it:

// Unset the $template reference to the last $templates[n] item cycled in the foreach above to avoid to edit the $templates array in the following assignment
unset($template);

Additional comments

avatar joeforjoomla joeforjoomla - open - 27 Jan 2017
avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2017
Category Libraries
avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
The description was changed
avatar joeforjoomla joeforjoomla - edited - 27 Jan 2017
avatar infograf768
infograf768 - comment - 27 Jan 2017

you are modifying parts of this pr #12688 please make sure you do not recreate the issue it solved.

avatar joeforjoomla
joeforjoomla - comment - 27 Jan 2017

Probably it would be better fix the new code #12688 instead of reverting to the previous one that i posted

avatar mbabker
mbabker - comment - 27 Jan 2017

It looks like you are reverting changes from several pull requests and moving back to the 3.6.5 state. Please don't do that, only make the changes needed to fix the issue. As I commented on your issue last week that function has had four separate pull requests applied to it when comparing 3.6.5 to current staging.

avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
Labels Added: ?
avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-01-27 21:39:59
Closed_By joeforjoomla
avatar joeforjoomla joeforjoomla - close - 27 Jan 2017
avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
Status Closed New
Closed_Date 2017-01-27 21:39:59
Closed_By joeforjoomla
avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
Status New Pending
avatar joeforjoomla joeforjoomla - reopen - 27 Jan 2017
avatar joeforjoomla joeforjoomla - edited - 27 Jan 2017
avatar joeforjoomla
joeforjoomla - comment - 27 Jan 2017

Add line 510

// Unset the $template reference to the last $templates[n] item cycled in the foreach above to avoid to edit the $templates array in the following assignment unset($template);

avatar joeforjoomla joeforjoomla - change - 27 Jan 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2017
Category Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2017
Category Libraries
avatar mbabker
mbabker - comment - 28 Jan 2017

OK, I moved the check myself. This PR looks fine to me, tests please.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Jan 2017

I have tested this item successfully on 796a057


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 28 Jan 2017 - Tested successfully
avatar marrouchi
marrouchi - comment - 1 Feb 2017

I have tested this item successfully on 796a057


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

avatar marrouchi marrouchi - test_item - 1 Feb 2017 - Tested successfully
avatar infograf768 infograf768 - change - 2 Feb 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 2 Feb 2017

RTC. Thanks


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

avatar wilsonge wilsonge - change - 2 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-02 13:26:49
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 2 Feb 2017
avatar wilsonge wilsonge - merge - 2 Feb 2017

Add a Comment

Login with GitHub to post a comment