Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

existing posts with page.summary went wrong after update to 1.3.3 #1644

Closed
tidiview opened this issue Sep 9, 2017 · 3 comments
Closed

existing posts with page.summary went wrong after update to 1.3.3 #1644

tidiview opened this issue Sep 9, 2017 · 3 comments
Assignees
Labels

Comments

@tidiview
Copy link

tidiview commented Sep 9, 2017

After updated to 1.3.3, exisiting posts with page.summary function went wrong for me: it has been now cutting before === page summary delimiter: please find details below.

This is due to version 1.3.3 CHANGELOG here

New page.summary now cut at === delimiter BUT with count HTML tags so that it's now too short for me.

Removing the following part of 1.3.3 code by previous version 1.3.2 solved the issue:
line 522 of \system\src\Grav\Common\Page\Page.php

if (mb_strwidth($content, 'utf8') > $summary_size) {
                return mb_strimwidth($content, 0, $summary_size);
            } else {
                return $content;}           

by

return mb_substr($content, 0, $summary_size);

Sorry, I don't have sufficient technical php skills: please, help.

Here the structure of my .md file for more information:

some header with parameters:
summary:
    enabled: true
    format: short
    size: 0
---

! わたしたちが今日ふつう「女大学」と呼んでいるのは、
! この書の本文を受けついで編まれた教順書類である。<---This is page summary in japanese  

===  <--- This is page summary delimiter

##概要 <--- This is rest of page content in japanese
@rhukster
Copy link
Member

I will look into this tomorrow.

@rhukster rhukster self-assigned this Sep 11, 2017
@tidiview
Copy link
Author

Thanks. I'll have a look tomorrow then

@rhukster
Copy link
Member

Please try the fix above.

@rhukster rhukster closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants