User tests: Successful: Unsuccessful:
Joomla 4 asks for stats collection after installation.
A user can answer with a click on "NEVER" or "once" button
However this just sets a flag in the params of the plugin, it doesn't actually unpublish the plugin
The plugin is then disabled on clicking NEVER/ONCE, 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
install joomla 4
login to admin and ignore the stats message
navigate the plugins screen and search for stats
you can now see the stats message and the status of the stats plugin
click NEVER or once, the page reloads and the message has gone away and you can see instantly that the plugin has been disabled also
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Cant really be abstracted much further, but the concept to speed up Joomla could be used for sure.
The reason I'm asking this is that the same exact pattern should be applied to the sampledata plugins (once the data is successfully installed the
pluginmodule should be unpublished/disabled automatically, it throws an error message if you try to run it again)
@dgrammatiko That's not 100% true. The Blog Sample Data can be installed multiple times when having multiple languages in backend, one time for each language. So at least that one should not be unpublished or disabled after installation.
@PhilETaylor Sorry for that off-topic comment, but I had to correct the above statement.
@dgrammatiko That's not 100% true. The Blog Sample Data can be installed multiple times when having multiple languages in backend, one time for each language. So at least that one should not be unpublished or disabled after installation.
You could just republish the module/plugins and run them again :)
The Blog Sample Data can be installed multiple times when having multiple languages in backend
If you need to run multiple times (one per language) the sampledata then this is a huge UX fail. The plugin should check the installed languages and do that automatically...
hold the comments :) I have a PR about to push and you can chat there, instead of off railing this PR :) :)
instead of off railing this PR
oops sorry
For those reading, this PR is still on track and should be tested as normal please :)
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Thanks for testing
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-17 09:49:52 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
@PhilETaylor this is a nice one. Could we abstract the unpublish logic to a trait/helper/something.else? The reason I'm asking this is that the same exact pattern should be applied to the sampledata plugins (once the data is successfully installed the
pluginmodule should be unpublished/disabled automatically, it throws an error message if you try to run it again)