OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Statistics report generation OMP 1.1 errors

Are you responsible for making OMP work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, asmecher

Forum rules
What to do if you have a technical problem with OMP:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OMP Discussion subforum; if you have a development question, try the OMP Development subforum.

Statistics report generation OMP 1.1 errors

Postby rootl » Wed Mar 19, 2014 5:43 am

Greetings,

I have been testing the Statistics framework with both our upgraded instance of OMP and with a clean install instance of OMP 1.1.
Events are properly saved to the usage_events log file in each OMP instance's respective "..uploads\usageStats\usageEventLogs" directory.
However, the "Report Generator" screen just stalls for both instances - the "loading" animation goes on indefinitely.

I checked our server error logs and these are the errors that consistently show:

omp: Invalid metric type., referer: *path-to-OMP-instance*/management/tools/reportGenerator

NOTICE: Undefined offset: 2 (*path-to-OMP-instance*\\lib\\pkp\\plugins\\generic\\usageStats\\PKPUsageStatsLoader.inc.php:175)

NOTICE: Undefined variable: assocId (*path-to-OMP-instance*\\lib\\pkp\\plugins\\generic\\usageStats\\PKPUsageStatsLoader.inc.php:180)

We are running Apache2.2 on Windows 2008 server. PHP Version 5.3.18

Thanks.
rootl
 
Posts: 62
Joined: Wed Feb 20, 2013 7:17 am

Re: Statistics report generation OMP 1.1 errors

Postby bbeghelli » Wed Mar 19, 2014 12:04 pm

Hi rootl,

The fatal error 'Invalid metric type' means that you are trying to open the report generator page without having a report plugin that implements a metric type. It shouldn't be the case, since OMP have the usage stats plugin that implements the omp::counter metric type.

Can you make sure that the usage stats plugin is installed? First, check its files in plugins/generic/usageStats and also in lib/pkp/plugins/generic/usageStats. After, do a select on both versions table and plugin settings table and search for entries related to the usage stats plugin. It should have entries on both tables.

The notices you have doesn't affect the processing, and I fixed them now. You can apply this patch: https://github.com/pkp/pkp-lib/commit/7 ... 19f1e.diff

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

Re: Statistics report generation OMP 1.1 errors

Postby rootl » Thu Mar 20, 2014 6:21 am

Greetings,

Thanks very much. I did apply the patch.

Here is more information for you:

In both the "Clean" version and our upgrade":

plugins/generic/usageStats directories and files exist.

In the databases:
versions: there are entries for usageStats. "sitewide" is enabled.
plugin_settings: there are entries for usagestatsplugin. "enabled", "createlogfiles" are enabled. "accessLogFilesParseRegex" has default regex settings. "minTimebetweenRequests" is 0.

When logged as admin:
*path-to-omp*/index.php/index/admin/settings >> Plugins Tab >> "Generic Plugins," User Statistics and User Events are checked and enabled.

*path-to-omp*/index.php/*individual-press-name*/management/settings/website >>Plugins Neither of these plugins are visible in the list of plugins. From what I see with OMP, typically sitewide plugins show up in individual Press Site settings, but are not editable.

So it appears the plugins are installed and recognized by the db and OMP, but the report generation is not working.

Please let me know what else to do. Thanks.
rootl
 
Posts: 62
Joined: Wed Feb 20, 2013 7:17 am

Re: Statistics report generation OMP 1.1 errors

Postby bbeghelli » Mon Mar 24, 2014 11:21 am

Hi guys,

I tested everything again, and beside the warnings already fixed, it works here.

Can you please open the statistics report generator page with any js debugger tool so you can see if there is any warning? An example would be to use the last firefox, press SHIFT + F2 (to open the web console) and open the report generator page. Any warning or error should appear there.

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

Re: Statistics report generation OMP 1.1 errors

Postby rootl » Mon Mar 24, 2014 3:55 pm

Greetings Bruno,

Thank you so much for looking into this.

For *both* Clean OMP 1.1 and the upgraded 1.1 instances:

Firefox (latest) Firebug Javascript Console:
Use of getAttributeNode() is deprecated. Use getAttribute() instead. jquery.min.js:54
Use of attributes' nodeValue attribute is deprecated. Use value instead. jquery.min.js:54
Use of attributes' specified attribute is deprecated. It always returns true.


Chrome Javascript Console:
Uncaught TypeError: Cannot call method 'create' of undefined


I will try to run some other debugging tools and see what comes up. Thanks.
rootl
 
Posts: 62
Joined: Wed Feb 20, 2013 7:17 am

Re: Statistics report generation OMP 1.1 errors

Postby stefan » Tue Mar 25, 2014 11:23 am

Hi,

I tried to apply the patch, b ut it said:

patch -p1 < ~/8000.diff
patching file plugins/generic/usageStats/PKPUsageStatsLoader.inc.php
Hunk #1 FAILED at 175.
Hunk #2 FAILED at 472.
2 out of 2 hunks FAILED -- saving rejects to file plugins/generic/usageStats/PKPUsageStatsLoader.inc.php.rej


more plugins/generic/usageStats/PKPUsageStatsLoader.inc.php.rej
--- plugins/generic/usageStats/PKPUsageStatsLoader.inc.php
+++ plugins/generic/usageStats/PKPUsageStatsLoader.inc.php
@@ -175,6 +175,8 @@
list($assocType, $contextPaths, $page, $op, $args) = $this->_getUrlMatches($entryData['url']);
if ($assocType && $contextPaths && $page && $op) {
list($assocId, $assocType) = $this->getAssoc($assocType, $contextPaths, $page, $op, $args);
+ } else {
+ $assocId = $assocType = null;
}

if(!$assocId || !$assocType) continue;
@@ -472,7 +474,7 @@
if ($pageAndOpMatch) {
return array($workingAssocType, $contextPaths, $page, $operation, $args);
} else {
- return array();
+ return array(null, null, null, null, null);
}
}


Best
Stefan
stefan
 
Posts: 81
Joined: Wed Feb 06, 2013 1:49 pm

Re: Statistics report generation OMP 1.1 errors

Postby asmecher » Tue Mar 25, 2014 11:51 am

Hi Stefan,

Try applying that patch from within the lib/pkp subdirectory. (I make heavy use of the --dry-run option to test patches before applying them -- it'll save having to back out a partially-applied patch if part of it fails.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8842
Joined: Wed Aug 10, 2005 12:56 pm

Re: Statistics report generation OMP 1.1 errors

Postby stefan » Tue Mar 25, 2014 12:04 pm

Thanks a lot for both hints!

That worked.

Best

Stefan
stefan
 
Posts: 81
Joined: Wed Feb 06, 2013 1:49 pm

Re: Statistics report generation OMP 1.1 errors

Postby bbeghelli » Wed Mar 26, 2014 9:35 am

Hi rootl,

The warnings you have in firefox console are related to the jquery library, and they aren't an issue.

The message in chrome console I couldn't replicate.

I don't have windows 2008 server, but I can try testing in my windows installation using apache to run the system. I will post here news about it.
bbeghelli
 
Posts: 118
Joined: Tue Jun 25, 2013 2:22 pm

Re: Statistics report generation OMP 1.1 errors

Postby rootl » Wed Apr 02, 2014 7:12 am

Greetings Bruno,

Any updates with testing on Windows 2008 server?

All OMP 1.1 patches are applied and everything else functions nicely on our instances. The statistics problem is the only thing keeping us from upgrading the production server.

I can send you a database dump and anything else you need if it will help you diagnose the problem.

Thank you.
rootl
 
Posts: 62
Joined: Wed Feb 20, 2013 7:17 am

Re: Statistics report generation OMP 1.1 errors

Postby bbeghelli » Wed Apr 09, 2014 3:58 am

Hi rootl,

A database dump would be perfect. Can you send it to me?

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

Re: Statistics report generation OMP 1.1 errors

Postby bbeghelli » Wed Apr 16, 2014 11:40 am

Hi rootl,

I tested here with windows xp and IE8, and the report generation page opens normally. As I said, I don't have a windows 2008 server to test it, so I can't test exactly in your environment. I am not sure if I asked that before, but do you have any error log messages?

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

Re: Statistics report generation OMP 1.1 errors

Postby rootl » Fri Apr 18, 2014 7:41 am

Greetings Bruno,

I mentioned log errors earlier and applied the patches for them. I have emailed you the latest log files. Please let me know if there is anything we are overlooking.

We are not able to download the stats from within our university network no matter what OS or browser the 'end user' is using.

I am going to try at home and elsewhere. Thanks.
rootl
 
Posts: 62
Joined: Wed Feb 20, 2013 7:17 am

Re: Statistics report generation OMP 1.1 errors

Postby Radek » Fri Jul 04, 2014 4:35 am

Hi,

I have same problem. The report generator doesn't load when I try it. <http://omp.ics.muni.cz/index.php/munipress/management/tools/reportGenerator>. It doesn't work on my local server either. Any progress with this error? If you want a login to this instalation, I will send you a PM.

Error in apatche-error log file: omp: Invalid metric type., referer: http://omp.ics.muni.cz/index.php/munipr ... tGenerator

Thank you very much.
Regards
Radek
Radek
 
Posts: 48
Joined: Mon Jun 23, 2014 3:24 am

Re: Statistics report generation OMP 1.1 errors

Postby Radek » Tue Jul 08, 2014 3:02 am

Hi,

when I set
show_stacktrace = On
display_errors = On
deprecation_warnings = On
it shows me this error on the report generator page (my local server Wamp)

Code: Select all
CAUGHT EXCEPTION: Declaration of PKPAcronPlugin::manage() should be compatible with GenericPlugin::manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = NULL) (C:\local_servers\wamp\www\omp\lib\pkp\plugins\generic\acron\PKPAcronPlugin.inc.php:23)
CAUGHT EXCEPTION: Declaration of ReportPlugin::manage() should be compatible with Plugin::manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = NULL) (C:\local_servers\wamp\www\omp\lib\pkp\classes\plugins\ReportPlugin.inc.php:181)
CAUGHT EXCEPTION: Declaration of PKPUsageStatsReportPlugin::display() should be compatible with ReportPlugin::display($args) (C:\local_servers\wamp\www\omp\lib\pkp\plugins\generic\usageStats\PKPUsageStatsReportPlugin.inc.php:19)
CAUGHT EXCEPTION: Declaration of ManagementHandler::authorize() should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) (C:\local_servers\wamp\www\omp\lib\pkp\pages\management\ManagementHandler.inc.php:18)
CAUGHT EXCEPTION: Declaration of BrowseBlockPlugin::getContents() should be compatible with BlockPlugin::getContents(&$templateMgr, $request = NULL) (C:\local_servers\wamp\www\omp\plugins\blocks\browse\BrowseBlockPlugin.inc.php:18)
omp has produced an error Message: USER NOTICE: Deprecated call without request object. In file: C:\local_servers\wamp\www\omp\lib\pkp\classes\template\PKPTemplateManager.inc.php At line: 364 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(1024, "Deprecated call without request object.", "C:\local_servers\wamp\www\omp\lib\pkp\classes\template\PKPTemplateManager.inc.php", 364, Array(1)) File: C:\local_servers\wamp\www\omp\lib\pkp\classes\template\PKPTemplateManager.inc.php line 364 Function: trigger_error("Deprecated call without request object.") File: C:\local_servers\wamp\www\omp\lib\pkp\pages\management\PKPToolsHandler.inc.php line 138 Function: PKPTemplateManager::getManager() File: C:\local_servers\wamp\www\omp\lib\pkp\pages\management\PKPToolsHandler.inc.php line 57 Function: PKPToolsHandler->reportGenerator(Array(0), Object(Request)) File: (unknown) line (unknown) Function: PKPToolsHandler->tools(Array(1), Object(Request)) File: C:\local_servers\wamp\www\omp\lib\pkp\classes\core\PKPRouter.inc.php line 372 Function: call_user_func(Array(2), Array(1), Object(Request)) File: C:\local_servers\wamp\www\omp\lib\pkp\classes\core\PKPPageRouter.inc.php line 228 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: C:\local_servers\wamp\www\omp\lib\pkp\classes\core\Dispatcher.inc.php line 134 Function: PKPPageRouter->route(Object(Request)) File: C:\local_servers\wamp\www\omp\lib\pkp\classes\core\PKPApplication.inc.php line 197 Function: Dispatcher->dispatch(Object(Request)) File: C:\local_servers\wamp\www\omp\index.php line 64 Function: PKPApplication->execute() Server info: OS: WINNT PHP Version: 5.5.12 Apache Version: Apache/2.4.9 (Win64) PHP/5.5.12 DB Driver: mysql DB server version: 5.6.17


and on the server its:
Code: Select all
omp has produced an error Message: USER NOTICE: Deprecated call without request object. In file: /opt/omp/lib/pkp/classes/template/PKPTemplateManager.inc.php At line: 364 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(1024, "Deprecated call without request object.", "/opt/omp/lib/pkp/classes/template/PKPTemplateManager.inc.php", 364, Array(1)) File: /opt/omp/lib/pkp/classes/template/PKPTemplateManager.inc.php line 364 Function: trigger_error("Deprecated call without request object.") File: /opt/omp/lib/pkp/pages/management/PKPToolsHandler.inc.php line 138 Function: PKPTemplateManager::getManager() File: /opt/omp/lib/pkp/pages/management/PKPToolsHandler.inc.php line 57 Function: PKPToolsHandler->reportGenerator(Array(0), Object(Request)) File: (unknown) line (unknown) Function: PKPToolsHandler->tools(Array(1), Object(Request)) File: /opt/omp/lib/pkp/classes/core/PKPRouter.inc.php line 372 Function: call_user_func(Array(2), Array(1), Object(Request)) File: /opt/omp/lib/pkp/classes/core/PKPPageRouter.inc.php line 228 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: /opt/omp/lib/pkp/classes/core/Dispatcher.inc.php line 134 Function: PKPPageRouter->route(Object(Request)) File: /opt/omp/lib/pkp/classes/core/PKPApplication.inc.php line 197 Function: Dispatcher->dispatch(Object(Request)) File: /opt/omp/index.php line 64 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.4.4-14+deb7u11 Apache Version: Apache DB Driver: mysql DB server version: 5.5.37-0+wheezy1
Radek
 
Posts: 48
Joined: Mon Jun 23, 2014 3:24 am

Next

Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests