Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Meta descriptions broken since 1.2.7

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Joost de Valk

    (@joostdevalk)

    Hi Andrey,

    that’s weird as those versions didn’t change much in that area. Where do you see the question marks and where don’t you see those? Are they ok in the backend?

    Hello!

    In the backend I have the following template for Meta Description fileld: %%excerpt%%

    With WordPress SEO plugin version 1.2.5 I have the following meta value:
    <meta name="description" content="Не знаю, для кого как, а для меня культура - когда соседи мусор в окна не выкидывают."/>

    With upgrade to version 1.2.7 I got the following:
    <meta name="description" content="?? ????, ??? ???? ???, ? ??? ???? ???????? - ????? ?????? ????? ? ???? ?? ??????????. ?????? ???????? ?????????? ?? ?????? ????."/>

    I have some other plugins installed, but in this case the only difference is WordPress SEO version. I’ve checked the problem several times and it persists.

    I have faced the same problem with version 1.2.7

    Plugin Author Joost de Valk

    (@joostdevalk)

    That’s weird, are you using UTF-8 everywhere? Including for your database?

    Please…

    wordpress-seo/inc/wpseo-functions.php, line 156

    v 1.2.5:

    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 ),

    v 1.2.7:

    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : utf8_encode( substr( strip_shortcodes( strip_tags( utf8_decode( $r->post_content ) ) ), 0, 155 ) ),

    I don’t think it’s database issue

    Why don’t you use wp_trim_excerpt() function or something similar?

    Use this:

    ‘%%excerpt%%’ => ( !empty($r->post_excerpt) ) ? strip_tags( $r->post_excerpt ) : mb_substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155,’utf-8′ ),

    I know Joost doesn’t like it, but still you can give it a try…

    Have the same issue for 1.2.8.2 but only for some posts (in Russian).
    Will use the fix from 1.2.5 above for now (reverting line 156 in wordpress-seo/inc/wpseo-functions.php fixed it) but I hope it won’t be broken again after next plugin update.

    The page that was broken example

    The problem is still persist in 1.2.8.3

    Should I fix plugin code after each upgrade?

    Hey guys, can you fix that bug already?

    I’ve found three solutions for this problem:

    ‘%%excerpt%%’ => ( !empty($r->post_excerpt) ) ? strip_tags( $r->post_excerpt ) : mb_substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155,’utf-8′ ),

    ‘%%excerpt%%’ => (!emptyempty($r->post_excerpt)) ? strip_tags($r->post_excerpt) : wp_html_excerpt(strip_shortcodes($r->post_content),155),

    and simply (this certainly works for Polish language I don’t know what about the rest of them):

    ‘%%excerpt%%’ => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 ) ,

    These solutions work for Chinese, Polish, Russian and Romanian national characters. This is a genuine proof that they are good enough to be incorporated to your plugin, isn’t it?..

    The plugin was updated about billion times this week and each time I (among many others) had to edit wpseo-functions.php manually (and I have 10 or so WordPress sites so it became a huge problem!)…

    Please, please, please fix this soon.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Meta descriptions broken since 1.2.7’ is closed to new replies.