Common IssuesTranslating a long Classic Editor-based post fails
Translating a long Classic Editor-based post fails
Translating a long Classic Editor-based post might fail when using an API that offers a small number of max tokens (eg: DeepSeek V3 offers only 8K max tokens).
The reason is that the Classic Editor contains a single blob of HTML content to translate. If this string is longer than the number of max tokens, then it can't be sent over the request.
You will then see the following error message in the logs:
🔴 ERROR [Query "translate-customposts"] Execution with errors: String to translate exceeds max length of '...': ...
As solution, you can:
- Switch to an API service that offers a higher number of max tokens
- Switch to the Gutenberg editor, migrating the single HTML content to multiple Gutenberg
html
blocks, where each block does not exceed 8000 characters
Posts based on the Gutenberg editor are organized via blocks, and the block properties can be translated independently. As the multitude of strings is split into multiple requests, it doesn't matter if the post is long.