? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
5 Jul 2014

Based on a JSE question: http://joomla.stackexchange.com/questions/2501/where-is-the-copy-template-button-in-template-manager-in-j3-3-1-after-update

Issue

If you uninstall Hathor, the "Copy Template" and "Rename File" buttons in the template manager is no longer showing up. This is because the current check explicitely checks for 0. The database query however returns null if Hathor is uninstalled.
The check is needed because Hathor has special overrides where those features are offered in a accordion instead of a button. Thus the button should be hidden if Hathor is the active template.

Solution

Since we can get the active template name using the API JFactory::getApplication()->getTemplate() I have changed the code to use this, only showing the button if it's not "hathor".
I also removed the model method getHathor and the view property hathor because they are no longer needed. With this approach it should even use one less database query.

Testing

  • Check in Hathor that the buttons still don't show.
  • Switch to Isis and uninstall Hathor and check the presence of the mentioned buttons in the template manager (when you edit a template or a file).
avatar Bakual Bakual - open - 5 Jul 2014
avatar Bakual
Bakual - comment - 5 Jul 2014

After looking why we even have this check, I have updated the PR to remove the whole getHathor and $this->hathor stuff and changed the check to use JFactory::getApplication()->getTemplate() instead of an own database query.
Updated also PR description.

avatar joomlabeat
joomlabeat - comment - 8 Jul 2014

I applied your fix on a website with this issue and it does fix it.

avatar losedk
losedk - comment - 9 Jul 2014

Tested. This PR fixes the problem!

avatar phproberto phproberto - reference | 49187cf - 9 Jul 14
avatar Bakual Bakual - close - 9 Jul 2014
avatar Bakual Bakual - change - 9 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-09 20:52:43
avatar Bakual Bakual - close - 9 Jul 2014
avatar Bakual Bakual - head_ref_deleted - 10 Oct 2014

Add a Comment

Login with GitHub to post a comment