• Resolved samosamo

    (@samosamo)


    Hello. Please assist on translating our page. It used to work for 3 years, but does not work anymore. WHen I press “Translate page” the page is blank.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for reaching us!

    There are a number of things that can cause a white page when opening the translation interface.

    1. CSP Error -> ALWAYS CHECK FOR THIS FIRST
      To verify this open the developer console and look for a CSP error in red (console tab).

    To fix, try to install Really Simple SSL.

    1. JavaScript error caused by minification and merging of javascript files in plugin such as WP-Optimize.
      There is an option in the plugin to exclude specific javascript so they will be ignored.

    These JS files are used only in Translation Editor, so you can definitely skip any optimization on them
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-editor.js
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-string-translation-editor.js
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-iframe-preview-script.js
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-editor-overlay.js

    These scripts appear for visitors too. You can skip optimization for them if you notice JS errors or misbehaviour regarding WooCommerce cart not being translated or other JS added text not being translated.
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-translate-dom-changes.js
    /wp-content/plugins/translatepress-multilingual/assets/js/trp-frontend-compatibility.js

    If the JS error encountered is not due to minification please send me the error displayed in your browser console.

    1. PHP Error -> Enable WP_DEBUG, see what the error is in your wp-content/debug.log .

    Common problems:
    PHP Memory Limit Reached -> needs to be increased
    PHP Fatal error: Call to undefined function mb_http_output() -> the server needs to have the Multibyte String PHP library installed: https://php.net/manual/en/book.mbstring.php

    Let me know about this!

    Kind Regards,

    Thread Starter samosamo

    (@samosamo)

    Thank you for your reply. Sadly I don’t have the knowledge to fix the problem using your instructions. Translate page is still white. ;(

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    It may happen when you use a speed optimization plugin. These plugins compress all JS files into one file, but this process can create errors when you load a page.
    See if you have this type of plugins, disable it and try again to do the translation. If not, try a full compatibility test: disable all other plugins and enable the default Twenty Twenty theme. If this fixes the problem, as it probably will, enable everything one by one or in small chunks, checking each time to see when the problem returns.

    jelmerjellema

    (@jelmerjellema)

    I fixed this mixed content problem with a ssl plugin. But I don’t understand what’s happening. We made a duplicate of a site. The duplicate runs fine with the newest Translatepress, while the live site starting showing mixed content errors when translating pages: the iframe was loaded over http instead of https. Both site urls are https. The only difference is, that in the staging site, the site_url was forced in wp-config, while in live it was just set in the dashboard settings.

    Googling about, I found this is an old error that turns up once in a while. Wouldn’t this be something Transelatepress can fix very easily by always using the site_url in the iframe?

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    Glad to know it works now.
    It depends on how the link is made. If it is from the theme and uses home_url() the link will always have an incorrect link.

    home_url() will always have the language in it. The plugin or the theme need to use site_url or , much better, the wp_login_url: https://www.example.com/wp-login.php

    jelmerjellema

    (@jelmerjellema)

    Hi Alex, thanks for your support. I don’t get it thought. When you write “the plugin need to use site_url or much better wp_login_url” what plugin do you mean? As we are talking about the backoffice site of Translatepress using the wrong url in opening their translate iframe, isn’t the plugin you are talking about translatepress itself? It’s you who generate the code for the iframe. Or do I misunderstand?

    Regards, Jelmer

    Plugin Support Alex

    (@alexcozmoslabs)

    Could you please send me the error you encountered? Screenshots will help as well.

    Hi Alex,

    Sorry, as we have already fixed it, I can’t get to errors or screenshots. But when googling, I see more people have this problem. When going into translate mode, TP opens an iframe, but it (sometimes?) does that using http instead of https, so browsers block the iframe. We fixed it by forcing SSL and setting the https address in wp-config instead of in the WordPress admin settings.

    The solution is for TP to create the iframe using site_url instead of building the url to the iframe itself.

    Sorry I can’t show anything more now. When we encounter it again, I will reopen this ticket.

    Regards, Jelmer

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘BLank page when pressing “Translate”’ is closed to new replies.