Support » Plugin: Translate WordPress - Google Language Translator » Currently not working with PHP 8.0.7

  • Resolved Michael

    (@michaelvdberg)


    First at all thank you for the plug-in! It’s really helpful and I love to use the plug-in!

    I have found one issue with the plug-in. I am currently using WordPress 5.8.1 with PHP 7.4.20. The plug-in works perfect without any trouble. When I update the PHP version to PHP 8.0.7 the widget in the sidebar will disappeared. Only the title (of the widget) is showing, but the dropdown menu with all the languages is not showing anymore. When I look at the source code via the inspector tool, I will get the following code:

    <div id="glt_widget-2" class="widget widget_glt_widget posts_holder"><h5>Google Translate</h5><div id="google_language_translator" class="default-language-nl"></div></div>

    When I look at the console of the inspector tool there are no warnings shown. The only (possible) warning comes from the PHP error log of the server and it says: “Access is denied by context rewrite.” But I don’t think this is related to your plug-in, right? I have installed the latest version of your plugin (6.0.11).

    Do you know if the plug-in needs a particular PHP extension to work with in PHP 8.x.x?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    Please enable debugging mode and provide more data if you can: https://wordpress.org/support/article/debugging-in-wordpress/

    Thanks! 🙂

    Thread Starter Michael

    (@michaelvdberg)

    Thank you for your reply! When I enable the wp_debug function I get only two errors in the PHP error log, which are the same but with a different timestamp. The error is:

    PHP Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in /wp-includes/functions.php on line 5107

    I disabled the Zlib output compression in the PHP settings and the errors are not showing anymore. There are no errors or issues mention on the pages where the plug-in widget is active on, such as error on line x in file x.

    After that I enabled also the JS and CSS debug function and the wp_debug_display, but I didn’t get an error or issue on the pages or in the PHP error log. Also the wp_debug_log didn’t show any errors or issues.

    I will install tomorrow a fresh installation of WordPress on a dev subdomain to see if there are possible conflicts with other plug-ins or with the WordPress theme itself on PHP 8.

    For so far, thank you! Keep you posted!

    Plugin Author edo888

    (@edo888)

    Thanks for the info, will be waiting for your findings.

    Thread Starter Michael

    (@michaelvdberg)

    Hi Edo,

    Thank you for your patience! I tried the plug-in on a fresh installation of WordPress without any other plug-in or theme. It runs only with the Twenty-Twenty-one theme on a different webserver. The plug-in works fine with PHP 7.4.20, but when I move the PHP to 8.0.7 the plug-in doesn’t work anymore. It shows only the title of the widget with the “glt_widget-2” ID. The id “google_language_translator” is showing in the source code/inspector tool, but it is completely empty. The code that shows on PHP 7.4.20 (see here below) isn’t there in the source code/inspector tool on PHP 8.

    I checked the inspector console and the PHP error log (also in WordPress debug mode) but there isn’t any error showing up.

    <div class="skiptranslate goog-te-gadget" dir="ltr" style=""><div id=":0.targetLanguage"><select class="goog-te-combo" aria-label="Widget Language Translate"><option value="">Selecteer een taal</option><option value="af">Afrikaans</option><option value="sq">Albanees</option><option value="am">Amharisch</option><option value="ar">Arabisch</option><option value="hy">Armeens</option><option value="az">Azerbeidzjaans</option><option value="eu">Baskisch</option><option value="bn">Bengaals</option><option value="my">Birmaans</option><option value="bs">Bosnisch</option><option value="bg">Bulgaars</option><option value="ca">Catalaans</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-TW">Chinees (traditioneel)</option><option value="zh-CN">Chinees (vereenvoudigd)</option><option value="co">Corsicaans</option><option value="da">Deens</option><option value="de">Duits</option><option value="en">Engels</option><option value="eo">Esperanto</option><option value="et">Ests</option><option value="fi">Fins</option><option value="fr">Frans</option><option value="fy">Fries</option><option value="gl">Galicisch</option><option value="ka">Georgisch</option><option value="el">Grieks</option><option value="gu">Gujarati</option><option value="ht">Haïtiaans Creools</option><option value="ha">Hausa</option><option value="haw">Hawaïaans</option><option value="iw">Hebreeuws</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="hu">Hongaars</option><option value="ga">Iers</option><option value="ig">Igbo</option><option value="is">IJslands</option><option value="id">Indonesisch</option><option value="it">Italiaans</option><option value="ja">Japans</option><option value="jw">Javaans</option><option value="yi">Jiddisch</option><option value="kn">Kannada</option><option value="kk">Kazachs</option><option value="km">Khmer</option><option value="ky">Kirgizisch</option><option value="ku">Koerdisch</option><option value="ko">Koreaans</option><option value="hr">Kroatisch</option><option value="lo">Lao</option><option value="la">Latijn</option><option value="lv">Lets</option><option value="lt">Litouws</option><option value="lb">Luxemburgs</option><option value="mk">Macedonisch</option><option value="mg">Malagasi</option><option value="ml">Malayalam</option><option value="ms">Maleis</option><option value="mt">Maltees</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongools</option><option value="ne">Nepalees</option><option value="no">Noors</option><option value="uk">Oekraïens</option><option value="uz">Oezbeeks</option><option value="ps">Pashto</option><option value="fa">Perzisch</option><option value="pl">Pools</option><option value="pt">Portugees</option><option value="pa">Punjabi</option><option value="ro">Roemeens</option><option value="ru">Russisch</option><option value="sm">Samoaans</option><option value="gd">Schots Keltisch</option><option value="sr">Servisch</option><option value="st">Sesotho</option><option value="sn">Shona</option><option value="sd">Sindhi</option><option value="si">Sinhala</option><option value="sk">Slovaaks</option><option value="sl">Sloveens</option><option value="su">Soendanees</option><option value="so">Somalisch</option><option value="es">Spaans</option><option value="sw">Swahili</option><option value="tg">Tadzjieks</option><option value="tl">Tagalog</option><option value="ta">Tamil</option><option value="te">Telugu</option><option value="th">Thai</option><option value="cs">Tsjechisch</option><option value="tr">Turks</option><option value="ur">Urdu</option><option value="vi">Vietnamees</option><option value="cy">Wels</option><option value="be">Wit-Russisch</option><option value="xh">Xhosa</option><option value="yo">Yoruba</option><option value="zu">Zoeloe</option><option value="sv">Zweeds</option></select></div></div>

    Plugin Author edo888

    (@edo888)

    Hi,

    If you can get my hands on the test website you have issues on it will speed up the solution. You can contact our live chat and provide the necessary information.

    https://gtranslate.io/#contact

    Thanks! 🙂

    Plugin Author edo888

    (@edo888)

    Hi,

    I have not heard back from you. Please feel free to reopen this topic if you need my input.

    Thanks! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.