Sometimes, when we try to access the plugins manager pages, we get a blank page.
On the php log we get the following track:
[Wed Mar 30 15:23:01 2016] [error] [client xx.xxx.xx.xx] ojs2 has produced an error
Message: WARNING: assert() [<a href='function.assert'>function.assert</a>]: Assertion failed
In file: /~/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php
At line: 241
Stacktrace:
File: (unknown) line (unknown)
Function: PKPApplication->errorHandler(2, "assert() [<a href='function.assert'>function.assert</a>]: Assertion failed", "/~/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php", 241, Array(7))
File: /~/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php line 241
Function: assert(False)
File: /~/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php line 121
Function: PluginRegistry->_instantiatePlugin("reports", "plugins/reports", "counter")
File: /~/ojs/pages/manager/PluginHandler.inc.php line 53
Function: PluginRegistry->loadCategory("reports")
File: (unknown) line (unknown)
Function: PluginHandler->plugins(Array(0), Object(Request))
File: /~/ojs/lib/pkp/classes/core/PKPRouter.inc.php line 362
Function: call_user_func(Array(2), Array(0), Object(Request))
File: /~/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 220
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)
File: /~/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))
File: /~/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 178
Function: Dispatcher->dispatch(Object(Request))
File: /~/ojs/index.php line 64
Function: PKPApplication->execute()
Server info:
OS: Linux
PHP Version: 5.2.9
Apache Version: Apache/2.2.0 (Fedora) mod_perl/2.0.4 Perl/v5.10.0
DB Driver: mysql
DB server version: 5.6.14-log
Hi @rafaelmansilha,
is always
_instantiatePlugin("reports", "plugins/reports", "counter")
part of that stack-trace in you log files?
Or are there other parameters to that function that do cause the problem as well?
What is the content of the
plugins/reports/counter
directory inside your OJS installation?
Greetings
Hermann
Hi @hermann,
_instantiatePlugin("reports", "plugins/reports", "counter")
is always part of that stack-trace in my log files.
As I’ve said, it happens sometimes, but quite often.
The Content on plugins/reports/counter
is:
plugins/reports/counter/:
classes counter_monthly_log_1_1.xml CounterReportPlugin.inc.php index.php locale templates version.xml
plugins/reports/counter/classes:
COUNTER CounterReport.inc.php LegacyJR1.inc.php reports
plugins/reports/counter/classes/COUNTER:
COUNTER.php LICENSE.txt README.md
plugins/reports/counter/classes/reports:
CounterReportAR1.inc.php CounterReportJR1.inc.php
plugins/reports/counter/locale:
ar_IQ ca_ES cs_CZ da_DK de_DE el_GR en_US es_ES eu_ES fa_IR fr_CA fr_FR hr_HR id_ID it_IT ja_JP nl_NL no_NO pt_BR pt_PT ro_RO ru_RU sr_SR tr_TR uk_UA vi_VN zh_CN zh_TW
plugins/reports/counter/locale/ar_IQ:
locale.xml
plugins/reports/counter/locale/ca_ES:
locale.xml
plugins/reports/counter/locale/cs_CZ:
locale.xml
plugins/reports/counter/locale/da_DK:
locale.xml
plugins/reports/counter/locale/de_DE:
ar1.xml jr1.xml locale.xml
plugins/reports/counter/locale/el_GR:
locale.xml
plugins/reports/counter/locale/en_US:
ar1.xml jr1.xml locale.xml
plugins/reports/counter/locale/es_ES:
locale.xml
plugins/reports/counter/locale/eu_ES:
locale.xml
plugins/reports/counter/locale/fa_IR:
locale.xml
plugins/reports/counter/locale/fr_CA:
locale.xml
plugins/reports/counter/locale/fr_FR:
locale.xml
plugins/reports/counter/locale/hr_HR:
locale.xml
plugins/reports/counter/locale/id_ID:
locale.xml
plugins/reports/counter/locale/it_IT:
locale.xml
plugins/reports/counter/locale/ja_JP:
locale.xml
plugins/reports/counter/locale/nl_NL:
locale.xml
plugins/reports/counter/locale/no_NO:
locale.xml
plugins/reports/counter/locale/pt_BR:
locale.xml
plugins/reports/counter/locale/pt_PT:
locale.xml
plugins/reports/counter/locale/ro_RO:
locale.xml
plugins/reports/counter/locale/ru_RU:
ar1.xml jr1.xml locale.xml
plugins/reports/counter/locale/sr_SR:
locale.xml
plugins/reports/counter/locale/tr_TR:
locale.xml
plugins/reports/counter/locale/uk_UA:
locale.xml
plugins/reports/counter/locale/vi_VN:
locale.xml
plugins/reports/counter/locale/zh_CN:
locale.xml
plugins/reports/counter/locale/zh_TW:
locale.xml
plugins/reports/counter/templates:
index.tpl reportxml.tpl soaperror.tpl sushixml.tpl
The new version of the Counter plugin requires PHP 5.3 or better. I see you are at PHP 5.2.9.
Can you update PHP to a later 5.x release?
There is a bit of code in the new plugin which is intended to disable the plugin rather than allow for a fatal error. I’ll check to see why that is not performing as expected.
1 Like
Hi @ctgraham,
I was suspecting that it would be related to the php version. We intend to update, but it’s tricky because it affects other applications.
Thanks for your support!
In the meantime, try this patch:
https://github.com/ulsdevteam/ojs/commit/cac139b98a58f122d15c9dbdb458e6c446104cda.patch
Report if it works for you so I can request it in core.