Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1130292

    Hi! I’m a user of Enfold in Japan.

    Please help me.
    When I write Japanese text in a blog, the mysterious garbled only one letter is shown in end of excerpt in Blog posts Element.

    It occurs when all of the following conditions are met:
    1) When type the text in Japanese.
    2) When a line break occurs in the text before the end of the excerpt.

    There is no problem in English. Even in Japanese, this problem does not occur if there is no line break before the end of the excerpt.
    There is no problem in other theme, for example Twenty series.

    View post on imgur.com

    #1130520

    Hey nonononotch,

    How exactly are you adding a the line break?

    Best regards,
    Rikard

    #1130857

    Hi, Rikard

    Thank you for your message.
    I self-solved the problem.

    In conclusion, this was a problem with line feed codes and was specific to Japanese.
    It was solved by forcibly removing the Japanese line feed code from the excerpt.

    > Edited file
    wp-content > themes > enfold > framework > php > function-set-avia-backend.php

    > Added code
    $string = str_replace(array("\r\n","\r","\n" ), '', $string);

    View post on imgur.com

    This solution is temporary. If left untouched, users will need to make this fix every time Enfold or Avia Framework is updated.
    And, this problem can occur not only in Japanese but also in other foreign languages, using Multibyte Character Set.
    I hope the Enfold team will solve this problem if possible.

    Thank you.

    • This reply was modified 5 years, 4 months ago by nonononotch.
    #1131599

    Hi,

    Thank you for the info.

    We’ll forward the solution to the dev team for consideration. The modification might have some unknown effects, so it might require more testing.

    Best regards,
    Ismael

    #1132222

    Hi!

    In Version 4.6 there is a new filter you can use:

    avf_avia_backend_truncate_string

    Cheers!
    Günter

    #1147987

    Hi Günter,

    Thank you so much for include the filter to Enfold!
    I’ll try it right away.

    Sincerely,
    nononotch

    #1148299

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

    #1148413

    Hi,

    I tried it and failed. I wrote below code on functions.php, but didn’t work.

    function blog_posts_excerpt_bugfix() {
        $string = str_replace(array("\r\n","\r","\n" ), '', $string);
        return $string;
    }
    add_filter('avf_avia_backend_truncate_string', 'blog_posts_excerpt_bugfix', 10, 1);

    Coud you check my code & tell me correct code?

    Best regards,
    nonononotch

    • This reply was modified 5 years, 2 months ago by nonononotch.
    #1148747

    Hi,

    Thank you for the update.

    You need to add the $string parameter in the “blog_posts_excerpt_bugfix” callback.

    function avf_blog_posts_excerpt_bugfix($string) {
        $string = str_replace(array("\r\n","\r","\n" ), '', $string);
        return $string;
    }
    add_filter('avf_avia_backend_truncate_string', 'avf_blog_posts_excerpt_bugfix', 10, 1);

    Best regards,
    Ismael

    #1148888

    Hi Ismael,

    Thank you so much for checking my code!
    That’s perfect! Your code and new-filter worked perfectly.

    I became more and more a fan of you.
    Keep good support and making good products in the future!

    ARIGATO !
    nonononotch

    • This reply was modified 5 years, 2 months ago by nonononotch.
    #1149087

    Hi,

    Great, I’m glad that Ismael could help you out and thanks for the kind feedback :-)

    Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1149158

    Hi, Rikard

    Your team can close this topic.
    Thanks a lot.

    Best regards,
    nonononotch

    #1149194

    Hi,

    Awesome! Please don’t hesitate to open a new thread if you need anything else.

    Have a nice day.

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Mysterious garbled character of only one letter in excerpt of Blog posts Element’ is closed to new replies.