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

Conversion from Classic to Blocks: quote fails to convert correctly #12311

Closed
afercia opened this issue Nov 26, 2018 · 7 comments
Closed

Conversion from Classic to Blocks: quote fails to convert correctly #12311

afercia opened this issue Nov 26, 2018 · 7 comments
Labels
[Block] Quote Affects the Quote Block [Feature] Block Transforms Block transforms from one block to another [Feature] Paste [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Nov 26, 2018

Tested with the quote markup from the "Post Format: Quote" post in the themes unit test data:

<blockquote>Only one thing is impossible for God: To find any sense in any copyright law on the planet.
<cite><a href="http://www.brainyquote.com/quotes/quotes/m/marktwain163473.html">Mark Twain</a></cite></blockquote>
  • open in Gutenberg a post with the above content
  • the content is displayed correctly in the Classic block, as expected
  • in the Classic block "More Options" menu, click "Convert to Blocks"
  • the content gets converted to a Quote block with two cite elements:

screenshot 2018-11-26 at 12 00 52

Code after conversion:

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br><cite><a href="http://www.brainyquote.com/quotes/quotes/m/marktwain163473.html">Mark Twain</a></cite></p><cite><a href="http://www.brainyquote.com/quotes/quotes/m/marktwain163473.html">Mark Twain</a></cite></blockquote>
<!-- /wp:quote -->
@afercia afercia added the [Type] Bug An existing feature does not function as intended label Nov 26, 2018
@ellatrix
Copy link
Member

@jorgefilipecosta Does your PR #12252 cover this?

@jorgefilipecosta
Copy link
Member

jorgefilipecosta commented Nov 26, 2018

Hi @iseulde, unfortunately, #12252 does not cover this problem :(
We may be able to address it with custom transform function, but quote block should not need this, I'm not sure of what is causing the duplication of the citation.

@designsimply designsimply added the [Feature] Block Transforms Block transforms from one block to another label Nov 27, 2018
@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 21, 2021

Is this still a valid issue that needs to be fixed?
If so how do we move forward?

@carolinan @talldan @designsimply

@talldan
Copy link
Contributor

talldan commented Feb 22, 2021

Is this still a valid issue that needs to be fixed?

@paaljoachim Can you test it to see if it's still a valid issue?

@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 22, 2021

I did a search and downloaded the theme unit test data from here:
https://make.wordpress.org/themes/handbook/review/theme-unit-test/

Imported it into my test site running WordPress 5.7 beta 3. Went to the post: "Post Format: Quote"
Clicked to convert from Classic to a Quote block.
https://user-images.githubusercontent.com/5323259/108710509-7228bc00-7514-11eb-863c-d811e142bcc2.mp4

I am getting the same result as Andrea did back in 2018.

Convert-Classic-Block-Quote-To-GB-block.mp4

Hopefully this will work correctly in the update of the Quote block to use nested blocks.
#25892

@oandregal
Copy link
Member

The PR to allow inner blocks to quote is being worked now #25892 and it's landing by pieces. I've just tested this flow with the PR that adds transforms #39718 and this will be no longer an issue:

Peek.2022-03-28.14-43.mp4

@mtias
Copy link
Member

mtias commented Jul 27, 2022

Closed by #25892.

@mtias mtias closed this as completed Jul 27, 2022
@mtias mtias added the [Block] Quote Affects the Quote Block label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote Block [Feature] Block Transforms Block transforms from one block to another [Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

8 participants