Jump to content

Problem with adding images


matyasvane

Recommended Posts

Hello,
I'm having trouble adding images to products with prestashop 8.1.3. I tried eMagicOne and it works fine there. I get the error: Invalid form data.

 

Console error:
Failed to load resource: the server responded with a status of 400 ()

Debug:
No route found for "GET /sell/catalog/products-v2/images/add": Method Not Allowed (Allow: POST)

 

image.thumb.png.f9cda7c3d77dfe4bdfb7b5cadd286ab2.png

 

image.thumb.png.82fdbf4e05002c82643b031e9a5520b5.png

How i can please fix that? :(

Edited by matyasvane (see edit history)
Link to comment
Share on other sites

Hello,

Error Analysis:

"Invalid form data": This likely indicates a problem with the format or content of the image data being submitted.
"Failed to load resource: the server responded with a status of 400": This confirms an error on the server side, likely related to the invalid form data.
"No route found for GET /sell/catalog/products-v2/images/add": Method Not Allowed (Allow: POST)": This means the browser is attempting a GET request, while the server expects a POST request for this action.

Troubleshooting Steps:

1) Check Image Requirements:
Ensure images meet PrestaShop's format, size, and dimension requirements (usually JPG, PNG, GIF, max size around 2MB).
Optimize images for web use to reduce file sizes.

2) Clear Cache and Cookies:
Clear your shop, browser cache and cookies, as they can sometimes interfere with form submissions.

3) Disable Conflicting Modules:
Temporarily disable modules related to image optimization, product management, or JavaScript to rule out conflicts.

4) Inspect JavaScript Errors:
Open your browser's developer console and check for JS errors that might be preventing image uploads.

5) Verify Server Permissions:
Ensure your server has the correct permissions to write files to the /img/ directory where product images are stored.

6) Investigate Module Issues:
If the issue started after installing a new module, try disabling or uninstalling it to see if it resolves the problem.

Remember to provide as much detail as possible about your setup, steps taken, and any additional error messages for more tailored guidance.

Good day

Link to comment
Share on other sites

Check you server settings for security/firewall e.g. there might by apache mod_security blocking the upload - you can see this in the logs and whitelist it accordingly

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...