-
AuthorPosts
-
August 23, 2019 at 11:24 am #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.August 24, 2019 at 4:03 am #1130520August 26, 2019 at 6:06 am #1130857Hi, 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);
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.
August 28, 2019 at 2:04 pm #1131599Hi,
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,
IsmaelAugust 30, 2019 at 9:42 am #1132222Hi!
In Version 4.6 there is a new filter you can use:
avf_avia_backend_truncate_string
Cheers!
GünterOctober 15, 2019 at 8:32 am #1147987Hi Günter,
Thank you so much for include the filter to Enfold!
I’ll try it right away.Sincerely,
nononotchOctober 16, 2019 at 6:14 am #1148299Hi,
Thanks for the update. Please let us know if you should need any further help on the topic.
Best regards,
RikardOctober 16, 2019 at 11:39 am #1148413Hi,
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.
October 17, 2019 at 2:51 am #1148747Hi,
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,
IsmaelOctober 17, 2019 at 11:48 am #1148888Hi 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.
October 18, 2019 at 5:13 am #1149087Hi,
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,
RikardOctober 18, 2019 at 8:00 am #1149158Hi, Rikard
Your team can close this topic.
Thanks a lot.Best regards,
nonononotchOctober 18, 2019 at 10:25 am #1149194 -
AuthorPosts
- The topic ‘Mysterious garbled character of only one letter in excerpt of Blog posts Element’ is closed to new replies.