Endless loading after saving submission, metadata or discussion


Im using OJS 3.1.1 and i’ve had the issue since last year and our team is cool with it since this issue can be resolve after refreshing the page (although saving form keeps loading but the data is saved somehow) but then it becomes problem after we realized the automatic mail doesnt run bcs we always refresh the page if the spinner keep spinning and the mail is triggered after form is saved.

I know there’s a solution in this post Submission metadata form: pressing save button triggers browser errors · Issue #4072 · pkp/pkp-lib · GitHub but it didnt work in our ojs.

After ive checked the error log, there’s this error:
PHP Fatal error: Call to a member function getContents() on null in /home/jimfbior/public_html/lib/pkp/classes/notification/managerDelegate/QueryNotificationManager.inc.php on line 126

so what is this error? could it be the one that make the spinner keep spinning in our website?

Hi @Vivienne,

I haven’t seen that issue before, but at a glance, it appears to be a data error where you have a Discussion that doesn’t have a “Head note”, which contains the discussion’s first subject/body. You can list any discussion like this in your database using:

SELECT q.* FROM queries q LEFT JOIN notes n ON (q.assoc_id = n.note_id) WHERE q.assoc_type=1048586 AND n.note_id IS NULL;

As to how this got created, I’d strongly recommend upgrading your OJS installation before debugging further; OJS 3.1.1 is already quite old and it’s likely that there will be improvements in this area.

Alec Smecher
Public Knowledge Project Team

Hello @asmecher thx for the reply.

Ive tried to do your query above but it returns with no discussion that doesnt have head note.
As for the upgrade, we will discuss it first, any tips on what to be prepared for the upgrade?

And i want to ask one more thing regarding the error, recently ive tried to check usage statistic plugin but it leads to json failed error, when i checked the error log the message showed → PHP Fatal error: Call to undefined method UsageStatsPlugin::getTemplateResource in UsageStatsSettingsForm.inc.php on line 30
do you have any idea on how to resolve it? many thanks

Hi @Vivienne,

For the question about the getContents() error message, what specific version of OJS 3.1.1 are you running?

For the other question about the usage stats problem, could you post that as a new topic?

Alec Smecher
Public Knowledge Project Team