Statistics chart plugin not running

Hello i use the plugin Statistics Chart plugin, it give a report in offline xampp but when i uploaded it online server ubuntu 14.0, the statistics metrics did not give any data anymore,I also try to generate report in stats and reports > view reports generate no data can you help me how to fixed it.
this is my link in statistics :

I open the UsageStats > archive > usage_events_20161007.log (sample link:)
directory reject > no file
directory proccessing > no file
directory stage> no file
directory usageEventLogs> 2 file from yesteday and today

inside: scheduledTaskLogs
[2016-10-07 23:58:24] [Notice] Task process started.
[2016-10-07 23:58:24] [Notice] File this-sample-link*/usage_events_20161006.log was processed and archived.
[2016-10-07 23:58:24] [Notice] Task process stopped.

i already try this: My published file views or statistics reports shows no data. What do I do?

version: ojs

Thanks in advance:

Hi @lewfolui,

What is the result when you run this query:

SELECT * FROM metrics WHERE metric_type = "ojs::counter";

Can you paste one line of the usage_events_20161007.log file here? Also, what’s your base_url setting into the file?



This is what i get

echo “\n”.$user->load_id;
echo “\n”.$user->assoc_type;
echo “\n”.$user->day;
echo “\n”.$user->region;
echo “\n”.$user->country_id;

output: usage_events_20160925.log 256 20160925 PH

I dont know how it process last september 25 but no data, i upload and try to view some article i upload.



Not sure how you managed to get the text you posted previously, but I was trying to ask you to run a query directly into the database server. Can you log in into that and run the query I passed above?

Also not sure if you pasted one entire line of the usage_events_20161007.log file. It could be helpful to check if your base_url setting is fine.

Try to retrieve those 3 informations (database query result, one line of the archived file and your base_url setting inside the file) and I can try to help you.


This the 1st line of usage_events_20161007.log: - - “2016-10-07 01:34:25” 200 “Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36”

; The canonical URL to the OJS installation (excluding the trailing slash)
base_url = “


Can you remove the 'index.php ’ part of your base_url setting and try to reprocess the archived file again?

To reprocess, you can move the file from archived to stage folder, and then run:

php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml



I just added the ‘index.php’ about 2hours ago. my base_url before is:

base_url = "

I cant run the process now, because i don’t have an access to server control panel, ill be back later if it solve the problem. I’ll contact first the server administrator.

(Code remove…)
(link updated)



Also, don’t forget to remove the trailing slash from the base_url. It should be something like this:

base_url = ""

I can’t provide support on the code you posted, but it seems, looking at the result page, there’s data inside the metrics table. It is older data though, it’s not related to the usage_events_20161007.log archived file. It is from usage_events_20160925.log file. Is this back to the time when the system was running locally?



I cant move the log file, it say access denied when i am trying to move it to stage folder. is this normal permission of a logfile ‘644’ ?



Yes, the permission is ok. You will probably need to use the same user that your web server is using to create that file, or use the root user to move that.

hello @beghelli

The View Report is the only one that is not working. .

View Report
This plugin implements a CSV report describing readership for each article.

it gives no data, and i dont know why.

but some other report like
-Review Report
-Timed Views Report
-Articles Report
-COUNTER Reports

-OJS usage statistics report:


Hi @lewfolui,

That’s ok. This report in particular will try to use, by default, the statistics data that was gathered before version 2.4.2. If you want to generate this report using the current statistics data that the system is processing now you can follow this documentation:



Hello @beghelli

Thank you for the documentation link, it helps me a lot, now i am working to code my own report generator because i think there something wrong in the VIEWS REPORT generator and also the Custom Report keeps on loading i need to show the the views and download of every articles as requested by the university, asap. This is my sample output if im not wrong assoc_type 257 is for article abstract view and assoc_type 260 is for pdf download?


Lewfolui (Roy)


You’re right about the assoc types. Just make sure to think about the type of the galleys also. Your journal can have only PDF ones, but if it also includes HTML galleys, for example, you will have to separate that using the file type column in the reports.

But I would try to debug and find out why the report generator is not working for you. It has a lot of potential to generate custom reports and if you end up coding your own, you will probably duplicate a lot of things.

Also, the COUNTER report plugin can give you the numbers you need. Did you tried that?


Thanks @beghelli

i found out the reason, why the Custom Report Generator continue loading, it is when i used the BOOTSTRAPISH theme plugin that i download in your old forum. Is my issue happen with some other user?

i remove this line and the Generate Custom Report works now.

// Add in jQuery from CMS
$jQueryCMS = ’ ';
$additionalHeadData = $templateMgr->get_template_vars(‘additionalHeadData’);
$templateMgr->assign(‘additionalHeadData’, $additionalHeadData."\n".$jQueryCMS);

the only problem i am facing now is the View Reports and the Statistics Chart Plugin,
I try to change the in my offline Journal into my Online Web Server Remote Host database it give an ouput

offline using xampp and using online database

online server using online database no output,

Can you help me here sir,

Thanks for you help,


It seems that your server doesn’t have all the files that the plugin needs to run the chart. Check if all the plugin files are correctly created on the server.

Also, as far as I know, this plugin is not adapted to use the new metrics structure that stores all stats information since OJS 2.4.3. By default, it will try to load data from counter table, which doesn’t exists anymore. Did you see this topic at the old forum: ?


Hello @beghelli it is working fine now. Our old server does not support the OJS, so we decided to move to other server, everything work greats now. thanks for your help anyway.