• A news website using the Block Editor has a regular need to update news stories as circumstances around the stories change. When they go into the editor to change out the body of the story and replace it with a new story body, the Title field of the editor becomes read-only. They cannot insert a cursor and type or otherwise change the title. If they want to change the title, they have to click “Update” to publish the changes to the body, go out to the posts list, then go back into the editor for the post and change the title. They cannot do it in the same editing session in which they updated the body of the post.

    More specifically, the steps to reproduce the issue are:

    1. Go to the list of posts in the WordPress Dashboard
    2. Click “Edit” to edit an existing post
    3. Check that the title can be edited
    4. Delete the entire body of the post
    5. Paste or type new body text
    6. Try to edit the title (it is now read only and cannot be edited)
    7. Click “Update” to save the post
    8. Go back to the list of posts in the WordPress Dashboard
    9. Click “Edit” to edit the post you just edited
    10. Edit the title (this time it can be edited)

    One might say that the user should be instructed to edit the title before changing the body text so that they can edit it before it becomes read-only. But that isn’t the experience the user expects. Users expect to be able to edit the entire post, including the title, in any order that happens to work best for their workflow, not in a specific order.

    I did ensure to attempt the above with the plugins all turned off and the theme switched to Twenty Twenty. Here is a video recording of the screen showing the process in full detail. https://www.file.io/0V6A/download/sIOO01hvOllT

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter robwatsondz

    (@robwatsondz)

    UPDATE: This problem seems to occur when the user clicks and drags to select more than one paragraph block. If you click and drag to select the text in a single block (without crossing over the “boundary” of the block and beginning to select the next one) and then delete the selected text, the title can still be edited. Likewise, if you delete one paragraph block at a time using the block’s control, the problem doesn’t happen. It is only when you click and drag across 2 or more paragraph blocks that the title becomes uneditable until you save, exit, and re-enter the editor.

    I can’t reproduce that in my case. My guess is that your theme or another plugin is interfering at this point. Deactivate all plugins and use a standard theme. If it works then, it is because of something you have deactivated or replaced.

    Thread Starter robwatsondz

    (@robwatsondz)

    I did ensure to attempt the above with the plugins all turned off and the theme switched to Twenty Twenty. I just tried it again, with ALL plugins disabled and the theme set to the theme set to Twenty Twenty and the same problem is occurring.

    I see that you are copying text into the video. Where did you get it from? Do you always do it this way? My guess is that the source of the text contains source code that is invisible to you and is copied in here and not properly cleaned up by Gutenberg.

    Otherwise, I don’t see any other approach for this at the moment, as long as no one else reports something like this.

    Thread Starter robwatsondz

    (@robwatsondz)

    I just now attempted it with a fresh WP install on my local machine (MacBook M1 2021 running Chrome 100…see https://www.whatsmybrowser.org/b/G105U for details). Instead of copying and pasting text from somewhere else, I did the following ONLY typing, not pasting:

    • Add new post
    • Type (not paste) “test” as the title
    • Type (not paste) “test” as the first paragraph
    • Type (not paste) “test” as the second paragraph
    • Save the post
    • Exit the post
    • Edit the post
    • Click in the title to know whether it’s editable (it is)
    • Select the first paragraph by clicking and dragging over its text
    • Continue dragging the mouse selection into the next paragraph. Both paragraphs will now have a colored border around them.
    • Click the title to know whether it’s editable (it is not editable now)

      Unless there’s something inherently wrong with my browser, OS, mouse, or keyboard, I can’t see how it’s the content or the WP setup. It’s a completely fresh WP install and all content is typed, not pasted.

    Ah, wow, I can totally relate to these steps. It also happens in Firefox. However, it is related to the multiple selection of paragraphs.

    I had a look at the Gutenberg developers and found an open bug that describes exactly this: https://github.com/WordPress/gutenberg/issues/37982

    My recommendation would be that you report the bug so that it is clear that more users have noticed the problem.

    Thread Starter robwatsondz

    (@robwatsondz)

    Thanks for retesting and for the link. I’ve now reported it as an additional comment on that same bug. https://github.com/WordPress/gutenberg/issues/37982#issuecomment-1103140793

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Block Editor: Cannot edit post title after replacing post body’ is closed to new replies.