matyasvane Posted January 18, 2024 Share Posted January 18, 2024 (edited) 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) How i can please fix that? Edited January 18, 2024 by matyasvane (see edit history) Link to comment Share on other sites More sharing options...
PrestaServicePro Posted January 18, 2024 Share Posted January 18, 2024 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 More sharing options...
JBW Posted January 18, 2024 Share Posted January 18, 2024 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 More sharing options...
matyasvane Posted January 18, 2024 Author Share Posted January 18, 2024 the strange thing is that I can upload some pictures and some can't. They are 1.4mb in size. php is allowed 128mb. I don't know what the problem is Link to comment Share on other sites More sharing options...
matyasvane Posted January 18, 2024 Author Share Posted January 18, 2024 (edited) + i using nginx, so i dont have there mod_security. I would also like to say that it worked for me, but it stopped working after installing the SOAP php extension Ok SOAP is problem, why? Edited January 18, 2024 by matyasvane (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now