Blank Page when trying to access Administration page (of OJS 3.1.1.0 multi-journal). Also in all Journals, on Website Settings only shows the first tab “Appearance”

I get a Blank Page when trying to access Administration page (of OJS 3.1.1.0 multi-journal). Also in all Journals, on Website Settings only shows the first tab “Appearance”.

Looking at other topics, I’ve noticed that the info on the error_log file can be useful, namely “PHP Fatal error” records, here are what I have found:

[06-Aug-2020 19:11:34 UTC] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /home/urbancre/sauc.website/lib/pkp/classes/notification/form/PKPNotificationSettingsForm.inc.php:103
Stack trace:
#0 /home/urbancre/sauc.website/lib/pkp/controllers/tab/user/ProfileTabHandler.inc.php(292): PKPNotificationSettingsForm->fetch(Object(Request))
#1 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPRouter.inc.php(372): ProfileTabHandler->notificationSettings(Array, Object(Request))
#2 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPComponentRouter.inc.php(256): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /home/urbancre/sauc.website/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))
#5 /home/urbancre/sauc.website/index.php(68): PKPApplication->execute()
#6 {main}
thrown in /home/urbancre/sauc.website/lib/pkp/classes/notification/form/PKPNotificationSettingsForm.inc.php on line 103

[09-Aug-2020 18:29:50 UTC] PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /home/urbancre/sauc.website/lib/pkp/classes/notification/form/PKPNotificationSettingsForm.inc.php:103
Stack trace:
#0 /home/urbancre/sauc.website/lib/pkp/controllers/tab/user/ProfileTabHandler.inc.php(292): PKPNotificationSettingsForm->fetch(Object(Request))
#1 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPRouter.inc.php(372): ProfileTabHandler->notificationSettings(Array, Object(Request))
#2 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPComponentRouter.inc.php(256): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /home/urbancre/sauc.website/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /home/urbancre/sauc.website/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))
#5 /home/urbancre/sauc.website/index.php(68): PKPApplication->execute()
#6 {main}
thrown in /home/urbancre/sauc.website/lib/pkp/classes/notification/form/PKPNotificationSettingsForm.inc.php on line 103

[20-Aug-2020 15:02:41 UTC] ojs2: DB Error: Duplicate entry ‘3-40-4’ for key ‘user_group_stage_pkey’

[31-May-2020 08:44:24 UTC] ojs2: 500 Internal Server Error

Can someone tell me where to find more info, or how to deal with these kind of errors ? Do an update solve the issue ? Thank you, best, Pedro Soares Neves

Hi @Info_Urbancreativity,

What error do you get just after trying to access the administration page? These error messages are guite old, 20 Aug the latest. The best would be looking at the error log when you encountering the issue, so you get the relevant ones.

Hello, @Vitaliy , when I access the Administration button (on the image) the result page is blank, the error log lines that are recorded are:

[29-Dec-2020 12:54:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[29-Dec-2020 12:54:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 263
[29-Dec-2020 12:54:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 359
[29-Dec-2020 12:54:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[29-Dec-2020 12:54:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/urbancre/sauc.website/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of LensGalleyPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /home/urbancre/sauc.website/plugins/generic/lensGalley/LensGalleyPlugin.inc.php on line 0
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/urbancre/sauc.website/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/urbancre/sauc.website/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of ArticleHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /home/urbancre/sauc.website/pages/article/ArticleHandler.inc.php on line 0
[29-Dec-2020 12:54:31 UTC] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /home/urbancre/sauc.website/classes/article/SubmissionFileDAO.inc.php on line 23

By the way, my error log file get’s big very fast.Screenshot 2020-12-29 at 12.50.02

Those warnings are cosmetic. You are describing an issue with a blank page, it definitely should be reflected in the log. Could you reproduce the error and then inspect the log? I’m expecting a Fatal error there that indicates the cause.

That’s what recorded after reproducing the blank page error.

[29-Dec-2020 16:16:37 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/urbancre/sauc.website/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[29-Dec-2020 16:16:37 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/urbancre/sauc.website/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[29-Dec-2020 16:16:37 UTC] PHP Warning: Declaration of ArticleHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /home/urbancre/sauc.website/pages/article/ArticleHandler.inc.php on line 0
[29-Dec-2020 16:16:37 UTC] PHP Warning: Declaration of SubmissionFileDAO::fromRow($row) should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /home/urbancre/sauc.website/classes/article/SubmissionFileDAO.inc.php on line 23
[29-Dec-2020 16:17:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[29-Dec-2020 16:17:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 263
[29-Dec-2020 16:17:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 359
[29-Dec-2020 16:17:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[29-Dec-2020 16:17:36 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/urbancre/sauc.website/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[29-Dec-2020 16:17:36 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/urbancre/sauc.website/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24

I guess that’s still cosmetic.
Can the blank page be related with domain issues? I’ve changed domain not long time ago.

Yes

It’s hard to guess the cause without additional info. Maybe errors are being filtered out due to php.ini configuration? There should be something…
Just to check, can you look at the request details with browser’s dev tools? In Google Chrome it’s ctrl+shift+i: open a network tab at the top of the opened window, and click Administration button. You should see details on request http://ojs-3.1.2-4.test/index.php/index/admin/index. What is the Status Code and the Response in general.

PHP log doesn’t contain errors here either?

Maybe errors are being filtered out due to php.ini configuration?

I was reviewing every line of config.inc.php file,
the last lines (I guess that the ones that are related with the visibility of errors) are:

;;;;;;;;;;;;;;;;;;
; Debug Settings ;
;;;;;;;;;;;;;;;;;;

[debug]

; Display a stack trace when a fatal error occurs.
; Note that this may expose private information and should be disabled
; for any production system.
show_stacktrace = On

; Display an error message when something goes wrong.
display_errors = Off

; Display deprecation warnings
deprecation_warnings = Off

; Log web service request information for debugging
log_web_service_info = On

After that I was checking the error_log file and no errors were registered, only “PHP Deprecated” and warnings.

The inspect is Status Code: 200 when I select Administration button,
I share here the print screen:

Screenshot 2020-12-31 at 16.13.50

Regarding the

all Journals, on Website Settings only shows the first tab “Appearance”.

The PHP log doesn’t contain errors here either.

The behaviour is different, I do not get a blank page, I get no content on the “frame”.
But on the debug something is visible. Here goes what I see on a print screen (hope it helps):

Screenshot 2020-12-31 at 17.58.02

It’s not necessary if you have access to PHP log. When these settings are turned on, errors are exposed to the browser, hence, to users also, that’s why it’s recommended to turn them off on the production instance.
I meant check PHP configuration file, php.ini, e.g.: Get PHP to display warnings and errors only - Stack Overflow

This may explain the absence of errors, the request and response headers look normal. On the screenshot, response headers, it’s stated that the content type is HTML, but I see only blank screen. Can you click and see what’s under Response tab in the browser’s dev tools, on the right from Headers? It should be HTML of the page.

The same strange situation is with the content under website information tab. Looks like it’s just HTML element, the informationForm is missing or just not displaying. Can you inspect the HTML content there? While in the dev tools, right-click on the blank area and pick Inspect. What HTML elements are there, e.g., <form id="informationForm>..., fields for tinyMCE input?

Can you also check if the issue appears in other browsers?

I’m trying to get access to the php.ini file, the hosting service gives me access to the CPanel interface (it is a shared server). They say that I can contour the situation building a php.ini file and placing it on the application folder, done that but not 100% (waiting for reply on how to make it work).

I made a PHP file with <?php phpinfo(); ?> to know the placement of the file and got all the info about the installed PHP. Do some specific info from this output could help?

Can you click and see what’s under Response tab in the browser’s dev tools, on the right from Headers ? It should be HTML of the page.

Is this tab?
Screenshot 2021-01-05 at 12.30.35

Regarding the content under website information tab.

Can you inspect the HTML content there? While in the dev tools, right-click on the blank area and pick Inspect . What HTML elements are there, e.g., <form id="informationForm>... , fields for tinyMCE input?

Screenshot 2021-01-05 at 12.48.30

I do not find in the HTML the reference to form id="informationForm" .
The behaviour is the same in Firefox and Safari.

You can make a backup and install your OJS instance locally. In this case, reproducing the error locally, narrows the possible causes and gives you access to all the logs and configuration files.

Are there some topic/ post that you recommend for doing this ?
Sounds very complex, wouldn’t be better to do an upgrade ?

@Vitaliy I’m working on the backup and local testing.

There was an article/ user issue blocking the normal behaviour of the database, once unblocked everything started working normally :slight_smile:

I know this is older, but could you explain what the article/ user issue was? I am having a similar issues with an upgrade and would like to know what to be looking for with all the blank settings pages. Was it a utf8 vs latin1 characters stored in the database issue?

Hello, I do not recall, maybe I’m influenced by your suggestion but I have the idea that the problem was in the characters as you mention.

In my memory I have this steps: Looking via server I’ve noticed that the DB was working fine until a certain point, identifying that point / article number / user name I’ve found the “strange character” and changed it using the platform interface.

This is my memory, can be tricky… hope it helps.