When I tried to download the View report for one of the journals Landscape Review (Tools → Statistics->View Report), it took ages and eventually I got an error message as below:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
I have the following PHP error in the logs:
PHP Warning: assert(): DefaultOverrideHeaderChildThemePlugin failed in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\plugins\PluginRegistry.inc.php on line 228
PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class ‘TinyMCEPlugin’ does not have a method ‘registerJSData’ in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\plugins\HookRegistry.inc.php on line 107
PHP Warning: assert(): Assertion failed in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\core\PKPRouter.inc.php on line 317
I can download all other reports and View Reports from the other two journals hosted by us, with no error message.
I tried to increase the php execution time to 300s, then to unlimited time, but still get the same 500 Internal server error.
Hi Thanks for your reply. I have tried to clear the data and template caches as you suggested, but I still get the same 500 error message, and the same php error message.
PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class ‘TinyMCEPlugin’ does not have a method ‘registerJSData’ in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\plugins\HookRegistry.inc.php on line 107
However, none of the messages you quoted would cause a 500 error – they are just warnings. I’d suggest checking your log for something else, containing the word Fatal or Error, and also checking to see whether your server uses a separate log for e.g. apache-related error messages.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks. I found the following error message. Does it give you any clue as how we can fix it?
PHP Fatal error: Call to a member function getGenreId() on null in F:\journals.lincoln.ac.nz\wwwroot\plugins\generic\usageStats\UsageStatsLoader.inc.php on line 78
and line 78 is below (highlighted in bold)
// is the file article full text
$genreDao = DAORegistry::getDAO(‘GenreDAO’); $genre = $genreDao->getById($articleFile->getGenreId());
if ($genre->getCategory() != 1 || $genre->getSupplementary() || $genre->getDependent()) {
$assocTypeToReturn = ASSOC_TYPE_SUBMISSION_FILE_COUNTER_OTHER;
} else {
$assocTypeToReturn = $assocType;
}
break;
This looks like a data error to me. You have a file that’s referring to a genre (“genres” in the code are referred to as “components” in the setup interface) that does not exist in your database. Perhaps it was deleted? You can identify the affected files by running the following SQL query:
SELECT sf.* FROM submission_files sf LEFT JOIN genres g ON (sf.genre_id = g.genre_id) WHERE g.genre_id IS NULL;
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks for the reply. I don’t have access to the database to make modifications. I will contact our ITS department to see if I can get access. I will get back to you.
This is a data integrity problem. The genre_id for those files will need to be set to something that exists in the genres table; you can get the list of items (and see their IDs) by going to Settings > Workflow > Components. If you hover over the “Edit” link for one of the entries in the list you’ll see the end of the URL containing genreId=xyz, where xyz is a number. That’ll tell you the genre ID for that entry.
Hi Thanks. I have identified the following. Can you advise how should I fix them? Sorry I’m quite new to sql and ojs. Do I need to manually insert genre IDs to these NULL records below? If so, can you suggest a sql query?
I also have another question, the latest NULL entry from the above table is 27/07/2020; however the current log file stuck in the processing folder is 31/Aug/2020, is this possible? Thanks. Yanan
Hello @asmecher - Thanks for your help. I’ve solved the log processing problem. However, we continue to get 500 error messages when we click on the ’ View Report’ link under ‘Report Generator’ as described above in my first post.
If you can help to give some suggestion on sql queries to fix the NULL entries that would mostly appreciated. I will try it to see if this will fix the 500 internal error.
Hi @asmecher ,
Thank you for your reply. We got the following PHP error messages:
PHP Warning: assert(): DefaultOverrideHeaderChildThemePlugin failed in \wwwroot\lib\pkp\classes\plugins\PluginRegistry.inc.php on line 228
PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class ‘TinyMCEPlugin’ does not have a method ‘registerJSData’ in \wwwroot\lib\pkp\classes\plugins\HookRegistry.inc.php on line 107
PHP Warning: assert(): Assertion failed in \wwwroot\lib\pkp\classes\core\PKPRouter.inc.php on line 317
Hi @asmecher , I have checked there wasn’t any Fatal errors when the 500 error occurred. I did see a fatal error in the log (see below) but it was a couple of days ago.
PHP Fatal error: Call to a member function getId() on null in myjournal.com\wwwroot\lib\pkp\classes\notification\PKPNotificationManager.inc.php on line 150
There should definitely be something more serious than a Warning to go along with a 500 error. If you’re sure you don’t see anything in the PHP error log, then it’s possible that something is captured either in your Apache error log (or equivalent, depending on your web server).
Regards,
Alec Smecher
Public Knowledge Project Team
Hmm, I’m afraid you’ll have to keep hunting – a 500 error should always have a log entry to indicate more. One case in which the PHP error log wouldn’t record anything, but the web server error log might, is if there is an execution time limit or memory limit set in your web server’s CGI configuration. Since the report tools might take considerable time and RAM, that might be something to investigate.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher - Thanks. The pool memory is set to be unlimited. I have also tried to increase PHP memory limit, which hasn’t worked so far. PHP execution time is set to 300 which i think it’s plenty??? I will keep hunting.