Native XML Plugin import "File size error."


I tried to import a XML file with “Native XML Plugin” (the file was initially exported with the same plugin), and it gives me the error “File size error.” before I can click on “Import” so I think it’s a JS function that’s doing this. But I can’t figure out where I can change the allowed size - any ideas?

I think this is related to Plupload JS maxSize, but don’t really know how to change this.

Thank you!

Hi @Alex_Protopopescu

Which OJS version are you using? It could be that this is a restriction on your server. In that case, you can check and change it in your php.ini file.


OJS3, I tagged the Q but forgot to specify in the text. Thank you Bozana! One thing led to another and I did arrive at the same conclusion.

Apparently the max size value it’s taken by lib/pkp/classes/core/ from the php ini to Plupload JS which handles the upload.
In this case ‘upload_max_filesize’ (and consequently ‘post_max_size’) must be set to the desired value in the php.ini file for the running PHP implementation. A php-fpm or web server restart is required.
If running php-fpm on nginx, then ‘client_max_body_size’ must also be set in http, server or location context in one of the nginx config files. A nginx service restart is required.

All good! Topic closed!

Great! Thanks for the good description – it is very helpful for others! :-)))

1 Like

Hello, I’ve installed the latest OJS 3.2.1-2
When attempting to import an exported issue of my journal, I get a “The file could not be uploaded or revised.” after the status bas finishes to process the file.

I have increased the filesize limit in php.ini and checked that all that end is Ok.

There still seem to be a limit on the filesize in the pluging end. The server error.log reads:

[Mon Jan 18 14:18:16.461190 2021] [php7:warn] [pid 1434703] [client] PHP Warning: POST Content-Length of 18715157 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer:

Any hint on how to solve this?

will summarize if necessary!


Ok… almost solved my issue. I had to increase another php variable “post_max_size” in addition to “upload_max_filesize”.

To sum up this part. It is important to increase both of these php variables in php.ini if you want Native XML plugin to allow the upload of files larger than 8Mb which is the default at this time in apache2.

My issue now is that there seem to be some incongruence among versions. See, I am moving a full journal issue hosted in OJS 2.XX to this new installation 3.2.1-2 and get the following error>

Validation errors:

Element '{}issue_covers': This element is not expected. Expected is one of ( {}covers, {}issue_galleys, {}articles ).

Is there any way to circumvent this? and allow the import of whole journal issues?

any help is much appreciated!