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

Page Break block ( core/nextpage ) not working as expected in Full Site Editing #29484

Open
bobbingwide opened this issue Mar 2, 2021 · 7 comments · May be fixed by #42059
Open

Page Break block ( core/nextpage ) not working as expected in Full Site Editing #29484

bobbingwide opened this issue Mar 2, 2021 · 7 comments · May be fixed by #42059
Assignees
Labels
[Block] Page Break Affects the Page Break Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@bobbingwide
Copy link
Contributor

Description

Step-by-step reproduction instructions

Using a Full Site Editing theme such as TT1-blocks

  1. Create a post with multiple page page breaks
  2. Save
  3. View
  4. The Pages: links do not appear.

Expected behaviour

Ability to view the individual pages by clicking on the links.

Pages: 1 2 3 4 5 

There should be links for the pages which aren't the current page, with each link containing the page number of the page to view. https://blocks.wp-a2z.org/block/page-break-core-nextpage/2/

n+1 pages where n = number of page break blocks used.

Actual behaviour

The Pages: links do not appear.
It is possible to navigate to the other pages. But there are no visual clues.
image

Screenshots or screen recording (optional)

Expected results. Unchanged from how it works for a non-full site editing theme.
image

Code snippet (optional)

WordPress information

  • WordPress version: 5.6.2
  • Gutenberg version: 10.0.2
  • Are all plugins except Gutenberg deactivated? No.
  • Are you using a default theme (e.g. Twenty Twenty-One)? No. This example uses https://github.com/bobbingwide/fizzie

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome 88
@bobbingwide
Copy link
Contributor Author

I also reproduced the problem with TT1 blocks and Gutenberg 10.0.2 as the only active plugin.

@carolinan
Copy link
Contributor

I have confirmed that if I add a page break block to a theme that supports full site editing, the block shows correctly in
the site editor and post editor, but not the front.

The page break block also does not work with traditional/PHP based themes that does not add wp_link_pages().
See https://developer.wordpress.org/reference/functions/wp_link_pages/

Looks like without wp_link_pages, <!‐‐nextpage‐‐> which is saved in
https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/nextpage/save.js#L7
is not understood?

@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Block] Page Break Affects the Page Break Block labels Mar 8, 2021
@kjellr
Copy link
Contributor

kjellr commented Dec 30, 2021

@noisysocks: flagging this one as a must-have since it seems like a regression.

@alberto-marin
Copy link
Contributor

Hi, I was curious about this one and made a pull request with something that could fix it: #37672

@Mamaduka
Copy link
Member

Mamaduka commented Jan 5, 2022

I'm removing this issue from WP 5.9 project board since RC1 was released last night.

I think we can go with @alberto-marin's solution for the next minor release.

P.S. I will finish reviewing the PR later today.

@Mamaduka
Copy link
Member

#37672 will be part of the 5.9, so I will close this issue.

Thank you everyone for contributing ❤️

@carlomanf
Copy link

Unfortunately, the fix that was applied for this does not work 100% of the time:

  1. It checks for the core/nextpage block, which will not work for paginated content that was created using the classic editor
  2. It will not print out the page links if plugins use the content_pagination filter to add pagination when <!--nextpage--> is not present in the content

Can we re-open this issue and work on a new fix please?

@adamziel adamziel reopened this May 26, 2022
@carlomanf carlomanf linked a pull request Jun 30, 2022 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 30, 2022
carlomanf added a commit to carlomanf/wp-funnel-manager that referenced this issue Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Page Break Affects the Page Break Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants