OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



ALM Plugin

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Re: ALM Plugin

Postby tarcisiop » Fri Jun 06, 2014 5:16 am

Juan,

Has an article shared on facebook as a way to test a few days ago.
But still shows no sharing.

There is some relation to the problem of API reported above?

Tarcisio Pereira.
tarcisiop
 
Posts: 35
Joined: Mon Apr 14, 2014 12:22 pm

Re: ALM Plugin

Postby piotreba » Sun Jun 22, 2014 2:17 pm

For one of our journal partial statistics has appeared – only PDF Views. For other journals still no statistics are present. Is it atill a matter of initial stage of this project?

Secondly, do I have to enable "Article View Counts (for Authors only)" in Stats and Reports for PDF Views in Article Metrics to be add up? The Article View Counts seems to not working at all.



Cheers,

Peter
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby bbeghelli » Mon Jun 23, 2014 9:22 am

Hi piotreba,

I can try to help with the pdf downloads part: it doesn't need to enable the "Article view counts". It should be presenting the data by default.

What you need to make sure is that your OJS is gathering and processing the usage metrics. This is done by the usage stats plugin. It should be activated, and also the acron plugin should be activated if you don't have a cron job running to process the stats.

Can you check those settings?

Also, if everything is ok, check your ojs files folder, at usageStats/archive and see if there is any files there. If yes, it's because the system is processing your stats. After that, check if the metrics table has records.

Now, related to what you said about the article view counts. What you mean it seems not be working at all?

I'll wait for your answers. Thanks,

Bruno
bbeghelli
 
Posts: 118
Joined: Tue Jun 25, 2013 2:22 pm

Re: ALM Plugin

Postby piotreba » Tue Jun 24, 2014 2:21 am

Hey Bruno, thanks for hints.

So:
- usage stats plugin is activated,
- I use cron to run runScheduledTasks.php, is it enough to process statistics?
- usageStats/archive is empty, but usageStats/usageEventLogs includes logs,
- metrics table is not empty.


What I meant with the "Article View Counts seems to not working at all" is that abstracts views (Summary page) as well as PDF views (Editing page of the submission) shows "0".

The Article Metrics shows PDF downloads (only for one journal) just until February.



Thanks,
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby bbeghelli » Tue Jun 24, 2014 2:44 pm

Hi piotreba,

The system is not processing the files. We have to know why. Which version of OJS are you using? The last 2.4.4-1? If yes, can you apply the recommended patches here: http://pkp.sfu.ca/wiki/index.php?title= ... ed_Patches ?

After applying the patches, add this entry into your config.inc.php file:
Code: Select all
scheduled_tasks_report_error_only = On


You will start to receive emails about the scheduled tasks execution, not only related to errors. This can help to debug what's going on in your installation. The used email will be your administrator email, configured on the site settings page.

Let me know if you can do this.

Regards,
Bruno
bbeghelli
 
Posts: 118
Joined: Tue Jun 25, 2013 2:22 pm

Re: ALM Plugin

Postby piotreba » Tue Jun 24, 2014 2:50 pm

Hey Bruno, yes, I use the latest version of OJS: 2.4.4.1.

Ok, let me apply the patches and I will let you know what is happening then.



Best wishes.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby piotreba » Wed Jun 25, 2014 2:36 am

Dear Bruno,


I stuck on the following patch: Bug #8785 – patch against pkp library. The file lib/pkp/classes/scheduledTask/ScheduledTask.inc.php does not contain parts that are to be replaced by the patched code such as:

Code: Select all
- function execute($notifyAdmin = true) {


or

Code: Select all
-      if ($notifyAdmin) {
-         $helper =& $this->getHelper();
-         $helper->notifyExecutionResult($this->_processId, $this->getName(), $result, $this->_getLogMessage());
-      }



am I looking at the wrong file?
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby piotreba » Wed Jul 23, 2014 3:20 am

So applying the Bug #8785 (patch against pkp library) fails:

Code: Select all
patching file classes/scheduledTask/ScheduledTask.inc.php
Hunk #1 FAILED at 120.
Hunk #2 FAILED at 128.
2 out of 2 hunks FAILED -- saving rejects to file classes/scheduledTask/ScheduledTask.inc.php.rej
patching file classes/scheduledTask/ScheduledTaskHelper.inc.php
Hunk #1 FAILED at 134.
1 out of 1 hunk FAILED -- saving rejects to file classes/scheduledTask/ScheduledTaskHelper.inc.php.rej
patching file tests/classes/scheduledTask/ScheduledTaskHelperTest.php
Hunk #1 FAILED at 20.
1 out of 1 hunk FAILED -- saving rejects to file tests/classes/scheduledTask/ScheduledTaskHelperTest.php.rej



I noticed that OJS creates files in the cache directory, such as fc-alm-862.php. From the name I assume it is something with alm plugin? But in general, need help to work it out, why the logs, which are generated continuously in the usageStats/usageEventLogs, are not being processed.



Cheers,

Peter
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby piotreba » Fri Jul 25, 2014 2:44 am

Checking back again,


I have just applied the updated patches from the Bug 8785, so now all the patches for OJS 2.4.4-1 have been applied.

I executed runScheduledTasks.php but no email has come and the usageStats/archive is still empty.


Any idea where to seek for issues?



Cheers,

Peter
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby tarcisiop » Fri Jul 25, 2014 4:23 am

I had similar problems, you could check the permissions on the folders?
In my case it was an issue related to database problem.
my installation did not even generated logs.


Tarcisio Pereira
tarcisiop
 
Posts: 35
Joined: Mon Apr 14, 2014 12:22 pm

Re: ALM Plugin

Postby piotreba » Fri Jul 25, 2014 5:25 am

Hey Tarcisio,


did you manage to fix it?

Concerning folder permissions, the permission for the usageStats/archive is the same as for the usageStats/usageEventLogs, which is populated by the OJS with logs, so I suppose it is not the problem?



Thanks,
Peter
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby tarcisiop » Fri Jul 25, 2014 5:52 am

Hello,
My problem was solved by activating the plugin directly in the database with the command:
update versions set current = 1 where product like '%usageStats%';
For some reason, was disabled.

After it started working again.

To force the OJS to reprocess the logs is necessary to run the command:
php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml

However, it is necessary that the table "scheduled_tasks" in last_run the field for plugins.generic.usageStats.UsageStatsLoader task has a range of at least 24, otherwise nothing is done.
In my case, I stopped apache, changed the date to a week ago in last_run , I ran the command, I started the apache and waited for the end of processing.

Maybe this can help you.
tarcisiop
 
Posts: 35
Joined: Mon Apr 14, 2014 12:22 pm

Re: ALM Plugin

Postby piotreba » Fri Jul 25, 2014 9:43 am

Ok, I run the command

Code: Select all
php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml


but nothing happened. I have the acron plugin enabled too. I can detect the today log file in the usageStats/usageEventLogs updates, but other folders in the usageStats are still empty. The log files weight rarely over 1 000 000 bytes.

current was 1 where product = usageStats in my case.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: ALM Plugin

Postby bbeghelli » Wed Aug 20, 2014 3:19 pm

Hi Peter,

Just to make sure other users can benefit from your experience, I think you solved this issue making sure that permissions are ok for both the users (the one that runs the scheduled tasks tool and the one that runs php). Is that correct?

Thanks,
Bruno
bbeghelli
 
Posts: 118
Joined: Tue Jun 25, 2013 2:22 pm

Re: ALM Plugin

Postby piotreba » Thu Aug 21, 2014 12:45 am

Bruno,


It indeed seems in my case it is not a problem of the folder permissions. I haven't fixed it yet, still investigating what is wrong with auto staging (I am able to do it manually).

Thank you Bruno for your help.


Peter
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

PreviousNext

Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 1 guest