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.
any further idea?
Yanan
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.
any further idea?
Yanan
Hi @Yanan_Zhao,
The warning…
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
…can be resolved by applying the change described at Resolve TinyMCE plugin warning · Issue #6402 · pkp/pkp-lib · GitHub.
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;
Regards,
Yanan
Hi @Yanan_Zhao,
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.
Yanan
Hi @asmecher - I have run the query and it has returned 20 rows. What can I do to fix it?
Thanks,
Yanan
Hi @Yanan_Zhao,
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.
As for how the data integrity problem arose, it’s probably related to the lack of a warning/check when deleting a component. This is already filed in our issue tracker for improvement; see Prevent deletion of active genres/components · Issue #3899 · pkp/pkp-lib · GitHub for details.
Regards,
Alec Smecher
Public Knowledge Project Team
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?
file_id | revision | source_file_id | source_revision | submission_id | file_type | file_size | original_file_name | file_stage | viewable | date_uploaded | date_modified | assoc_id | genre_id |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2062 | 1 | NULL | NULL | 1096 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 18728 | Tactical Urbanism_reviewer comments.docx | 5 | 1 | 15/10/2018 13:56 | 15/10/2018 13:56 | 45 | NULL |
2063 | 1 | NULL | NULL | 1098 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 27856 | Book review_Proof read.docx | 5 | 1 | 15/10/2018 15:34 | 15/10/2018 15:34 | 56 | NULL |
2067 | 1 | NULL | NULL | 1098 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 28440 | 1098-2063-1-5-20181015 (2).docx | 5 | 0 | 17/10/2018 10:34 | 17/10/2018 10:34 | 56 | NULL |
2069 | 1 | NULL | NULL | 1097 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 618660 | Tourism-led settlement regeneration.docx | 5 | 1 | 18/10/2018 23:44 | 18/10/2018 23:44 | 49 | NULL |
2081 | 1 | NULL | NULL | 1099 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 14096 | Reviewers Comments_LPR.docx | 5 | 1 | 14/11/2018 12:50 | 14/11/2018 12:50 | 62 | NULL |
2121 | 1 | NULL | NULL | 1106 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 22806 | LPR edit.docx | 5 | 0 | 9/12/2018 11:14 | 9/12/2018 11:14 | 73 | NULL |
2122 | 1 | NULL | NULL | 1107 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 13304 | 1107-Article Text-2106-1-4-20181126 (1) Josi.docx | 5 | 0 | 9/12/2018 15:40 | 9/12/2018 15:40 | 72 | NULL |
2123 | 1 | NULL | NULL | 1107 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 13642 | 1107-Article Text-2107-1-4-20181126. Pippax.docx | 5 | 0 | 9/12/2018 15:41 | 9/12/2018 15:41 | 72 | NULL |
2124 | 1 | NULL | NULL | 1107 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 13602 | 1107-Article Text-2108-1-4-20181126 SAm.docx | 5 | 0 | 9/12/2018 15:41 | 9/12/2018 15:41 | 72 | NULL |
2129 | 1 | NULL | NULL | 1111 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 18974 | Editorial_with copy edits.docx | 5 | 0 | 12/12/2018 11:08 | 12/12/2018 11:08 | 74 | NULL |
2137 | 1 | NULL | NULL | 1103 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 29004 | 1103-Article Text-2087-1-4-20181112.docx | 5 | 1 | 20/12/2018 12:29 | 20/12/2018 12:29 | 71 | NULL |
2159 | 1 | NULL | NULL | 1108 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 23070 | SIT article_copy edits.docx | 5 | 1 | 11/01/2019 21:30 | 11/01/2019 21:30 | 75 | NULL |
2362 | 1 | NULL | NULL | 1160 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 83915 | 1160-Article Text-2340-1-4-20200622.docx | 5 | 0 | 3/07/2020 19:25 | 3/07/2020 19:25 | 116 | NULL |
2365 | 1 | NULL | NULL | 1152 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 2561618 | Mahika Kai Practitioner Report.docx | 5 | 0 | 16/07/2020 12:04 | 16/07/2020 12:04 | 105 | NULL |
2366 | 1 | NULL | NULL | 1160 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 83915 | 1160-Article Text-2340-1-4-20200622.docx | 5 | 0 | 16/07/2020 12:19 | 16/07/2020 12:19 | 116 | NULL |
2367 | 1 | NULL | NULL | 1158 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 84783 | 1158-Article Text-2329-1-4-20200605.docx | 5 | 0 | 16/07/2020 13:15 | 16/07/2020 13:15 | 111 | NULL |
2368 | 1 | NULL | NULL | 1157 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 9756163 | 1157-Article Text-2323-1-4-20200605.docx | 5 | 0 | 17/07/2020 11:21 | 17/07/2020 11:21 | 86 | NULL |
2369 | 1 | NULL | NULL | 1157 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 9756163 | 1157-Article Text-2323-1-4-20200605.docx | 5 | 1 | 17/07/2020 13:28 | 17/07/2020 13:28 | 86 | NULL |
2371 | 1 | NULL | NULL | 1154 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 5092502 | 1154-Article Text-2325-1-4-20200603.docx | 5 | 0 | 27/07/2020 12:51 | 27/07/2020 12:51 | 99 | NULL |
2372 | 1 | NULL | NULL | 1154 | application/vnd.openxmlformats-officedocument.wordprocessingml.document | 5092502 | 1154-Article Text-2325-1-4-20200603.docx | 5 | 0 | 27/07/2020 12:52 | 27/07/2020 12:52 | 99 | NULL |
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.
Kind regards,
Yanan
Hi @Yanan_Zhao,
Are you still getting the same Fatal Error as you reported above, or is there something different in your PHP error log?
Regards,
Alec Smecher
Public Knowledge Project Team
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
Does any of these give any clue?
Thanks,
Yanan
Hi @Yanan_Zhao,
Those are just warnings, which won’t cause a 500 error; you’ll need to look in the log for a fatal error.
Regards,
Alec Smecher
Public Knowledge Project Team
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
If it helps the page stuck at the following URL https://journals.com/index.php/lr/management/tools/report?pluginName=ViewReportPlugin
when the 500 error occurred.
Any idea?
Thanks,
Yanan
Hi @Yanan_Zhao,
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
Hi @asmecher - I have checked our WEb server, and I can’t see anything serious there. I have the following in the logs
GET /index.php/LPR/management/tools/report pluginName=ViewReportPlugin 443
https://journals.lincoln.ac.nz/index.php/LPR/management/tools 500 0 258 95469
Does the above give you any clue?
Yanan
Hi @Yanan_Zhao,
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.
Thanks,
Yanan
Hi @asmecher - We have solved this issue by increasing the time out time! Thank you for your help.
Yanan