Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve been looking into this problem and have found that when the problem occurs, there is a chunk of code missing from the page (the select element). Your code looks for :

    var classic = jQuery('.goog-te-combo');

    and fails to find it because that section has been replaced by .

    Do you have any idea what would be causing this to happen under certain circumstances?

    The good & bad code is (no formatting – please expand to make it readable for yourself):

    GOOD:

    <section id="glt_widget-2" class="widget widget_glt_widget"><div class="widget-wrap"><div id="flags" class="size18"><ul id="sortable" class="ui-sortable" style="float:left"><li id="Dutch"><a href="#" title="Dutch" class="nturl notranslate nl flag Dutch" data-lang="Dutch"></a></li><li id="English"><a href="#" title="English" class="nturl notranslate en flag English" data-lang="English"></a></li><li id="French"><a href="#" title="French" class="nturl notranslate fr flag French" data-lang="French"></a></li><li id="German"><a href="#" title="German" class="nturl notranslate de flag German" data-lang="German"></a></li><li id="Italian"><a href="#" title="Italian" class="nturl notranslate it flag Italian" data-lang="Italian"></a></li><li id="Spanish"><a href="#" title="Spanish" class="nturl notranslate es flag Spanish" data-lang="Spanish"></a></li></ul></div><div id="google_language_translator" class="default-language-en"><div class="skiptranslate goog-te-gadget" dir="ltr" style=""><div id=":0.targetLanguage"><select class="goog-te-combo" aria-label="Widget &quot;Sprache übersetzen&quot;"><option value="de">Deutsch</option><option value="en">Englisch</option><option value="fr">Französisch</option><option value="it">Italienisch</option><option value="nl">Niederländisch</option><option value="es">Spanisch</option></select></div>Powered by <span style="white-space:nowrap"><a class="goog-logo-link" href="https://translate.google.com" target="_blank"><img src="https://www.gstatic.com/images/branding/googlelogo/1x/googlelogo_color_42x16dp.png" width="37px" height="14px" style="padding-right: 3px" alt="Google Google Übersetzer">Google Übersetzer</a></span></div></div></div></section>
    

    BAD:
    <section id="glt_widget-2" class="widget widget_glt_widget"><div class="widget-wrap"><div id="flags" class="size18"><ul id="sortable" class="ui-sortable" style="float:left"><li id="Dutch"><a href="#" title="Dutch" class="nturl notranslate nl flag Dutch" data-lang="Dutch"></a></li><li id="English"><a href="#" title="English" class="nturl notranslate en flag English" data-lang="English"></a></li><li id="French"><a href="#" title="French" class="nturl notranslate fr flag French" data-lang="French"></a></li><li id="German"><a href="#" title="German" class="nturl notranslate de flag German" data-lang="German"></a></li><li id="Italian"><a href="#" title="Italian" class="nturl notranslate it flag Italian" data-lang="Italian"></a></li><li id="Spanish"><a href="#" title="Spanish" class="nturl notranslate es flag Spanish" data-lang="Spanish"></a></li></ul></div><div id="google_language_translator" class="default-language-en"><div class="skiptranslate goog-te-gadget" dir="ltr" style=""><div id=":0.targetLanguage" class="goog-te-gadget-simple" style="white-space: nowrap;"><img src="https://www.google.com/images/cleardot.gif" class="goog-te-gadget-icon" alt="" style="background-image: url(&quot;https://translate.googleapis.com/translate_static/img/te_ctrl3.gif&quot;); background-position: -65px 0px;"><span style="vertical-align: middle;"><a aria-haspopup="true" class="goog-te-menu-value" href="javascript:void(0)"><span>Sprache auswählen</span><img src="https://www.google.com/images/cleardot.gif" alt="" width="1" height="1"><span style="border-left: 1px solid rgb(187, 187, 187);">​</span><img src="https://www.google.com/images/cleardot.gif" alt="" width="1" height="1"><span aria-hidden="true" style="color: rgb(118, 118, 118);">▼</span></a></span></div></div></div></div></section>

    regards
    Mark

    • This reply was modified 3 years, 11 months ago by mark2048.

    ah! sorry – https://www.urbanbait.co.uk/

    Also we got someone in spain to test on a mobile browser, and the flags are not responsive at all, nothing happens.

    I cannot replicate this problem on any browser myself, using a VPN from other countries or not all the flags work fine.

    thanks.

    I get exactly the same problem as this! So frustrating – works fine for me & a colleague, not working at all for a couple of other people, works fine for others.

    I also had the same problem when developing locally – safari browser would not work, chrome partially worked (2 flags ok, the rest not), firefox was fine! When I added a language then deleted it all browsers started to work. On the production site this fix didn’t work & several people still find the flags do nothing.

    The problem seems to be that when a flag is clicked there are no calls made at all to translate.googleapis.com , for some people using some browsers. When this happens, it’s not intermittent – it always makes no calls every time the flag is clicked.

    Any idea why this happens or how to debug this bizarre problem?

    Thread Starter mark2048

    (@mark2048)

    Hi

    Currently : Newsmag v4.2 , WPBakery 5.7

    With the same versions of these plugins, using 0.6 of your plugin ‘max-width’ was written out as an inline style key, but newer versions generate ‘width’.

    Looking at the amp_post_template_add_styles($amp_template) code, it seems that v0.6 used to find styles: $styles = $amp_template->get( ‘post_amp_styles’ ) but the newer versions find stylesheets, in $stylesheets = $amp_template->get( ‘post_amp_stylesheets’ )

    Thread Starter mark2048

    (@mark2048)

    – not sure how to edit the original post : Newsmag is of course the Theme, not a style.

Viewing 5 replies - 1 through 5 (of 5 total)