• This plugin breaks the ability to clear cache on WP Engine sites. The REST route /wp-json/wpe/cache-plugin/v1/clear_all_caches that is registered by a WP Engine MU Plugin returns a 502 error with the response unable to send to backend when this plugin is active.

    I am seeing this error on multiples sites and I’ve tested on plugin versions 4.3.3 and 5.X

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter dave carpenter

    (@davecarpenter)

    This only appears to be an issue on sites with basic authentication enabled

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,

    hope you’re fine, sorry for the issue you’re facing. Can you try exclude the /wp-json/ path on exclude url ? May you can contact [email protected] and mention this thread. I’ll keep this thread up to date but if I need to send you a patch version or make some test it will be easier

    Regards

    Thread Starter dave carpenter

    (@davecarpenter)

    Hi Edson,

    I set up this exclusion in the Weglot dashboard, but it does not seem to solve the problem.

    https://imgur.com/a/YHjTZYC

    Thanks,
    Dave

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter
    Thanks for the try it’s help ;). I’ve open an issue on our side i keep you in touch. Do you think you can make a short video or screen of how you purge the cache in wp engin to reproduce it on my own environement?

    Regards

    Thread Starter dave carpenter

    (@davecarpenter)

    I’m not sure you would be able to reproduce it without the WP Engine cache plugin itself.

    An AJAX POST request is made to a custom REST endpoint: /wp-json/wpe/cache-plugin/v1/clear_all_caches. The server responds with a 502 code and the message unable to send to backend. I’m not able to find this response string in any code on the site so I’m not sure where it’s coming from. I registered my own REST API endpoint and sent a POST request from the same page using the browser console and that worked fine.

    The only other clue is that this error only occurs on sites that have basic authentication enabled. I tried bypassing basic authentication with the http_request_args hook but that did not work either.

    The issue persists across multiple sites with Weglot installed.

    I will also reach out to WP Engine support and see if they have any insight.

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,

    thanks for your message, it’s help. I try to reproduce it on my side an i’ve this endpoint : index.php?rest_route=/wpe/cache-plugin/v1/clear_all_caches
    to have it I do https://www.loom.com/share/e795944a24034f5d83b14407b33336f6 : can you confirm it the right steps ? I want to be sure i’ve the right context before install Weglot and debug it

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,

    do you still facing your issue ?

    Thread Starter dave carpenter

    (@davecarpenter)

    Hey @glx77, sorry I missed your last message.

    Yes, I’m still running into the issue. The “Clear all caches” button from your Loom video is the one I’m having trouble with.

    Though I’m not sure why yours is sending a request to index.php?rest_route=/wpe/cache-plugin/v1/clear_all_caches, while mine is sending a request to /wp-json/wpe/cache-plugin/v1/clear_all_caches

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter,
    thanks for your reply, ok it’s not the same api call but if it’s the same button i’ll be able to reproduce your issue, i’ve juste have to add weglot and click to this button.

    I test it tomorrow and get you in touch
    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,

    i’ve make test here : https://www.loom.com/share/17b7a4a2284a4a6b9970219ae98c9a93 and i’m not able to reproduce on my side. Do you thin it is possible to create a temp site on your site and reproduce the issue ? If you can, can you contact [email protected] and mention this thread to be able to share access to check together ?

    I keep this thread up to date to share the solution with the community of course

    Regards

    Thread Starter dave carpenter

    (@davecarpenter)

    Hey @glx77,

    I will spin up a test site early next week and contact you via that email address.

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,
    good idea thanks for it. Don’t hesitate to mention my name (Edson) or/and this thread and they the support team will reach the access to me

    thanks for your help

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,
    hope you’re fine? Thanks for your help and your test env. I’ve find a fix, you can test it on your website and confirm it?
    the fix will be add on our next release planned for early january 2026 but if you want you can add this snippet to fix it:

    add_filter( 'weglot_active_translation', function( $active ) {
    if (
    isset( $_SERVER['REQUEST_URI'] )
    && strpos( $_SERVER['REQUEST_URI'], '/wp-json/wpe/cache-plugin/v1/clear_all_caches' ) !== false
    ) {
    return false;
    }

    return $active;
    }, 0 );

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @davecarpenter ,
    hope you’re fine ? Do you still facing your issue ?

Viewing 14 replies - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.