Drupal CMS does not need more than one Editor

Created on 29 October 2024, 3 months ago

Problem/Motivation

Drupal CMS currently has full_html and basic_html text formats and editors. This is an extension of what the Standard profile offers, however, it is not needed in Drupal CMS.

Drupal CMS only has one role besides administrator that has all permissions. The content_editor role is granted permissions to use both text formats in the base recipe. Because of this, the editors and text formats should probably be in the base recipe also.

Additional text formats could be added as there is a need for them.

Steps to reproduce

N/A

Proposed resolution

Change any recipe that is using basic_html to full_html.
Remove basic_html text format and editor.
Move full_html text format and editor into the base recipe.

Remaining tasks

Approval
Implementation

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Active

Component

Base Recipe

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @thejimbirch
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    I'm okay with removing basic_html and moving full_html into the base recipe. We can add core's restricted_html_format recipe to content_type_base, which will at least provide a fallback format for sites that aren't using the base recipe.

  • Pipeline finished with Canceled
    3 months ago
    Total: 65s
    #324109
  • Pipeline finished with Failed
    3 months ago
    Total: 345s
    #324114
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    We have a bit of a problem here -- the seo_tools recipe needs the Full HTML format separately for its dashboard blocks.

    That said, the use of static HTML in these blocks is a total kludge, and shouldn't be a thing anyway.

    So I'm not sure what to do here...maybe we could adjust the recipe so that the blocks use the restricted_html format?

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Could I switch to using core’s recipe?

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Oh, that's a great idea! Yeah, let's do that.

  • Pipeline finished with Failed
    3 months ago
    Total: 334s
    #324118
  • Pipeline finished with Failed
    3 months ago
    Total: 291s
    #324121
  • Pipeline finished with Failed
    3 months ago
    Total: 289s
    #324123
  • Pipeline finished with Failed
    3 months ago
    Total: 494s
    #324128
  • Pipeline finished with Failed
    3 months ago
    Total: 469s
    #324145
  • Pipeline finished with Failed
    3 months ago
    Total: 504s
    #324159
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Over to Jim for review.

    The unrelated-seeming changes are not unrelated. SEO Tools had an implicit, inherited dependency on Media, that it was getting via the text formats it was depending on. Naughty, naughty. That's now sorted out, and tested.

    Dashboard also was lacking a permission that made it impossible to test as a content editor, which is the best way for us to do functional testing. (The changes to ddev reinstall facilitate manual testing as a content editor.)

    And I noticed that Restricted HTML had a lower weight than Full HTML, which resulted in it being chosen by default, even for users with permission to use Full HTML. That is now fixed and tested.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Great to catch a few potential bugs! Marking as RTBC

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Pipeline finished with Skipped
    3 months ago
    #324195
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    And, merged.

    I don't think we need to consult @tim.plunkett or @pameeela on this one, because:

    • As you pointed out in the issue summary, the presence of two formats is a holdover from the prototype, and was inspired by Standard, not the actual product requirements of Drupal CMS.
    • It's hard to imagine that content editors will benefit from having to choose between "Basic HTML" and "Full HTML". The difference is not at all clear. So I'm guessing the product owner would approve of this simplification.
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    This change has left us in a weird state. We now have Full HTML and Restricted HTML, but restricted doesn't have an editor. There are a few default content items that reference restricted_html so these are kinda broken.

    I understand the motivation here but we still have two editors, and now one is broken. So I'm not totally sure what happened. Was restricted already there? Why doesn't it have an editor?

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    OK wait, I think the problem is that the content type base is relying on core/recipes/restricted_html_format, but why? We are creating full_html in our base recipe. So if this needs to rely on something else, should we split that out as a separate recipe?

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Core's restricted_html_format recipe only provides the format, IIRC. It doesn't provide an editor. I think it might well make sense for the base recipe to apply core's restricted_html_format, and also add an editor for that format.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    I don't really see the logic for that. The point of this issue was not to have two editors. But then we'd be back to having two editors?

    FWIW I don't think this is the last word on text formats, but I guess for now, I can just add some config for the restricted editor.

  • πŸ‡¨πŸ‡¦Canada pavlosdan

    In my opinion Full HTML as that could be a potential security issue and we should add and configure an editor for the restricted HTML format. I'm a bit late to the party but I would have preferred to remove Full HTML and kept Basic HTML.

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    I'm okay with that. The goal of this issue was to remove the choice of two editors, but the preservation of Full HTML was an arbitrary choice. I've opened πŸ“Œ Replace the Full HTML format with Basic HTML Active as a follow-up.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024