After clicking the translation button, you will encounter a pop-up window “mysterious” flashback problem and solution
Recently, I am adding multi-language support for my WordPress blog, and chose Polylang with AutoPoly plugin to realize automatic translation and synchronization of content. Everything went smoothly, until I translated a Chinese blog post into English, and encountered a strange phenomenon: after clicking the translation button, the page will flash, and then the pop-up window disappears immediately, and the English translation cannot be generated.
After some investigation, I finally found the ‘culprit’ – the title of the article <?php ?> mark. This article records the phenomenon, analysis process and solutions of the problem, hoping to help friends who encounter similar problems.
1. Problems
In the WordPress background editor, there is an already written Chinese article. When using the ‘auto-translation’ function of Polylang + AutoPoly, the interface will briefly pop up, but it will automatically close in less than a second, without any error message, and the translation cannot be completed. The whole process is shown below:

As shown in Figure 1: After clicking the start translation button, the pop-up window flashes

As shown in Figure 2: The pop-up window disappears immediately, the content is not translated
At first I suspect that it was caused by a special character, such as invisible zero-width spaces, BOM first, etc. I even deleted most of the content of the article, leaving only a few paragraphs, but the problem still exists.
The investigation process
- Check php error log
View the server error log, there are no relevant records. AutoPoly also does not output any debugging information. - Delete content one by one
I tried to delete the text of the article through the dichotomy method, and found that even if the text is completely empty, the problem still occurs. Explain that the problem is not in the body, but the title (title). - Check the title content
I looked at the title of the article and found that it contains php code tags:
<?php ?>

Figure 4: The title contains <?php ?> Screenshot
Note: You must switch to the code editor to find the problem, if you can’t find it in the visual editor. as shown in Figure 3

In WordPress, headings usually allow saving ordinary text and some HTML entities, but <?php ?> It is the original tag of PHP and is not a legitimate header content (although the database can be stored). When AutoPoly parses the title and sends it to the translation service, it is likely that the request will be interrupted due to the inability to handle this tag correctly, causing the pop-up window to close directly.
The solution
delete the title <?php ?> tag, change it to normal text, for example:
- Original title:
<?php Get the current user information ?> - After modification:
Get current user information

Figure 5: Editing interface after modifying the title
After saving the article, try to use autopoly translation again, the pop-up window is displayed normally, the translation task is successfully submitted, and the English version is successfully generated.

Figure 6: The pop-up window has not disappeared
The cause analysis
The AutoPoly plugin interacts with translation engines such as DeepL, Google Translate, etc., and preprocesses the title and content of the article. When encountering <?php ?> When such a PHP tag, the plugin may:
- Identify it as a potential code injection and refuse to deal with it
- Or when parsing the title, the JSON data structure fails due to format exceptions
- Or the translation API returned an error but the plugin did not capture the display
Since AutoPoly does not give a clear error message, the problem is ‘it disappears when the pop-up window is flashed’. After deleting the PHP tag, the title becomes plain text, and the translation process returns to normal.
5. Summary and suggestions
If you’re experiencing a similar issue of ‘disappearing after the pop-up window flashes’ when using Polylang + AutoPoly (or any other automatic translation plugin), you can check in the following order:
- Check the title: Remove any special symbols, PHP tags, unclosed HTML tags.
- Check summary (Excerpt): Also avoid abnormal characters.
- Check custom fields: Some plugins will add custom fields to the article, and try not to include PHP code in the field values.
- Temporarily deactivate other plugins: exclude conflicts.
- To view the browser console: Press F12 to open the developer tools to see if there are error messages in the Console and Network tabs.