Translate Plugin not working anymore

Has anyone used this Translat Fields plugin?

We were heavily depandant on this plugin but it seems it stop working about a week ago…

Access to fetch at 'https://api.deepl.com/v2/translate?auth_key=b0ddaeb5-d984-d96a-7461-e901f77b5b5f&target_lang=SL&tag_handling=xml&text=Data+Acquisition&source_lang=EN' from origin 'https://plugins-cdn.datocms.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

It looks like DeepL might’ve recently started enforcing a hard restriction on CORS:

I guess it’s been their policy for a while, but maybe they only recently started to enforce it… https://developers.deepl.com/docs/best-practices/cors-requests

You might have to do a API route to proxy that from a serverless func :frowning: Let me take a look at the plugin… looks like you already opened an issue with the dev too.

Yes seems like DeepL changed that. Shame, as it was really useful plugin, we were heavily depandant on it, even subscribed to DeepL Pro for it. I will check with DeepL guys if there is something we could do.

I saw there was already a topic on this opened on plugin github repo…

Best regards,
Primoz

For now you can use a CORS bypass browser extension like this one for Chrome: https://chromewebstore.google.com/detail/cross-domain-cors/mjhpgnbimicffchbodmgfnemoghjakai

Or for Firefox: https://addons.mozilla.org/en-US/firefox/addon/cors-everywhere/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

But the better fix to have a backend/serverless proxy that can deal with the CORS stuff… easy on Cloudflare Workers/Vercel/etc, but the plugin will have to be modified to use that…

I posted an example of a CORS proxy workaround on their Github: https://github.com/voorhoede/datocms-plugin-translate-fields/issues/59#issuecomment-2787882817

Let’s consolidate discussion there to make it easier to track (and because it’s a community plugin, not an official DatoCMS one), is that ok? :slight_smile:

Version 1.13.1 should fix the problem. We worked with the plugin author to utilize a Dato-provided proxy (currently in beta) to bypass DeepL’s CORS restrictions. Updating to the latest version of the plugin should restore functionality.

It is fixed for us for sure…

BTW: no reply yet from DeepL. I will follow up.

Thank you from the bottom of the heart to fix this so quickly. DatoCMS team is really the best and can be relied uppon!

BR
Primoz

1 Like