we just upgraded (successfully) to OJS 3.0.1 (from 3.0.0) but our runScheduledTasks.php cron job failed with PHP Fatal error: Call to undefined method ScheduledTaskTool::ScheduledTaskTool() in /opt/ojs3/tools/runScheduledTasks.php on line 28.
I had a look and it seems that commit 4772e4afa3463d8ab0b7d8f3df03f70db0f90add broke things with the modern constructor syntax. ScheduledTaskTool.inc.php went from version 3.0.0 to 3.0.1 renaming ScheduledTaskTool to __construct but file runScheduledTasks.php was not updated accordingly (the call is still for function ScheduledTaskTool instead of __construct). Calling __construct instead of ScheduledTaskTool in runScheduledTasks.php fixes the problem (and is the appropriate solution as far as I can tell).
If this is the case I’d be happy to make a PR, let me know. Cheers, Nikos
After adopting this fix scheduled tasks started to work. But now I see that geoip is not saving in the metrics database table. Was it somehow changed in 3.0.1? I remember that in 3.0.0 it was necessary to deactivate php geoip because of conflicts with ojs plugin codes. Do I need to activate it again?
Just to double check: there were geo information int the table metrics in OJS 3.0 but there are no in 3.0.1, right?
And you have not changed the usage statistics plugin settings options i.e. data privacy, or city and region option?
Yes, I think your are right about the documentation, @bozana. Information about the Geo Stats tool made it into the UPGRADE documentation, but not into the INSTALL documentation.
Since download and using the tool requires an additional license agreement, this shouldn’t happen automatically, but it could be incorporated into the plugin’s settings, perhaps here:
Yep, Plugin worked in OJS 3.0. All data about geo is in the metrics table, except after upgrading to 3.0.1. I had not changed anything in the plugin options.
It must be added that after upgrade I have noticed another problem. For our new article stats data are not displayed at front-end by usage statics plugin. I know that there were >10 views, because I had provided the link to it on this forum as an example of bootstrap html galley styling and see the views count. For articles that were published before upgrade stats data are increasing as usual. Metrics table except geo data is also working as usual. @bozana where do you think the problem can be?
Greetings @bozana,
This file is present in the mentioned directory. So after upgrade I see 2 problems. Geo ip data isn’t recording in the metrics table. And statistics chart is not displaying at front-end for the newly published article. I am wondering how latter is possible. Stat data are successfully recorded in the metrics table and are normally counted for articles published before upgrade.
What are you using to display the statistics chart on the front end? Is this a plugin, or a code change? I’m not familiar with native functionality which will do that.
Could you maybe post/send a few rows from your table metrics – a few for the article, that has the statistics displayed and a few for the article, that has no statistics displayed?
I’ve just tested both features on my local installation, Geo and statistics display and both worked well here To get the Geo DB I did exact the same steps as described here: ojs/UPGRADE at ojs-stable-2_4_8 · pkp/ojs · GitHub. I.e. the folder where the Geo DB has to be is plugins/generic/usageStats/ and not in the lib/pkp/... as I first thought.
Also, I see the statistics graph on the article page, I accessed today.
Thus, I am not sure what is going on on your installation
I am using current master branch but it should be the same as 3.0.1. I will test it also with the ojs-stable-3_0_1 branch.
Do you have IP addresses in your recent usage stats log files (you will find them in your files folder under usageStats/. Already processed files you will find there in the folder archive/ and the most recent log files in usageEventLogs/)?
Could you maybe print out the Geo DB file name/path and if the file is find here: pkp-lib/GeoLocationTool.inc.php at ojs-stable-3_0_1 · pkp/pkp-lib · GitHub? – to be sure that the system finds it.
I have no idea why the graph is not displaying, if the statistics data are in the metrics table :-\ Could you post me some rows from the metrics table, for which the graph is not showing?