QTranslate/Yoast - Meta Description disappear

Find no solution for that problem!

[:de]German[:en]English

After saving the site its just like this: GermanEnglish

Title and keywords are working but the different description with two languages won´t work.

Thanks for your help!

Answers


The problem is the javascript in Wordpress Seo PlugIn named: wp-seo-metabox.js

There is a javascript that "clean" the textarea value with a regex: function yst_clean(str) { if (str == '' || str == undefined) return '';

try {
    str = str.replace(/<\/?[^>]+>/gi, '');
    str = str.replace(/\[(.+?)\](.+?\[\/\\1\])?/g, '');
} catch (e) {
}

return str;

}

I have removed the try-catch block. I didn't know the reason why there is this regex, but in my case the plugins works fine without it.


My solution:

in functions.php

/**
* Enable qTranslate for WordPress SEO
*
* @param string $text The string to translate
*
* @return string
*/
function qtranslate_filter( $text ) {
return __( $text );
}

add_filter( 'wpseo_title', 'qtranslate_filter', 10, 1 );
add_filter( 'wpseo_metadesc', 'qtranslate_filter', 10, 1 );
add_filter( 'wpseo_metakey', 'qtranslate_filter', 10, 1 );
add_filter( 'wpseo_opengraph_title', 'qtranslate_filter', 10, 1 );

in wp-seo-metabox.js (/wp-content/plugins/wordpress-seo/js)

    function yst_clean(str) {
        if (str == '' || str == undefined)
            return '';

        try {
            str = str.replace(/<\/?[^>]+>/gi, '');
    //      str = str.replace(/\[(.+?)\](.+?\[\/\\1\])?/g, '');
        } catch (e) {
        }

    return str;
}

Need Your Help

c++ free(none gpl ) webservice framework

c++ web-services free

im looking for good freeware that is not GPL c++ webservices frame work