Problem/Motivation
I inadvertently disabled the Webform text format as I was trying to clean up some formats.
I am now unable to re-enable the Webform text format ("webform_default").
When I try to enable it, I get an Access Denied and a login link (I am logged in as an administrator).
Proposed resolution
If I can't enable the text format -- it seems as though, I shouldn't be able to disable it to begin with.
This led to other issues -- which I assume is they the text format says don't edit.... if its not possible to prevent disabling it, perhaps it could say "don't Edit or Disable" to be explicit. I'm not sure why it should be stopped from being enabled.
I made various attempts to reenable it (tweaking the DB on my local dev, re-importing with the new status) but have been unsuccessful. Is there any way to get it reenabled (I have lots of forms and submissions so I think uninstalling and reinstalling would be impractical at best)
Update
It's become clear, I did not actually disable the webform_default format. But something did trigger my html text formats to change to plain_text. I had been making changes to WYSIWYGs, and there were other changes in the webform settings (mostly reformatting around line breaks). I don't know how either of those led to the text formats settings to change.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | Screenshot 2025-06-13 135833.jpg | 26.73 KB | aarantes |
| #10 | Screenshot 2025-03-27 at 8.30.03 AM.png | 57.17 KB | adriancotter |
Issue fork webform-3510410
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
Comment #2
adriancotter commentedLooking on Drupal Stackexchange, I see that I should not be able to see the text format -- I'm not sure how I was able to disable it if that was the case...
Comment #3
cilefen commentedMost of that work took place at #3477051: The hidden webform text format leads to text format selects with only one option. I don't think it needs to be enabled. It is disabled by default on install. What actual problem is this causing to the site you are working on?
Comment #4
adriancotter commentedWell the format choice for the webforms reverted to plain text. I thought that was likely a result of me disabling it, but I don't actually see that having changed in config in GIT, this is what I do see. There were some other WYSIWYG text format settings that got changed along with webform.settings:
- element_format: webform_default
- mail_format: webform_default
+ element_format: plain_text
+ mail_format: plain_text
This was not something I did deliberately. So I am not sure what caused that to switch.
The problem that resulted was that all our emails started having email appear in them - the html all converted to
>p<>/p<I see that it uses webform_default if "default" is selected in the HTML Editor dropdowns here
/admin/structure/webform/config/elements
Comment #5
adriancotter commentedComment #6
junsuwhy commentedI encountered the same issue. Somehow, I unintentionally changed the
#statusof the format tofalse. Initially, after installation, it was set totrue(although it appeared as disabled in the formats list). This caused the system to repeatedly prompt me that the format was empty and couldn't be saved whenever I edited webform fields.The solution that worked for me was running:
You can execute this command via
drush phpor any PHP-executable environment.I suspect this issue occurred when I added a new format and modified the order of formats, which somehow set
webform_default's#statustofalse. However, I've been unable to reproduce this behavior afterward.Comment #7
avpadernoComment #8
jrockowitz commentedI think the
webform_defaultis no longer visible via the UI, and we might be able to close this ticket since we can't reproduce the issue and the suggestion from #6 is a valid fix.Comment #9
jrockowitz commentedI think the
webform_defaultis no longer visible via the UI, and we might be able to close this ticket since we can't reproduce the issue and the suggestion from #6 is a valid fix.Comment #10
adriancotter commentedA counterpoint jrockowitz -- just uploaded a screenshot from a different site where webform_default is visible. This is a different site from where this problem occurred.
Comment #11
cilefen commentedAre those sites on the same Drupal core versions?
Comment #12
cilefen commentedComment #13
adriancotter commentedYep. The are on the same Drupal Core versions 10.4.5
webform 6.2.9
Comment #14
jrockowitz commentedThe short answer is people have to upgrade to resolve this issue
Comment #15
adriancotter commentedUpgrade to what jrockowitz? to have the webform text format hidden?
Comment #16
jrockowitz commented6.3.0-beta2
Comment #17
davidandersonencsd commentedNevermind, the drush php command above (from junsuwhy) fixed it. Thank you for your hard work!
Comment #18
cojobo commentedThank you! The drush command (drush config-set filter.format.webform_default status true -y) worked for me.
Comment #19
liam morlandIf this can be re-produced, please re-open so that we can fix 6.2.x.
Comment #20
aarantes commentedHello,
I'm adding this comment here as I can reproduce this on Webform 6.2.9, running on Drupal 10.4.6. Hopefully it will be useful to someone.
In my case, this is what I found:
Reordering the Webform text format ("Webform (Default) - DO NOT EDIT") in "Configuration > Content authoring > Text formats and editors" causes more than the "weight" parameter to change (the weight controls the order).
Looking at the exported YAML configuration file, I can see that the "status" and "dependencies" also changed (see image below).
If it helps, here is the code of the screenshot:
Thanks,
Alex
Comment #21
liam morlandPlease add the steps to reproduce to the issue summary.
Comment #22
joakland commentedI am having a related issue that was fixed by the drush command in #18. Here are my steps to producing the problem:
Comment #23
omd commentedI'm suddenly having this issue as well. I can't save any form elements, nor can I even save a new form created as a test without getting the "Text format field is required." error message. I've not adjusted any of my text formats for a very long time so I think that is not the cause, nor have I disabled any of them in recent memory. I'm running Drupal 10.5.1 and Webform 6.2.9. I have another Drupal site with identical versions for core and Webform and it does not have this issue though. Both sites do have the Text Format: Webform (Default) - DO NOT EDIT visible and it's disabled.
Running drush php:eval "\Drupal\filter\Entity\FilterFormat::load('webform_default')->setStatus(true)->save();" on the site that was throwing the error fixed the issue for me as well.
Comment #24
jrockowitz commentedA few options to move forward
Comment #25
omd commentedI think you're missing something because even though now I'm able to save webform fields again without the error message, the Webform (Default) - DO NOT EDIT Text format is still showing as disabled. It's also showing as disabled on another production site of mine that has not been throwing the error at all–same core version, same webform version.
Comment #26
urix commentedI have the same problem: "Text format field is required".
I can't add new form, or edit any form that has a text field.
I can't select text format in the drop-down menu - there's no available formats.
I wasn't tracking the exact moment when it stopped working.
Text format "Webform (Default) - DO NOT EDIT" is disabled, but I have other sites with the same components and the same disabled format and the form building works.
Drupal 10.5.2, Webform 6.2.9
Comment #27
kreatil commentedI ran into the same problem: after upgrading to Webform 6.3-beta4 the issue with the hidden text format showing up in the list was fixed, but I still could not edit any existing Webforms.
In my case the root cause was that the filter.format.webform_default configuration had become corrupted:
• status was set to false (disabled)
• Wrong dependency (slick) was added
• An extra slick_filter was attached
This meant the special Webform (Default) – DO NOT EDIT format was no longer valid, so Webforms with #format: webform_default could not be edited.
Solution:
1. Overwrite the broken config file: filter.format.webform_default
2. Re-import it via drush cim
3. Clear caches
After restoring the config, editing existing Webforms works again in my usecase.
Comment #28
jrockowitz commentedComment #30
jrockowitz commentedI think our best option is to add an update hook that restores filter.format.webform_default, just in case it was disabled or changed.
Do we also need to reimport the ckeditor configuration?
We should only do it for 6.3.x since 6.2.x is already deprecated.
Comment #32
jrockowitz commentedThe MR feels like a very safe way to help mitigate this situation since a user just needs to update the webform module to address the problem. Moving to RTBC
Comment #33
jsimonis commentedI'm having the same issue on my install. I checked the filter.format.webform_default file, and this is what it has:
Is there another fix I should be looking at? Thanks.
Comment #34
jrockowitz commentedBased on #18 and #27, the fix is to reimport the filter.format.webform_default.yml, which is what the MR is doing.
Comment #35
jrockowitz commentedUpdating to the latest dev release will fix this issue
The below drush command should also fix the issue
drush config-set filter.format.webform_default status true -yComment #37
jrockowitz commentedComment #39
jrockowitz commentedComment #43
ajmaltash commentedThank you Junsuwhy, it really worked for me too
drush php:eval "\Drupal\filter\Entity\FilterFormat::load('webform_default')->setStatus(true)->save();"
Comment #44
xurizaemonFolks who were involved in this issue and noticed config export with null UUIDs (@jsimonis you show a null UUID in 33 above) may be interested to help reviewing #3576844: filter.format.webform_default config assigned null UUID.