? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
15 Apr 2021

Pull Request for Closes #32005 #33083 #32129 et al.

Summary of Changes

Sometimes "something" stops a successful submission of anonymised stats to the Joomla stats collection endpoint.

Most of the time there is nothing anyone needs to do.

Joomla Stats collection is a vanity "nice to have" and the Joomla project should not be complaining if users fail to submit their stats

The stats process should die gracefully and quietly - unless in debug mode.

Notices, and Exceptions should not be thrown into the users face if the Joomla Stats collection server endpoint is down, unreliable, unavailable, uncountable.

Testing Instructions

Install Joomla 4

Change the url in the file to be a fake non-routable url

protected $serverUrl = 'https://dev.null/stats/submit';

To reset your stats plugin to "out of the box" run sql after s/jos/prefix:

UPDATE `jos_extensions` SET `params` = '' WHERE `name` = 'plg_system_stats';

Test with "always"

Actual result BEFORE applying this Pull Request

Red exception shown to the screen on failed submission of stats

Expected result AFTER applying this Pull Request

No red exception messages
If debug is on - red exception message
if logging is enabled - entries in the log like:


2021-04-15T20:05:35+00:00	WARNING 172.20.0.1	jerror	Could not connect to statistics server: Failed to connect to 127.0.0.1 port 80: Connection refused
2021-04-15T20:05:48+00:00	WARNING 172.20.0.1	jerror	Could not connect to statistics server: Failed to connect to 127.0.0.1 port 80: Connection refused
2021-04-15T20:06:01+00:00	WARNING 172.20.0.1	jerror	Could not connect to statistics server: Failed to connect to 127.0.0.1 port 80: Connection refused

Documentation Changes Required

none

avatar PhilETaylor PhilETaylor - open - 15 Apr 2021
avatar PhilETaylor PhilETaylor - change - 15 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2021
Category Front End Plugins
avatar PhilETaylor PhilETaylor - change - 15 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 15 Apr 2021
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Front End Plugins Administration com_admin SQL Postgresql com_banners com_categories com_contact com_content com_fields com_finder
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Administration com_admin SQL Postgresql com_banners com_categories com_contact com_content com_fields com_finder Front End Plugins
avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

Conflicts resolved (eventually)

avatar ceford
ceford - comment - 8 May 2021

With the patch applied, if debug is on there is no red exception message but logging continues. That is not what it says in the instructions and I think it would be best to have the message, even tailored to give a bit more explanation.


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

avatar PhilETaylor
PhilETaylor - comment - 8 May 2021

I think it would be best to have the message, even tailored to give a bit more explanation.

No. Simply no. as #32005 #33083 #32129 et al shows, users dont need and dont care about this feature.

This is simply a vanity tool of the Joomla project (the stats are meaningless anyway as they only show the first version installed, and not the "current" version at all times, so the stats are always incorrect when aggregated and displayed on joomla.org)

A Joomla user should not have to deal with errors from the vanity tool of the Joomla project - especially as its totally out of the Joomla users hands should the stats server error, or be unavailable. There is no action needed by the Joomla user at all, so why shout at them an error message.

avatar ceford ceford - test_item - 8 May 2021 - Tested successfully
avatar ceford
ceford - comment - 8 May 2021

I have tested this item successfully on d7da0f7

I am happy with what this pr does. I was thinking a log may be full of useless lines like this:
2021-05-08T12:41:06+00:00 ERROR 127.0.0.1 - Could not connect to statistics server: Could not resolve host: dev.null
But that is a separate issue. If users are logging they need to set up the logger properly. I never really learned how to do that myself.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33149.
avatar alikon
alikon - comment - 9 May 2021

the stats need more care fore sure
joomla/statistics-server#60

avatar alikon alikon - test_item - 9 May 2021 - Tested successfully
avatar alikon
alikon - comment - 9 May 2021

I have tested this item successfully on d7da0f7


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

avatar alikon alikon - change - 9 May 2021
Status Pending Ready to Commit
avatar richard67 richard67 - change - 9 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-09 18:32:05
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 9 May 2021
avatar richard67 richard67 - merge - 9 May 2021
avatar richard67
richard67 - comment - 9 May 2021

Thanks!

avatar wilsonge
wilsonge - comment - 9 May 2021

This is simply a vanity tool of the Joomla project (the stats are meaningless anyway as they only show the first version installed, and not the "current" version at all times, so the stats are always incorrect when aggregated and displayed on joomla.org)

It does give the updated data to the project. And as production we used these extensively when trying to figure out minimum requirements for J4 (we filtered out any data not submitted in the last 3 months unlike the data that shows in the graph on j.org)

Although to be clear it’s correct to not show most the warnings to end users (we should probably log them however)

avatar brianteeman
brianteeman - comment - 9 May 2021

it's still fundamentally flawed as no site that said no 5 years ago has ever submitted data again. Perhaps it should be considered to ask everyone again at each update

Add a Comment

Login with GitHub to post a comment