User tests: Successful: Unsuccessful:
Pull Request for Issue #33253
Show preview of stats even if the module is unpublished
Install Joomla 4
edit "System - Joomla! Statistics" plugin
Disable the plugin and save it
edit "System - Joomla! Statistics" plugin
Click "Select here to see the information that will be sent."
When the plugin is disabled there is no data preview
a list of system info that will be sent to the stats server, to allow me to make an informed decision to enable this plugin
none
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Title |
|
Labels |
Added:
?
|
Sorry, the fix is to hacky, and will show a bad example for other developers.
I think, here would be better to show the message that explain to User what is going on, when plugin is disabled:
The preview not available for unpublished plugin, please do "this" and "this"...
.
Or just hide whole "preview section" for unpublished plugin.
Sorry, the fix is to hacky, and will show a bad example for other developers.
You mean like much of the code in Joomla...
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-23 09:11:36 |
Closed_By | ⇒ | PhilETaylor |
The problem is that the dataField has no knowledge of whether the plugin is disabled or not... so another hack needed to find that information...
You mean like much of the code in Joomla...
Sorry, I did not meant to offend someone.
The problem is that the dataField has no knowledge of whether the plugin is disabled or not
There PluginHelper::isEnabled()
.
Or maybe this does not need, just improve the message, around:
The data not available, there is no data or the plugin is disabled and so data collection also disabled. Please check if plugin enabled
Or something like that, I am not strong in English.
PluginHelper::isEnabled()
doesnt do what it says it does. I already wasted time on that. I'll just hide everything if there is no stats returned (no stats returned = the plugin is disabled so the triggerEvent doesnt return stats)
PluginHelper::isEnabled() doesnt do what it says it does.
I just checked on j3 var_dump(JPluginHelper::isEnabled('system', 'stats'))
return correct true
/false
, when enabled
/disable
Cannot check on j4 currently, but the code is the same there.
I have tested this item✅ successfully on 1670a00
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33255.