DOAJ Export Plugin gives 301 Moved Permanently

Thanks again.

Our journal has recently been accepted to be indexed by DOAJ. So, I decided to use DOAJ export plugin to transfer metadata. I requested an api key, and got one.
For now, I don’t want to use XML files. Instead, I prefer to try for online transfer via plugin.
After saving api key and selecting an article to be submitted via the plugin, I click register button and I get the following error message.

Deposit was not successful! The DOAJ API returned an error: '1 -
301 Moved Permanently
nginx/1.4.6 (Ubuntu)

When I look at the php log, I can not see any fatal errors, but some warning messages exist.

[09-Jul-2017 23:30:21 Europe/Istanbul] PHP Warning:  array_merge(): Argument #2 is not an array in /home/ugukoc/ on line 578
[09-Jul-2017 23:30:21 Europe/Istanbul] PHP Warning:  Invalid argument supplied for foreach() in /home/ugukoc/ on line 114
[09-Jul-2017 23:30:21 Europe/Istanbul] PHP Warning:  Cannot use a scalar value as an array in /home/ugukoc/ on line 133

[09-Jul-2017 23:30:35 Europe/Istanbul] PHP Warning:  array_merge(): Argument #2 is not an array in /home/ugukoc/ on line 578
[09-Jul-2017 23:30:35 Europe/Istanbul] PHP Warning:  Invalid argument supplied for foreach() in /home/ugukoc/ on line 114


Hope, we can solve this issue and become able to transfer article metadata to doaj.
Best Regards,
Ugur Kocak

Hi @drugurkocak,

Hmmm… That “301 Moved Permanently” error is very strange – I do not understand it :frowning: I will try to ask someone from DOAJ.
In the mean time: you could just export the XML file and try to upload it via the DOAJ portal.
For the warning you get and see in the error log files, you would need to apply this change/patch: pkp/pkp-lib#2552 fix array type warning · pkp/ojs@b9ea328 · GitHub


Hi @drugurkocak

Concerning the “301 Moved Permanently” error: do you have this changes/fix in your installation: ?
I.e. https should be used instead of http


1 Like

Hi people,

I’ve experienced the same error “301 moved permanently”, and noticed strange thing in version we are using. If I generate XML, it uses utf-8. So if there are non-latin characters, like čćšđ etc, it gets an error, and if I creeate xml file from error report, it gets stuck while uploading on DOAJ site.

However, if I manually change “utf-8” to “UTF-16” in the xml heading (mind the capital letters), it passes and all articles are on DOAJ correctly. Wonder if that is related to 301 error…

Cheers to ya all :slight_smile:

Mladen Čudanov

Hi @Mladen_Cudanov

Ah, my link above is wrong, it should be this one: Change DOAJ API protocol to https · pkp/ojs@ada5d88 · GitHub.
Thus, do you have that change? – The plugin should use https instead of http.

I do not exactly understand the other issue :frowning:
How do you create that XML file? - it is important that the editor you are using supports and uses UTF-8.
I do not understand from where do you take the XML and what error occurs?


Hi @bozana
Sorry that I couldn’t reply before.
Even after applying the “https” patch, the doaj registration plugin gives a json error, and fails (during manual registration)
I inserted a valid api key to its field. Since I previously uploaded the metadata via an xml file, status of the majority of articles is as registered. Only 14 of them seem as “marked registered”. When I try to register them online, I get this error. Meanwhile, php error log is recorded an “ojs2 404 not found” error which I think is another story. Screenshots are attached,
I lately upgraged to OJS 3.1.0 via command line.
Best regards,
Ugur Kocak

Another point that I noticed after previous message, all the articles of last issue that I published yesterday seem as registered. The metadata of some of them needs to be updated, because their page numbers etc changed. I don’t know how to do it.


Hi @drugurkocak

Hmmm… That “bad_request” error seems similar to the problem here: reload scheduled tasks function for the acron plugin · Issue #2543 · pkp/pkp-lib · GitHub. The problem was that DOAJ accepts only 6 keywords via API and this was the fix: pkp/pkp-lib#2543 fix automatic DOAJ deposit · bozana/ojs@5997194 · GitHub. That fix should be in the OJS 3.1 release. Do you have that code?

Else, I am not sure, but maybe if you re-register the updated articles, maybe the DOAJ metadata will be updated too – could you try that, maybe first with only one article?


Hi @bozana
In my last update from 3.0.2 to 3.1.0, I hit the error discussed in that topic
I got a blank page at the attempts via web interface, then I tried the command line. I applied the upgrade as in docs.

php tools/upgrade.php upgrade

Now, I have ojs 3.1.0 code, but I notice that database was not updated properly. When I try to upgrade to I got duplicate key errors pointing a previously failed upgrade attempt. I have several poblems that I should write elsewhere. I checked doaj fix, and all are already done. I will wait and read other topics,
Ugur Kocak


I am now dealing with the same error: 301 Moved Permanently (Deposit was not successful! The DOAJ API returned an error: '1 - nginx/1.4.6 (Ubuntu).

Was it in some solved or not?

Best wishes,

Hi @Marty1

What OJS version are you using?
We had that problem, but it was solved long time ago… Hmmm…
Does your file plugins/importexport/doaj/ contains “https” in these lines: ojs/ at ojs-3_1_1-4 · pkp/ojs · GitHub ?


Hi @bozana ,

Thank you very much. After opening the file we found the problem, corrected it and now it seems to be working.
Thank you very much!!!