OJS with multiple domains error

Hello,

I am using OJS 2.4.4.1, I know a bit old, but still…

The system contains several publications and everything has worked OK. Recently we have added a new publication that has different domain/base_url and we have problems with that publication. The old publications still work OK.

The new publication works OK for “reading” operations (browsing content, looking at old issues,…), but no “action” can be performed - that means changing anything, like changing setup settings, modifying any metadata,…

I have found a strange log entries in the Apache access.log file (the domain https://knjiznica.zbds-zveza.si/knjiznica is the new publication):

193.95.221.108 - - [22/Jan/2018:03:22:18 +0100] “GET /knjiznica/manager/setup/1 HTTP/1.1” 302 4913 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”
193.95.221.108 - - [22/Jan/2018:03:22:18 +0100] “GET /knjiznica/login?source=%2Fknjiznica%2Fmanager%2Fsetup%2F1 HTTP/1.1” 200 3554 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”
193.95.221.108 - - [22/Jan/2018:03:22:21 +0100] “POST /knjiznica/login/signIn HTTP/1.1” 302 560 “https://knjiznica.zbds-zveza.si/knjiznica/login?source=%2Fknjiznica%2Fmanager%2Fsetup%2F1” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”
193.95.221.108 - - [22/Jan/2018:03:22:21 +0100] “GET /knjiznica/manager/setup/1 HTTP/1.1” 200 8081 “https://knjiznica.zbds-zveza.si/knjiznica/login?source=%2Fknjiznica%2Fmanager%2Fsetup%2F1” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”
193.95.221.108 - - [22/Jan/2018:03:22:33 +0100] “GET /knjiznica/manager/saveSetup/1 HTTP/1.1” 200 7028 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36”

I have been logged in the system, trying to modify the publication settings step 1. Actually I just opened the form and save it without changes. What I got is error about missing required data (which is wrong) and all the fields got empty - just in the GUI, if I reload the form everything is filled properly, which means no data has been changed in the DB. After the error I am still logged in the system (can see my login/profile info).

My understanding from the log file is that somehow the session info is missing and a login is required again (/knjiznica/login/signIn) which is wrong. I have checked and there is a valid OJSSID cookie containing domain knjiznica.zbds-zveza.si.

Any idea what can be wrong?

Regards, Primož

Hi @primozs,

It sounds like it could be your PHP is out of date, although if the other journals in your installation are working fine that might not be it. What version are you running? Other possibilities include file permissions are incorrect, you need to empty the caches, or a manual database change was done incorrectly. Do you have any errors in your php error log?

Thanks,
Amanda Stevens
Public Knowledge Project Team

Hi @astev

I have some doubts about the PHP problem. All other journals work fine on the same PHP. Also this journal has worked fine until we changed the domain/base_URL. That makes me confident the problem is not with the PHP or with the file permissions, but is connected with the domain/base_URL.

Best regards, Primož

PS: The error log seems to point out the same problem:

[Mon Jan 22 22:31:15 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/login?source=%2Fuser
[Mon Jan 22 22:31:15 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/login?source=%2Fuser
[Mon Jan 22 22:31:15 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/login?source=%2Fuser
[Mon Jan 22 22:31:23 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/user
[Mon Jan 22 22:31:23 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/user
[Mon Jan 22 22:31:23 2018] [error] [client 193.95.221.108] ojs2: 404 Not Found, referer: https://ojs.zrc-sazu.si/user

Hello,

Any idea here? Maybe @asmecher takes a look at it?

Regards, Primož

Hi @primozs,

What are the base_url settings in your PHP config file?

Best,
Amanda Stevens
Public Knowledge Project Team

Hi @astevens,

Here it is:

; The canonical URL to the OJS installation (excluding the trailing slash)

base_url[index] = “https://ojs.zrc-sazu.si

base_url[carsologica] = “Acta Carsologica

base_url[twohomelands] = “Dve domovini

base_url[dmd] = “De musica disserenda

base_url[ags] = “Acta geographica Slovenica

base_url[traditiones] = “Traditiones

base_url[folia_bio_geo] = “https://ojs.zrc-sazu.si/folia_bio_geo

base_url[filozofski-vestnik] = “Filozofski vestnik

base_url[hacquetia] = “Hacquetia

base_url[jz] = “Jezikoslovni zapiski

base_url[primerjalna_knjizevnost] = “https://ojs.zrc-sazu.si/primerjalna_knjizevnost

base_url[sms] = “Studia mythologica Slavica

base_url[gv] = “https://ojs.zrc-sazu.si/gv

base_url[tst] = “https://ojs.zrc-sazu.si/tst

base_url[wocrea] = “https://ojs.zrc-sazu.si/wocrea

base_url[knjiznica] = “http://knjiznica.zbds-zveza.si/knjiznica

Hi @primozs

It looks like this journal URL is the only one without HTTPS protocol, some reason to that? Have you tried to add security protocol as base_url? When I attempted to access it was changed automatically.

Regards,
Israel Cefrin
Public Knowledge Project Team

2 Likes

Hi @israel.cefrin,

Thank you very much for the help. That was exactly the problem!

Before the installed SSL certificate we have been testing with the HTTP and forgot to change it. But two have been looking into it and haven’t noticed the typo.

Thank you very much once more, good eye :slight_smile:

Best regards, Primož

1 Like