Cannot create journal

I have installed the ojs, and successful to login in.
When i was ready to create a journal, i filled data in the form and submitted.
The error showed up that was “{“error”:“form.csrfInvalid”,“errorMessage”:”##form.csrfInvalid##"}".
So i have two questions:
(1) why do i get the “csrf invalid” error and how i can fix it?
(2) ##form.csrfInvalid##" is a language problem? How can i fix it?


Hi @ironsail,

What version of OJS are you using? (Please include this in your posts.)

Does anything appear in the PHP error log? When you look at the request and response that are supposed to create the journal using your browser’s developer tools, what response does the server give?

Alec Smecher
Public Knowledge Project Team

My version is
I found out the “csrf” problem only appears when i use “vpn” to access my ojs site. And it is successful to create the journal when i shut down the “vpn”. So i guess the cookie caused it, right?

Yes, i got the error message from developer tools:
POST*/api/v1/contexts 403 (Forbidden)

Request Info:

  1. Request URL:*/api/v1/contexts
  2. Request Method:POST
  3. Status Code:403 Forbidden
  4. Remote Address:
  5. Referrer Policy:no-referrer-when-downgrade

Request Header:
HTTP/1.1 403 Forbidden
Date: Tue, 14 Apr 2020 04:16:05 GMT
Server: Apache/2.4.6 (CentOS) PHP/7.2.29
X-Powered-By: PHP/7.2.29
Set-Cookie: OJSSID=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/ojs/
Set-Cookie: OJSSID=d6kbr39cp41h8ooktqtbij3i41; expires=Thu, 14-May-2020 04:16:05 GMT; Max-Age=2592000; path=/ojs/; domain=
Access-Control-Allow-Origin: *
Content-Length: 66
Content-Type: application/json
X-Cache: MISS from
X-Cache-Lookup: MISS from
Connection: keep-alive

Response Header:
POST*/api/v1/contexts HTTP/1.1
Proxy-Connection: keep-alive
Content-Length: 129
Proxy-Authorization: Basic LnN2QDUzMjM5MDY7Y24uOkpva0QrVHczNVZqQkdvV1FPSmFlTFZ2cmduWTJtU3J3b3dIYlpjSlZQdGc9
Accept: /
X-Csrf-Token: b2da2d2da5a5a37e379739d9aa5e8828
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: OJSSID=d6kbr39cp41h8ooktqtbij3i41

Response data:

Hi @ironsail,

See e.g.: Problem to set changes in OJS 3.2.0 admin page - #8 by Williams_Baster

Alec Smecher
Public Knowledge Project Team


I have another problem about language, so many texts show like “##navigation.archives##”, how i can fix it?
btw, i use the chinese.

Hi @ironsail,

Next time, I’d suggest starting a new topic when you have an unrelated question – it helps to keep the forum organized. However, when you see text like it means that locale key couldn’t be translated. This usually happens because the translation is incomplete. See Introducing Weblate, a new path for OJS & OMP translations for information about how to update/complete translations of the software.

Alec Smecher
Public Knowledge Project Team