##api.submissions.unknownError## when viewing submissions

I have been seeing a similar issue to a few other posts re: api.submissions.unknownError but for me the issue only arose for a particular journal.

I have two domains configured on our OJS site:

base_url[index] = https://journals.assaf.org.za/index
base_url[sajs] = https://www.sajs.co.za

.htaccess

RewriteEngine On
RewriteBase /

## SAJS
RewriteCond %{SERVER_NAME} ^www.sajs.co.za
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/sajs/$1 [QSA,L]
## Mainsite of OJS with journal overview
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]

The ##api.submissions.unknownError## error only shows for the SAJS journal, the other journal submissions on journals.assaf load without any issues.

There are 3 rest calls which return a 404 since upgrading to 3.1.1.2. Before they worked without issue:

https://www.sajs.co.za//sajs/api/v1/_submissions?status=1&assignedTo=-1&searchPhrase=&count=20&offset=0&_=1533550173167
https://www.sajs.co.za//sajs/api/v1/_submissions?status=1&searchPhrase=&count=20&offset=0&_=1533550173168
https://www.sajs.co.za//sajs/api/v1/_submissions?status%5B%5D=4&status%5B%5D=3&searchPhrase=&count=20&offset=0&_=1533550173169

I have removed the // and replaced with a single / but that has no effect. I thought maybe the /sajs was the cause of the problem; removing it causes a 301 redirect error.

Not sure how to proceed. Maybe the config.inc.php configuration is no longer valid?

Thanks

Hayden

I haven’t dug into the code at all but turning the rest urls off seems to have provided a temporary fix to this issue.

restful_urls = Off

However, it would be good to get these working again correctly as they did pre-3.1.1.2 upgrade.

Hi @haydenyoung,

Does this sound like it describes your problem? UI components that communicate with the API don't consider mapped domains · Issue #3786 · pkp/pkp-lib · GitHub

If so, @ajnyga may have a proposed solution with .htaccess until the root problem is solved.

Oh it’s here: How to remove index.php in ojs 3.0.2.0 - #15 by ajnyga

Thanks for the suggestion. Unfortunately, the Rewrites didn’t work for us. We ended up with same resullts.

Our previous htaccess looked like:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

## SAJS
RewriteCond %{SERVER_NAME} ^www.sajs.co.za
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} api\/v1\/
RewriteRule ^(.*)$ /index.php/sajs/$1 [QSA,L]

## Mainsite of OJS with journal overview
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]
</IfModule>

where sajs is a domain which differs from the main domain.

##api.submissions.unkownError## seems to be intermittent; sometimes we get no error at all but often we get the ##api.submissions.unkownError## popup. What is unusual is that it seems to redirect successfully to the submissions anyway so could there be a deeper issue?

Confirming same issue @haydenyoung and same temporary fix with restful_urls = Off in config.inc.php

Also could be related to our reliance on index.php in base_url of journals as suggested by @NateWr

It points to the journal API without index.php and breaks
33%20AM

Turning off restful_urls points to the working endpoint
50%20AM

@wilsonw Are you also getting the intermittent popup when restful_urls are turned off? The problem we see:

  • I click on Submissions
  • I click on an individual submission
  • the Error pops up but I am redirected successfully anyway
  • I click back to submissions and repeat. Sometimes I get the popup, sometimes I don’t.

Just doing a follow-up here @NateWr @asmecher @bozana . At this stage we cannot use our discussion tool and the fixes suggested have not worked. Can you maybe help us?

@MichaelGuthrie @haydenyoung can supply any info if needed.

The discussion tool does not use the API (yet) so if it’s impacting that, you may be running into a different issue.

Can you provide some more info on what has been tried and what’s not worked? Can you share the request URL as shown in this screenshot, and details about where the request URL should be going to?

(Responding to @haydenyoung out of order) Sorry for the wait. This is what I see when clicking through submissions. No intermittent errors.

We’ve decided to hold off on the upgrade and see how 3.1.2 fares when released.

Hi @wilsonw, @NateWr

Okay so now I’m not getting the popup errors to I’m needing to reconfirm with the end-users. However, I’m seeing a lot of ##place holders## on the submissions screens (please see attached).

The Review Discussions is also strange with the two horizontal lines under name.

Screenshot%20from%202018-09-06%2015-28-46 Screenshot%20from%202018-09-06%2015-28-15

I’m wondering if the problems could be related. I’ll continue to test.

Thanks

Hayden

This happens on rare occasions where a review discussion is started but not completed, and a dummy entry remains in the database. We’ve fixed a lot of these instances, but it seems at least one still persists. If you can reliably reproduce it, that would help us track down the cause.

That looks like an issue with the XML files loading. I’d recommend flushing the cache. If that doesn’t work, there may be more system issues with your install. You might check the error logs to see if you’re running into file permissions errors or otherwise see failed XML file loading issues.

Hi @NateWr

That looks like an issue with the XML files loading. I’d recommend flushing the cache. If that doesn’t work, there may be more system issues with your install. You might check the error logs to see if you’re running into file permissions errors or otherwise see failed XML file loading issues.

Thanks for the suggestions. Correct, cache has been flushed a few times for both this and various other issues. Error logs are showing nothing regarding permissions issues either. I’m wondering if there are issues with the language files maybe?

Thanks

That’s possible. There is a bash script at /lib/pkp/tools/travis/validate-xml.sh which you can use to validate the XML files in your install. That should throw up an error if one of your XML files can’t be parsed correctly.

I Try With this folowing step solved the problem

  1. Edit in config.inc.php
  2. find restful_urls = Off and than set on
  3. Try to Acces the web
  4. repeat step 1 and 2
  5. find restful_urls = Off and than set off again
  6. Solved the Problem

Thanks every one for this solution

I had the same problem, but the solution was to just change the network signal (from WiFi to mobile data). I think there is often interference.
Regards.
Or what happened. I am not an engineer.