No Code Attached Yet bug
avatar cmirnow
cmirnow
23 Jan 2024

This problem is actual to Joomla 3, Joomla 4, and now Joomla 5. If I click the "Delete All" button on the "Banners -> Statistics" tab - I get the notification "2117 records were successfully deleted", but the records (banner usage statistics for 2014) are not deleted.

Steps to reproduce the issue

How to reproduce?
Probably need to go back to Joomla 1.5, upgrade to J2.5 using JUpgrade, then step by step come to Joomla 5.
I don't know, really...

Expected result

Deleting all statistics records.

Actual result

Statistics are not deleted.

System information (as much as possible)

J3, J4, J5.

Additional comments

I don't know if it's possible to reproduce this again. But I am ready to give full access to the J5 test site affective by this problem to any Joomla maintainer or developer.

Perhaps you can tell me the correct db query syntax if deleting old stats records is not possible from the Joomla web administration panel?

banners1

banner2

avatar cmirnow cmirnow - open - 23 Jan 2024
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jan 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Jan 2024
avatar chmst chmst - change - 24 Jan 2024
Labels Added: bug
avatar chmst chmst - labeled - 24 Jan 2024
avatar chmst
chmst - comment - 28 Jan 2024

@cmirnow could you please test #42722?

It does not resolve the problem that tracks are not deleted. This happens when no banners are found for existing tracks.

Would be nice to get some opinions here:

Should the system automatically delete all tracks which are not connected to any banners? I think this is ok, because these tracks are useless and would remain forever in the system.
Or is it better to have an additional button like "clear tracks"?

avatar cmirnow
cmirnow - comment - 29 Jan 2024

Hi @chmst .
I don't think new buttons are needed. I would like the banner management interface to work. That's enough.
But I don't use statistics when displaying banners on my blog. Perhaps someone has a second opinion.

I will tell you what is critical for me. Recently, when publishing banners (images), I was forced to add to the css of the template:

.bannergroup {
    text-align: center;
}

It's not user friendly. Why not add to the component the ability to control the styles of banners or a group of banners? That would really be useful.

avatar chmst
chmst - comment - 29 Jan 2024

Thanks for feedback.
Your request for styling banners is not in scope of ths issue / PR. You can open a new issue for that.

avatar joomdonation joomdonation - change - 24 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-24 09:32:44
Closed_By joomdonation
avatar joomdonation joomdonation - close - 24 Feb 2024
avatar joomdonation
joomdonation - comment - 24 Feb 2024

From your screenshot, I believe the reasons of the error is because these track records belong to delete banners. You can run the following SQL commands to your database to get these records deleted (replace jos_ with database table prefix uses on your site):

  1. If you want to delete all track records
TRUNCATE TABLE jos_banner_tracks;
  1. If you just delete those orphan records, run:
DELETE FROM jos_banner_tracks WHERE banner_id NOT IN (SELECT id FROM jos_banners);

After that, the delete tracks feature will work well on your site again.

As the solution is provided above, I'm closing this issue. We can discuss that delete banner should delete it's track record as well, but that's another discussion. Feel free to re-open the issue if you still have more things to discuss.

Add a Comment

Login with GitHub to post a comment