Problem/Motivation

The previously hidden Webform text format now appears in the UI, since #2502637: Disabled text formats can't be seen in the GUI. This is pretty confusing, and when you click on 'Enable' you get Access Denied.

Steps to reproduce

In 10.4+ and 11.1+, go to the text formats list with Webform enabled.

Proposed resolution

I'm not really sure. Ideally, this format would not display in the UI anywhere.

Places in the UI that the webform text format is displayed

  • /admin/config/content/formats
  • /admin/structure/types/manage/page/fields/node.page.body
  • /admin/people/permissions
  • /admin/people/permissions/authenticated

Remaining tasks

User interface changes

Ensure the hidden text format doesn't appear in the UI.

API changes

N/A

Data model changes

N/A

Issue fork webform-3485556

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pameeela created an issue. See original summary.

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

Status: Active » Needs review

Please review the slightly ugly but straightforward solution with the disabled test fixed.

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Priority: Normal » Major
jrockowitz’s picture

Status: Needs review » Needs work

I just realized we can't remove the 'Use the Webform (Default) - DO NOT EDIT text format' permission from the page but we need to hide it using #access: FALSE because we don't want authenticated users to lose the permission.

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new99.49 KB

Looks like we need to use hook_form_alter to hide the permission but we can't use hook_form_alter to remove the filter from the admin because drag and drop show an empty row.

jrockowitz’s picture

Issue summary: View changes
pameeela’s picture

@jrockowitz thanks for working on this! I gave it a manual test and it appears to resolve all instances of this appearing in the UI.

jrockowitz’s picture

Status: Needs review » Fixed

Since there is test coverage and this is a major issue, I am going to merge it and we can fix any additional issue as they come up.

  • jrockowitz committed 20c537b6 on 6.3.x
    Issue #3485556: Webform text format appears in the formats list
    
jrockowitz’s picture

cilefen’s picture

  • liam morland committed f3ed71a0 on 6.3.x
    Issue #3485556: Make spelling correction
    
    Fixes issue introduced in...

  • liam morland committed f3ed71a0 on 6.x
    Issue #3485556: Make spelling correction
    
    Fixes issue introduced in...

  • jrockowitz committed 20c537b6 on 6.x
    Issue #3485556: Webform text format appears in the formats list
    

Status: Fixed » Closed (fixed)

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