voivon
Forum Replies Created
-
Forum: Plugins
In reply to: [bpost shipping] Connexion impossibleHello,
This bug is related to the 7.67 version of cURL, it’s already documented here :
https://github.com/curl/curl/pull/4623
Everyone experiencing this problem should downgrade to an older version of cURL and wait for a patch release.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] Get language varNevermind, qtranslate-separate-comments needed an update ??
Hello,
I’m using Qtranslate slug (https://www.ads-software.com/extend/plugins/qtranslate-slug/) and I’ve got the same problem, this is how I fixed it:
I noticed that links in the language widget selector were always working right so I decided to simply replace the links in the error message with these ones, using jQuery…
Edit /wp-content/plugins/qtranslate/qtranslate_core.php (this one is used by the error message) and add an id to the link:
$language_list = "<a href=\"".qtrans_convertURL('', $language)."\">".$q_config['language_name'][$language]."</a>".$language_list;
Let’s say erren or erres (err$language) depending on the language:
$language_list = "<a id="id='err$language'" href=\"".qtrans_convertURL('', $language)."\">".$q_config['language_name'][$language]."</a>".$language_list;
Now do the same for /wp-content/plugins/qtranslate/qtranslate_core.php (this one is used by the widget) for this line:
echo "<li$item_class><a href=\"$url\" hreflang=\"$lang\"$link_class>$link_content</a></li>" . PHP_EOL;
Let’s say widen or wides (wid$lang):
echo "<li$item_class><a id=\"wid$lang\" href=\"$url\" hreflang=\"$lang\"$link_class>$link_content</a></li>" . PHP_EOL;
Now go to your theme footer and add the jQuery workaround juste before the </body>, ie for english links:
<script type="text/javascript"> jQuery(document).ready(function() { if (jQuery('a#erren').length) { var widen = jQuery("a#widen").attr('href'); jQuery("a#erren").attr("href", widen); } }); </script>
You can of course improve the script and use dynamic language tags : wid$tag, err$tag
Hope this helps