Closed cmirnow closed 7 months ago
@cmirnow could you please test https://github.com/joomla/joomla-cms/pull/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"?
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.
Thanks for feedback. Your request for styling banners is not in scope of ths issue / PR. You can open a new issue for that.
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):
TRUNCATE TABLE jos_banner_tracks;
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.
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?