Se queda cargando el panel de control del entorno OJS en su version 3.2.1.4 Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112

Me aparece el sigueinte error en mi registro de errores: PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
Estoy usando la versión de OJS 3.2.1.4 y dé repente se quedan cargando el apartado de flujo de trabajo en todos mis envíos.

[23-Jan-2023 21:33:25 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:33:45 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:33:51 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:00 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:05 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:07 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:08 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:38 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:34:43 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:35:07 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112
[23-Jan-2023 21:35:22 UTC] PHP Deprecated:  Non-static method PKPApplication::getRequest() should not be called statically in /home/revistaunah/public_html/plugins/generic/customHeader/CustomHeaderPlugin.inc.php on line 112

Uso la versión
OJS 3.2.1-4

Envío capturas de mi entorno de trabajo

Los errores con PHP Deprecated o PHP Warning normalmente no causará la página rota. Si encuentras errores como PHP Fatal o PHP Error, estos pueden ser causas de lo que ves. ¿Puedes compartir algunos que dicen eso?

Si estos errores están nuevos en el registro de errores, quizas la versión de PHP cambió en tu servidor web. Una versión nueva de PHP se puede introducir problemas con una versión vieja de OJS.


The errors of “PHP Deprecated” or “PHP Warning” will not normally cause a broken page. If you find errors like “PHP Fatal” or “PHP Error”, these can cause what you are seeing. Can you share any that say “Fatal” or “Error”?

If the Deprecated warnings are new in your error log, perhaps the version of PHP has changed on your webserver. A new version of PHP can introduce errors with an older version of OJS.

1 Like

Clinton is right, but alternatively, you can change the deprecated call from:

PKPApplication::getRequest();

To this static call (using a shorthand):

(new PKPApplication)->getRequest();

Hi all,

PKPApplication should be a singleton; I would recommend replacing:

PKPApplication::getRequest()

…with…

Application::get()->getRequest()

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes