• Guille

    (@guillemartin)


    Hi,

    I’ve got a small issue that you may be able to help.

    Just after last week/s updates suddenly the crop tool stop working (using in Wp backend), when click crop it says: “Flailed to crop image” and I get this on the console: “requested an insecure XMLHttpRequest endpoint ‘https://****.***/wp-json/aiarc/v1/crop/’. This request has been blocked; the content must be served over HTTPS

    The weird thing is that only happens in production site and not staging and they are both identical now.

    Wordpress version: 5.6
    ACF Pro version: 5.9.3
    ACF Crop version: 5.0.5

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author joppuyo

    (@joppuyo)

    Seems like your site is served over HTTPS but the REST API is accessed over HTTP.

    Could you check that under Settings -> General, WordPress Address (URL) and Site Address (URL) start with https:// ?

    If not, change them from https:// to https:// and try if cropping works again.

    Thread Starter Guille

    (@guillemartin)

    I’ve just double checked and Site address is actually set as https://

    Plugin Author joppuyo

    (@joppuyo)

    Alright, thanks for checking the site URL.

    Looking at the error message, it looks like the API endpoint is wrong, in addition to being HTTP instead of HTTPS, there is an extra trailing slash, it’s /wp-json/aiarc/v1/crop/ instead of /wp-json/aiarc/v1/crop .

    Do you have some sort of trailing slash redirection in Apache/nginx configuration or .htaccess? In that case, it should be done in a way that does not affect the REST API.

    Hi,

    I’m getting the same “Failed to Crop” message when attempting to crop an image in wp-admin.

    I also get the following console error on page load:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) /***/wp-json/wp/v2/:1

    After clicking the “Crop” button, I also get the following console error:

    POST https://***/wp-json/aiarc/v1/crop 500 (Internal Server Error) xhr.js:184

    I’m using the same versions as @guillemartin, but if I revert to version 4.1.4 of the plugin, I don’t get any errors and the crop works fine.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Failed to crop’ is closed to new replies.