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

Convert to Blocks moves the more tag #18079

Open
bobbingwide opened this issue Oct 23, 2019 · 11 comments

Comments

@bobbingwide
Copy link
Contributor

@bobbingwide bobbingwide commented Oct 23, 2019

Describe the bug
When I chose Convert to blocks to convert a Classic block the more block was moved to after the content. It should have respected the original order of the content.

To reproduce
Steps to reproduce the behavior:

  1. Create a post containing
<!--more-->Seen before as shallow and bugs.
  1. In the block editor it gets shown in the Classic Block
  2. Click on More options > Convert to Blocks
  3. The More block is created after the Paragraph block
<!-- wp:paragraph -->
<p>Seen before as shallow and bugs.</p>
<!-- /wp:paragraph -->

<!-- wp:more -->
<!--more-->
<!-- /wp:more -->

Expected behavior
The More block should not be moved after the paragraph block. The More block should remain first. Even though there's nothing before it.

Screenshots

I'd love to add a sreenshot but GitHub's saying "Something went really wrong, and we can't process that file."

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: Version 77.0.3865.120 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
I was using WordPress core when I found the problem.
It's still present in Gutenberg 6.7.0

The irony is, of course, the content. I was going to write that well known quote from Linus's law
https://en.wikipedia.org/wiki/Linus%27s_Law

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Oct 23, 2019

Workaround

Move the More block back to where it should have been.

For the screenshot see https://seriouslybonkers.com/bigram/shallow-bugs/

@Shizumi

This comment has been minimized.

Copy link

@Shizumi Shizumi commented Nov 1, 2019

It worked correctly in the following environments:

Desktop
OS: macOS 10.14.6
Browser: Chrome
Version: 78.0.3904.70(Official Build)

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Nov 3, 2019

@Shizumi Please show what you tested. I retested using Twenty Nineteen and zero plugins with WordPress 5.2.4
Before conversion the more block is before the text.
2CB5A7D7-8CBB-4CEB-8F75-78978533962F

After conversion the paragraph comes first, then the more.
6CD9FA9E-1FFD-4064-9AF2-1EDA4703EBB1

Tested on iPad with Safari

@ChrissiePollock

This comment has been minimized.

Copy link

@ChrissiePollock ChrissiePollock commented Nov 3, 2019

I tested on Firefox and it worked as expected. The More came first in code and preview after switching to Block.

screenshot

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Nov 4, 2019

Hi @ChrissiePollock, that's not the same string as my original source.
Can you try to reproduce the problem by following these instructions.

  • Open a new post
  • Type title
  • Tab
  • Type /cl, Enter
  • Click on classic block
  • Click on Insert read more
  • then type Seen before etc
  • Click on vertical ellipsis
  • Click on Convert to Blocks
@Shizumi

This comment has been minimized.

Copy link

@Shizumi Shizumi commented Nov 5, 2019

@bobbingwide
issue18079
I tried it again

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Nov 5, 2019

@Shizumi
thanks for that. i’ll have to record the same. are you using Twenty Twenty and 5.3 something

@Shizumi

This comment has been minimized.

Copy link

@Shizumi Shizumi commented Nov 6, 2019

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Nov 6, 2019

Can you try without pressing Enter between clicking on more. Just continue typing.
Alternatively, type the text, backspace to the start then insert the more.
In code editor the content should be on one line.

@Shizumi

This comment has been minimized.

Copy link

@Shizumi Shizumi commented Nov 7, 2019

that's it.
certainly happened.

@bobbingwide

This comment has been minimized.

Copy link
Contributor Author

@bobbingwide bobbingwide commented Nov 7, 2019

Workaround 2

Generate the original content with a new line after the more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.