No image upload possible in wysiwyg editors OJS

Hi all

There’s no image upload possible in wysiwyg editors of OJS after the upgrade.
The only error message we get is the one below which does not realy help:

[Mon Aug 24 15:40:34.674500 2020] [php7:warn] [pid 106888] [client 43:33875] PHP Warning: file_put_contents(/var/www/ojs/cache/fc-pluginSettings-0 -centerbophomethemeplugin.php): failed to open stream: Permission denied in /var /www/ojs/lib/pkp/classes/cache/ on line 90, referer: https://bo


Hi @trace,

The warning means that the theme plugin’s temporary file cannot be written by the PHP’s file_put_contents method into the cache folder because of permissions problem.

As those files are saved in the public folder, first of all, I’d check permissions of the public folder and subfolders - apache or other webserver that you are using should be able to write (and read) files there.

Thanks @Vitaliy
Nice to here from you.
Mhmm we checked the permissions allready. Do you think there’s a relation between the error message and the problem I’ve decribed?

It seems unrelated to your problem but to be sure I would inspect when this error appears. Under what conditions is it possible to reproduce it?

The same question regarding the problem. I’ve checked my 3.1.2-4 instance and am able to upload images through the tinyMCE page footer field. Are there any other errors in PHP log or browser’s console that may contain any hints?

The upload problem doesn’t seem to write any errors in the log… but I’ll check this again

If there aren’t any hints, I think the best way would be to perform test upgrade to the latest stable release and if all is ok there, move it to production. Another option may be try to debug it by following the chain of methods used for image upload in tinyMCE.

Am I understanding the problem right that when image is uploaded through editor and form successfully saved after page reload the image is absent, while in OJS config they are allowed - allowed_html includes something like img[src]?

We have about 20 Journals running. We cannot update the software on a weekly base.

No, pics cannot even be uploaded. It can be browsed or drag&dropped but after clicking “ok” nothing happens. No error message too.

I can make you an account on our test journal if you want to try yourself.


Hmm, it looks like a newer version of the plugin and I’m not sure about its compatibility with OJS 3.1.2-4. I see that there was an issue with the tinyMCE shipped with that release. Did you apply the patch mentioned here or performed other manipulations with the code?

@mfelczak applied the patch for us as far as I remember. But yes I think you’re right. The incompatibility of this newer plugin with 3.1.2 must be the problem