? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
7 Sep 2022

Pull Request for #38700

The Problem

When you uninstall a template it does NOT remove the database entry for any overrides for that template in #__template_overrides.

As a result the count on the quickicon does not change.

This site was a j3 site that has now been updated to j4

Before

image
image

After uninstalling the template (called editor)

image
image
image

The solution

Part 1

When a template is uninstalled any record in the #__template_overrides table for that template will now be deleted

Part 2

On update the #__template_overrides is checked to see if there are any orphaned records from previous templates that have now been deleted and if found then it deletes those records.

Test instructions

Create a site with a previous release of joomla
Clone the template TWICE
In each cloned template create various template overrides
Update the site to the current release of joomla
You should now see a count for the number of overrides to check on the home dashboard
Uninstall one of the cloned templates
You should now see that the count for the number of overrides to check on the home dashboard has not changed
Update the site to this build using this update url https://ci.joomla.org/artifacts/joomla/joomla-cms/4.2-dev/38714/downloads/57633/pr_list.xml
You should now see that the count for the number of overrides to check on the home dashboard has changed

  • that is a successful test of part 2
    Finally uninstall the remaining clone template
    You should now see that the count for the number of overrides to check on the home dashboard has changed to none
  • that is a successful test of part 1
avatar brianteeman brianteeman - open - 7 Sep 2022
avatar brianteeman brianteeman - change - 7 Sep 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2022
Category SQL Administration com_admin Postgresql Libraries
avatar brianteeman brianteeman - change - 7 Sep 2022
The description was changed
avatar brianteeman brianteeman - edited - 7 Sep 2022
avatar brianteeman brianteeman - change - 7 Sep 2022
The description was changed
avatar brianteeman brianteeman - edited - 7 Sep 2022
avatar crystalenka
crystalenka - comment - 12 Sep 2022

I have tested this item successfully on ad285aa

Thank you Brian!


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

avatar crystalenka crystalenka - test_item - 12 Sep 2022 - Tested successfully
avatar Kostelano
Kostelano - comment - 13 Sep 2022

I have tested this item successfully on ad285aa


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

avatar Kostelano Kostelano - test_item - 13 Sep 2022 - Tested successfully
avatar alikon alikon - change - 13 Sep 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 13 Sep 2022

RTC


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

avatar fancyFranci fancyFranci - change - 15 Sep 2022
Labels Added: ? ?
avatar fancyFranci fancyFranci - change - 16 Sep 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-09-16 11:15:31
Closed_By fancyFranci
avatar fancyFranci fancyFranci - close - 16 Sep 2022
avatar fancyFranci fancyFranci - merge - 16 Sep 2022
avatar fancyFranci
fancyFranci - comment - 16 Sep 2022

Thank you for making the update a smoother experience :)

avatar PMWilliams123
PMWilliams123 - comment - 25 Sep 2022

just got round to trying
You could use following SQL statements in PhpMyAdmin to clean it up (replace the #__ by your actual database prefix):
DELETE FROM #__template_overrides WHERE template NOT IN (SELECT name FROM #__extensions WHERE type='template');
from #38700
and return 0 rows affected and obviously did not clear the problem

Add a Comment

Login with GitHub to post a comment