Translate button unable to translate one post, popup error - The field Text must be a string or array type with a maximum length of '5000'

Folks are reporting issues with translating one particular post from spanish into english - when they select the translate button, an error pops up. On latest. Also in safe mode with theme and unofficial plugins disabled. The post only has about 3000 characters so under the limit. Works fine with other posts.


The javascript console also shows an error.

Any thoughts on what’s going on here?


Try removing letters until it works on a demo post? What is the threshold?

1 Like

Huh. I was able to find the source of the problem but I do not understand it. :slight_smile:

I created a demo post with the same exact text, and was able to replicate the error in the demo post. Then I removed this image from the first line:


And it successfully translated with no error.

It seems Microsoft is unhappy with something in that string of markdown.


@kris.kotlarek can you investigate this issue?


Is that post publicly available? Could you send me a link?

I generated myself random Spanish text with 4000 characters, added image and it was translated correctly, so there must be something specific in your case.

I would like to copy the content to reproduce it on my machine


This is the topic. Still exhibiting same problem.


Perfect, thank you! I see that error on my machine.

I will check what is wrong there


I investigated that issue and it is a valid case.

To keep all text formatting like bold, italic, images etc. HTML code is sent to translation service. In your case it is 5365 characters.

As an alternative, you may want to check Google, because they got higher limits Quotas & Limits  |  Cloud Translation  |  Google Cloud

Before making decision please estimate your usage because google may be more expensive.

I checked it on your example post and it was translated without an error


Hi Kris! Thanks for looking into this issue. I see. I had thought it was a bug because the markdown is about 3000 characters, well below the limit. But the plugin sends the baked html which ends up being larger than the limit. Makes sense.

It would be nice if the error were a bit more human friendly, but this situation is rare. Thanks for helping resolve it.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.