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

Twitter URL Embed automatically in Preformatted Blocks #15827

Open
nukaga opened this issue May 25, 2019 · 6 comments

Comments

@nukaga
Copy link

@nukaga nukaga commented May 25, 2019

Describe the bug
When two or more Twitter links are included, they will be embedded automatically.

To reproduce
Steps to reproduce the behavior:

  1. Go to 'new post'
  2. Click on 'Preformatted'
  3. post 2 twitter URL
  4. See error there URL Embed

Expected behavior
Preformatted Blocks have automatically embed when there are two or more Twitter links.
This is not expressed when there is one link.
The last link URL in the block is displayed in text.
This phenomenon occurs not only with Twitter URLs but also with embed URLs.

Screenshots

rzg2o-o6tte

Desktop (please complete the following information):

  • OS: Mac OS 10.12.6
  • Browser chrome
  • Version 74.0.3729.157

Additional context

  • WordPress 5.21 / Twenty Nineteen
@nerrad

This comment has been minimized.

Copy link
Contributor

@nerrad nerrad commented May 25, 2019

I'm unable to reproduce:

Example

The first two twitter links are in a pre-format block. The last embed resulted from pasting one of those links in a paragraph block (which transformed to an embed).

Are there any plugins interacting with the WordPress editor active on your site?

@nukaga

This comment has been minimized.

Copy link
Author

@nukaga nukaga commented May 26, 2019

Thank you for testing! The plug-in was completely stopped.
I will try to find a little more about the bug.

@nukaga

This comment has been minimized.

Copy link
Author

@nukaga nukaga commented May 26, 2019

All plug-ins are turned off.
When I put two separate Twitter links in the same way as you did, the bug did not appear. But when I made it three, it appeared.
I don't know yet what kind of standard this bug occurs.
マイムービー

@kamataryo

This comment has been minimized.

Copy link
Contributor

@kamataryo kamataryo commented May 26, 2019

It seems that a similar problem occurs when we unlink the URLs in a preformatted block and open preview.
2nd and later URL turns into embed card if unlinked and the first one doesn't.

gutenberg-preformatted-mis-embedding

@nerrad

This comment has been minimized.

Copy link
Contributor

@nerrad nerrad commented May 26, 2019

Ya I'm reproducing this now too when I go to three urls in the pre-formatted block. I'm not seeing the pasted urls as linkable (like @kamataryo) though.

I think we can sufficiently say this bug is reproducible though.

@kamataryo

This comment has been minimized.

Copy link
Contributor

@kamataryo kamataryo commented May 26, 2019

This command reproduce an unintended embedding and creates a post with an embed card inside <pre />:

$ wp post create --post_author=1 --post_title=test --post_content='
<!-- wp:preformatted -->
<pre class="wp-block-preformatted">
https://wordpress.org/news/2019/05/wordpress-5-2-1-maintenance-release/
</pre>
<!-- /wp:preformatted -->'

Without linebreaks, embed cards would not appear.

$ wp post create --post_author=1 --post_title=test --post_content='
<!-- wp:preformatted -->
<pre class="wp-block-preformatted">https://wordpress.org/news/2019/05/wordpress-5-2-1-maintenance-release/</pre>
<!-- /wp:preformatted -->'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.