• On my website, I have the woocommerce plugin and I’m using the yihtheme advanced product reviews plugin so people can add photos to their reviews.

    When testing, if someone leaves a review with just text, it posts fine. If a review is attempted with an image uploaded, it directs to a 404 error for wp-comments-post.php and the review doesn’t post.

    I’ve tried other plugins that allow photo attachments and they all do the same thing, so it’s not exclusive to the plugin that I am using. The error only happens when we attempt to upload a photo with the review. The error happens with a regular user as well as an admin, although once I got a photo/review to post under my admin name but I’m not sure why it worked that one time.

    I’ve tried disabling plugins, changing themes, different image sizes and more. I’ve tried it in Safari, Firefox and Chrome….nothing works.

    I’ve googled some fixes in regards to a 404 error with the wp-comments-post.php page and they’re all in regards to regular comments and editing the .htaccess file. My .htaccess file currently has the following within it:

    #Please Note: Optimized WordPress is a Managed Platform offering, and this file has been configured to work under this managed platform. Changes to this file are not recommended and may impact our ability to provide support for your WordPress site.##
    
    # BEGIN WPSuperCache
    # END WPSuperCache
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    On Google, for the regular comments, people are suggesting to add this to the .htaccess file and I tried, but it does nothing for me:

    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.*EXAMPLE.com.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) https://%{REMOTE_ADDR}/$ [R=301,L]

    I tried adding it before the “ifmodule”, after, within it and nothing (EXAMPLE.com was changed to my domain name, so I know that wasn’t the error)

    I’ve tried adding the plugin User Role Editor to make sure the ability to upload files is allowed by users that are a “customer”….doesn’t work.

    I feel like it has something to do with permissions to be able to upload files, but if that is the case I am not sure why it doesn’t work for the admin either.

    I’ve been trying things for weeks and nothing works. Its annoying because I know reviews with photos play a big role in promoting sales and I cant get it to work and its frustrating/embarrassing to have people email saying they’re trying to leave a review and they cant leave one because they’re trying to add a photo. I feel like if they don’t add photos, then it just looks like I’m creating accounts and adding my own reviews and I don’t want that. Right now everyone that would be leaving reviews, I sent them the items free specifically for them to test and leave reviews WITH photos. Right now they’re just posting reviews on Instagram, but I’ve had my Instagram account shut down before (not sure why because I never did anything wrong) so I don’t want to put my apples in someone else’s basket, I’d rather them be on a platform I can control but right now its not really working out how I wanted.

    I don’t really have the money to hire a developer to troubleshoot. I’m pretty good at the basics and troubleshooting myself and fixing stuff based on context, googling and understanding the basics of PHP, but it seems figuring this out is beyond me. Can anyone help?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404 error when trying to upload photos with a product review’ is closed to new replies.