in a fresh OJS 3.1.1.-4 installation, the Usage statistics report is missing:
Resulting in the Report Generator loading the form in vain.
The code (e.g. plugins/generic/usageStats/UsageStatsReportPlugin.inc.php and
/lib/pkp/plugins/generic/usageStats/PKPUsageStatsReportPlugin.inc.php) is there.
I think they moved that to a new independent repository. Did you install using git?
edit: no sorry, actually 3.1.1 stable should still have that in the OJS package, so the submodule is probably planned for 3.2 GitHub - pkp/usageStats
ping @asmecher this is not solved although answered…
I’m also seeing this on one of our 3.1.1 installs. From what I can tell, defaultMetricType is just null but should be ojs::counter which I assume is supplied by the plugin, but the plugin doesn’t show despite it being right there in the code.
Hmmm… this is strange… That report plugin should be there. I only once heard from an user (@Lazar_Stosic) a similar issue – for some reason that report plugin could not be registered correctly at/for the page Tools > Statistics… I couldn’t figured out then why is this happening Especially because I cannot reproduce it, and as I said I only heard of the similar issue once… I’ll take a new look into it…
I made two new installations (IJS-3.1.1-4) on two different servers and the result (one is okay, the other is missing the report plugin as well) suggests that it is dependent on the server. I’ll try to find out what the difference is.
On the server with the report plugins missing, I have two other OJs 3 installations where the report plugin works fine (both OJS 3.1.1-2).
Thanks a lot @carola! Any debugging i.e. trying to figure out why is this happening would be great! Because I cannot reproduce it I cannot debug it properly…
I still have no idea what causes the problem. I have
Server 1: Report works for all installations
Server 2: Report works for OJS 2 installations and for OJS 3 installations up to 3.1.1-2, but not for 3.1.1-4
On Server 2 I upgraded an OJS 2.4.8-Installation where the report worked fine, and after the installation, the report plugin vanished from the plugin list. So it seems to be the combination of server and OJS-Version.
I upgraded npm and the OJS 3.1.1-4 installation on Server 2, but it did not help.
Do you have any other idea what to test or how I can try to reinstall the plugin to get an error message? Tools/installPluginVersion.php does not work for the Usage Stats Plugin.
now it works for one of the installations, but I am not sure why. I deleted the entry in the versions table and ran the upgrade again. This did not work at once, but at some point I could load the report.
Still, the entry in the versions table is not correct:
I think our situation is somewhat similar to that of @carola. For what it’s worth, we have the standard “Articles Report”, “COUNTER Reports”, “Review Report” and “View Report” installed and enabled. Hope that helps.
in an installation where the plugin was installed correctly, there are entries for the report plugin and the block plugin. I don’t know if this makes a difference.
update versions set product=‘_usageStats’ where product=‘usageStats’;
Then reload the plugins page and everything’s as it should be.
Edit to hypothesize: This is a 3.1.1.2 installation that was upgraded from 2.4.8. Seeing multiple entries in the versions table for the same plugin, and from reading through the plugin code, it looks like the plugins are scanned fairly continuously. So removing (or renaming) the entries in the versions table should result in a fresh scan of the plugins, which it seems is what happened. Here’s the versions table after the rescan:
Hmmm… I have to admit that I am a little bit confused :-\ I have two OJS 3 installations: one has only one entry for the plugins.generic usageStats, and the other has three for plugins.generic, plugins.report and plugins.blocks. And they both work well for me
Thanks for reporting the solution @rm_is_too_short! @carola, when you just leave the plugins.generic DB entry in the installation that is not working i.e. when you proceed like @rm_is_too_short, does this solve the problem?
for me, everything works fine now. As I wrote above, it worked after deleting the entries in the versions table an running the upgrade script. I don’t know if it makes a difference that the report and the block plugin are not listed in the versions table. Currently I do not notice any differences in the frontend.
I did not find out why the report plugin was not installed correctly during the main installation. I will wait and see if this happens again when running a new installation on that server.