Metadata can't be updated due to Reference failure

I’m using OJS 3.0.2

found trouble when updating the metadata incoming article. It can not be saved the updated data due to the reference trouble. It captured the notification as follow:
image

Somehow, it kept looping when i updated the reference.
ref2

How do i suppose to do?

Hi @agusps,

Check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team

I’ll have my IT Support check it.

Thank You

The PHP Error log
[21-Aug-2019 14:57:37 Asia/Jakarta] PHP Warning: Declaration of PKPSubmissionMetadataViewForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /home/asiaacid/subdomain/jibeka/public_html/lib/pkp/controllers/modals/submissionMetadata/form/PKPSubmissionMetadataViewForm.inc.php on line 176
[21-Aug-2019 14:57:37 Asia/Jakarta] PHP Warning: Declaration of PKPSubmissionMetadataViewForm::initData($args, $request) should be compatible with Form::initData() in /home/asiaacid/subdomain/jibeka/public_html/lib/pkp/controllers/modals/submissionMetadata/form/PKPSubmissionMetadataViewForm.inc.php on line 176
[21-Aug-2019 14:57:37 Asia/Jakarta] PHP Warning: Declaration of PKPSubmissionMetadataViewForm::execute($request) should be compatible with Form::execute() in /home/asiaacid/subdomain/jibeka/public_html/lib/pkp/controllers/modals/submissionMetadata/form/PKPSubmissionMetadataViewForm.inc.php on line 176
[21-Aug-2019 14:57:37 Asia/Jakarta] PHP Deprecated: Function create_function() is deprecated in /home/asiaacid/subdomain/jibeka/public_html/lib/pkp/classes/submission/PKPSubmissionMetadataFormImplementation.inc.php on line 72

Hi @agusps,

Those are just warnings, and shouldn’t cause problems; look for something containing the word “error”.

Regards,
Alec Smecher
Public Knowledge Project Team

we only found this:

[22-Aug-2019 13:24:26 Asia/Jakarta] PHP Warning: Use of undefined constant STATISTICS_DIMENSION_ARTICLE_ID - assumed ‘STATISTICS_DIMENSION_ARTICLE_ID’ (this will throw an Error in a future version of PHP) in /home/asiaacid/subdomain/jibeka/public_html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 98
[22-Aug-2019 13:24:26 Asia/Jakarta] PHP Warning: Use of undefined constant STATISTICS_DIMENSION_ARTICLE_ID - assumed ‘STATISTICS_DIMENSION_ARTICLE_ID’ (this will throw an Error in a future version of PHP) in /home/asiaacid/subdomain/jibeka/public_html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 10

Hi @agusps,

You can fix that warning by applying the change linked from Obsolete constant STATISTICS_DIMENSION_ARTICLE_ID causes warnings · Issue #5023 · pkp/pkp-lib · GitHub.

However, that’s just cosmetic and shouldn’t be causing the problem you describe, I don’t think. If you don’t see anything in your error log that contains the word “error” when you try to save that form, I’d suggest trying your browser’s inspector tools to see how the server is responding to the “Save” request.

Thanks,
Alec Smecher
Public Knowledge Project Team

I have forward the message to my IT support.

About the browser inspection tool, I got no idea. Is it what you mean?

jquery.js:9627 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery.js:9627
3:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse ()
at Function.jQuery.parseJSON (jquery.js:8517)
at Object.success (TabHandler.js:281)
at fire (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at done (jquery.js:9310)
at XMLHttpRequest.callback (jquery.js:9720)
fsUtils.js:110

Thank You

Hi @agusps,

Yes, that’s helpful. Your web browser’s inspector tools should have a “Network” area, where you can watch the responses that the browser sends to the server, and how the server responds. I’m interested in the response that the server sends back to the browser right when that Unexpected token o in JSON at position 1 message appears.

Regards,
Alec Smecher
Public Knowledge Project Team

When I click the first message “3:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (VM764:1)”, it shows:

image

However, when i go to “Network” area and filtering the JSON, found something with name json2.js. I clicked it, and here showed at header:
General

  1. Request URL: https://jurnal.stie.asia.ac.id/lib/pkp/js/lib/json/json2.js
  2. Request Method: GET
  3. Status Code: 200 (from memory cache)
  4. Remote Address: 101.50.1.20:443
  5. Referrer Policy: no-referrer-when-downgrade

Response Headers

  1. accept-ranges: bytes
  2. alt-svc: quic=":443"; ma=2592000; v=“35,39,43,44”
  3. cache-control: public, max-age=604800
  4. content-encoding: br
  5. content-length: 5128
  6. content-type: application/javascript
  7. date: Sat, 24 Aug 2019 06:28:17 GMT
  8. expires: Sat, 31 Aug 2019 06:28:17 GMT
  9. last-modified: Tue, 11 Sep 2018 16:19:58 GMT
  10. server: LiteSpeed
  11. status: 304
  12. vary: Accept-Encoding

Request Headers

  1. Provisional headers are shown
  2. Referer: https://jurnal.stie.asia.ac.id/index.php/jibeka/workflow/index/157/3
  3. Sec-Fetch-Mode: no-cors
  4. User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

And in response show:
[edit: removed long JSON source]

and Timing:
image

Is there anything I should submit?

hahaha, I Just already knew that it can be shown here:
https://jurnal.stie.asia.ac.id/lib/pkp/js/lib/json/json2.js
for the JSON Response

Hi @agusps,

Ah,the [object Object] response definitely points to a problem. But I strongly suspect this would not be a problem with a later release of OJS – are you able to upgrade to a newer release?

Regards,
Alec Smecher
Public Knowledge Project Team

I will have my IT support done it.

Hi @asmecher,

I have forward your message to my IT support. They are afraid upgrading the OJS since they have experienced failure in updating. They can not restore the database.

Is there any other option to get it done?

Thank you.

Hi @agusps,

Are you planning to run this version of OJS forever? Sooner or later you will definitely need to upgrade, so I would suggest working through the problem with your IT support. If they cannot restore the database, that’s definitely a problem – backup and restore are necessary operations for hosting, and if you can’t do those, you’re definitely at risk if a problem arises.

Regards,
Alec Smecher
Public Knowledge Project Team