1
votes

as admin, when trying to edit product description, using TinyMCE to insert an image - when trying to save the new description I get server error.

I followed recommendation from - https://www.prestashop.com/forums/topic/317986-after-upgrade-to-16-i-cant-add-images-in-the-editor-i-get-a-litle-square-with-a-black-x-black/ and I removed \img\cms.htacces and indeed the problem was solved and now I can save product description with image.

but according to - https://www.prestashop.com/forums/topic/316255-cms-images-cant-be-displayed-unless-htaccess-file-is-deleted/ I now have a security problem.

so what should be .htaccess content? or is there another solution for TinyMCE problem?

my \img\cms.htacces file:

<IfModule mod_php5.c>
    php_flag engine off
</IfModule>
deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png)$">
    order deny,allow
    allow from all
</Files>
1
What's your image extension ? For the moment your htaccess only allows jpg gif and png images - Florian Lemaitre
I try to insert gif image. - Atara

1 Answers

0
votes

Can you try with this file?

<IfModule mod_php5.c>
    php_flag engine off
</IfModule>
Require all denied
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png)$">
    Require all granted
</Files>

Since Apache 2.4 mod_access_compat has been replaced by mod_authz_host.

Here is an upgrading documentation