gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Post Excerpt: Read more link is always on new line in the editor

Open iamtakashi opened this issue 2 years ago • 6 comments

Description

Post Excerpt has the option to show the read more link on a new line. You'd expect the read more link would appear inline with the excerpt, but it won't. In the editor, the link is always on a new line regardless of the option.

Screenshot 2023-01-26 at 13 08 36

The option works as expected on the front of the site 👍

Screenshot 2023-01-26 at 13 12 20

Step-by-step reproduction instructions

  1. Go to the editor.
  2. Add a post excerpt block
  3. Turn off the "show link on new line" option

Screenshots, screen recording, code snippet

No response

Environment info

WP v6.1.1. Gutenberg trunk The issue also occurs without the plugin

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

iamtakashi avatar Jan 26 '23 13:01 iamtakashi

I am not able to reproduce this with "empty theme", Twenty Twenty-Three or Twenty Twenty-One. I think this may be a theme issue?

carolinan avatar Jan 30 '23 06:01 carolinan

Update: Actually I can reproduce it in Twenty Twenty-Three but only when the query loop uses the columns: when here is not enough space to show the place holder on the same line as the excerpt text. When switching from columns to lists, the option works.

carolinan avatar Jan 30 '23 06:01 carolinan

Actually I can reproduce it in Twenty Twenty-Three but only when the query loop uses the columns:

Hmm, that's strange. The issue occurs regardless of a columns block for me.

Screenshot 2023-01-30 at 12 51 21

iamtakashi avatar Jan 30 '23 12:01 iamtakashi

Is it the same if you disable all other plugins?

In this clip I am using WP 6.2-alpha-55160 with TT3. Gutenberg is not active:

https://user-images.githubusercontent.com/7422055/215485189-5d3186aa-7aca-4a50-aba6-a6f3096d7dfb.mov

carolinan avatar Jan 30 '23 13:01 carolinan

Is it the same if you disable all other plugins?

Yes.

Could you try adding the Query Loop block to the root, choose "start blank", and try one of the options that have an excerpt?

Screenshot 2023-01-30 at 14 17 51

iamtakashi avatar Jan 30 '23 14:01 iamtakashi

@carolinan, Ah, I think the option works for you because your test post didn't have any text/excerpt that isn't a common case.

Screenshot 2023-01-30 at 14 22 49

Screenshot 2023-01-30 at 14 24 53

iamtakashi avatar Jan 30 '23 14:01 iamtakashi

So, in short, the issue always occurs unless the post/excerpt doesn't have any text.

iamtakashi avatar Jan 30 '23 21:01 iamtakashi

The issue is that the closing </p> tag does not currently include the read more link when the "show link on new line" is off.

Screenshot 2023-01-31 at 21 48 32

iamtakashi avatar Jan 31 '23 21:01 iamtakashi

I have eventually, 😆 been able to reproduce it. I think you may be right about the cause, lets try to see if we can't make the editor and front markup match better.

carolinan avatar Feb 01 '23 12:02 carolinan