Skip to content

Classic Editor Popup Title Persists and Renders Despite Being Uneditable in Block Editor #1170

@govolsgo

Description

@govolsgo

Describe the bug

In the classic editor, when creating a new popup the User has the option to set a 'Title' that will be rendered according to the selected theme's Title settings. The new Block editor does not expose the 'Title' field at all. In fact if a User edits, with the Block editor, a popup created in the classic editor and adds any block element at all, then switch back to the classic editor, the 'Title' field is still disabled.

However, when the popups are rendered, it doesn't matter which editor you have enabled or used on a popup last, if any text exists in the 'Title' field, it will always be rendered. This can lead to confusing situations for the User where you can edit the 'Name' field in the Block editor, the 'Name' field for the popup will update, but the 'Title' field remains the same and inaccessible and will always render.

Site information

Popup Maker version: 1.21.5

WordPress version: 6.9

PHP version: 8.3.29

Expected behavior

I would expect one of the following behaviors:

  1. Access to the 'Title' field from the Block editor to add, update, or remove the text within.
  2. A mechanism that will prevent rendering the 'Title' field in a popup that has been modified by the Block editor.

Current behavior

If the 'Title' field contains any text, it is always rendered:

  • regardless of which editor is enabled
  • regardless of which editor was used to save the popup last
  • even when classic content is mixed with block content
  • even when the popup consists entirely of block content

Image
Figure 1: An unmodified popup with a 'Title' created in the classic editor.
Image
Figure 2: How the popup in Figure 1 appears in the Block editor.
Image
Figure 3: The resulting popup from Figures 1 & 2 as it renders on the site.

Image
Figure 4: A popup with a 'Title' created in the classic editor. It has been modified in the Block editor to add a 'Heading'
block at the top of the popup.
Image
Figure 5: How the popup in Figure 4 appears in the Block editor.
Image
Figure 6: The resulting popup from Figures 4 & 5 as it renders on the site.

While investigating this issue, I also noticed an additional source of confusion related to field naming: the Quick Edit feature allows the User to edit the 'Name' field of a popup, but labels that field the 'Title' instead.

Image
Figure 7: The Quick Edit feature allows you to edit the 'Name' field, but labels it 'Title' instead.

Steps to reproduce

  1. Disable the Block editor.
  2. Create a popup in the classic editor.
  3. Enter a name for the popup.
  4. Set the 'Title' field to the same value as the 'Name' field.
  5. Enter any content into the primary content box, or nothing at all.
  6. Publish the popup.
  7. Trigger the popup.
  8. Note the text entered in the 'Title' field is rendered in the popup.
  9. Enable the Block editor.
  10. Edit the popup created in step 2.
  11. Change the name and content.
  12. Add a 'Heading' block above the existing 'Classic' block and set it to the updated name to simulate adding a title manually.
  13. Save the popup.
  14. Trigger the popup.
  15. Note that the popup renders with whatever is saved in the 'Title' field first, then the 'Heading' block, then the 'Classic' content.

Errors

None encountered.

Additional context

Forgive me if any of my understanding of how the plugin works is incorrect. I was researching an issue with this plugin for a client of my employer, and this is my first time working with Popup Maker.

My understanding is that, once you are switched over to using the Block editor, if the User solely creates new popups they will never encounter this issue. This issue will only be encountered if a User primarily edits & reuses an existing popup; or clones a popup created in the classic editor with a 'Title', modifies the content, and then publishes a new popup. Which, as it turns out, are both exactly my client's primary workflows for interacting with Popup Maker.

From a user-experience perspective, in my personal opinion it is very confusing to stylize the popup name in the Block editor like a renderable heading, when the 'Name' field is not rendered and is solely used as an identifier in the Popup Maker interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions