?
avatar PhilETaylor
PhilETaylor
12 Jan 2021

Steps to reproduce the issue

Joomla 3/4 asks for stats collection after installation.

A user can answer with a click on "NEVER" button

However this just sets a flag in the params of the plugin

Expected result

The plugin is then disabled on clicking NEVER, so that it doesn't take up any processing time/power/cpu/ms on page load ever again to ensure Joomla remains running a peak performance but the user has the option to reenable the plugin at any time

Don't store the NEVER as a param, because if the plugin is enabled again, you want it to ask the question again so that ALWAYS or ONCE can be chosen.

Actual result

The PlgSystemStats plugin loads on every page load, runs some checks, takes some time, and in the end doesn't even send stats because we have said never.

There are 7 different if statements run in onAfterInitialise/onAfterDispatch, several of these have 2 conditions to check, objects to retrieve etc...

Retrieving the params from the database is an extra db query that's not needed if NEVER is selected.

avatar PhilETaylor PhilETaylor - open - 12 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Jan 2021
avatar PhilETaylor PhilETaylor - change - 12 Jan 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 12 Jan 2021
avatar infograf768
infograf768 - comment - 13 Jan 2021

Makes sense. But no idea how to modify as it requires a major rewrite.

avatar PhilETaylor
PhilETaylor - comment - 13 Jan 2021

Could just throw in a SQL query here

to unpublish the plugin? Thoughts?

avatar brianteeman
brianteeman - comment - 21 Feb 2021

Presumably it should also therefore be unpublished if a user selects to send data once immediately after the data is sent

avatar PhilETaylor
PhilETaylor - comment - 15 Apr 2021

PR #33150

avatar PhilETaylor PhilETaylor - change - 15 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-15 20:45:47
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 15 Apr 2021

Add a Comment

Login with GitHub to post a comment