By rjkoehler on
I disabled two of the core text format (Filtered HTML and Full HTML), but now I would like to reenable them. After I disabled them, however, they disappeared from my format list. When I try to create a new text format of the same name, however, I get a warning that the format exists, so I figure it's got to be around somewhere. Can someone tell me how to renable those formats?
Thanks in advance.
Comments
It looks like this is a bug.
It looks like this is a bug. See this issue:
http://drupal.org/node/949220
Hopefully they will get this fixed soon. In the meantime, you can re-enable it directly in the database (proceed with caution!). In the table filter_format, find the filter you want to re-enable, and set the status field to 1. Back in Drupal, clear the cache and it should show up. I'm not sure if you have to change the value for "weight" or not...
Woolwich Web Works: Custom web development
Where?
drupalchick ---- where or where does one find "table filter_format" ? Is there a specific file location? I accidentally did this as well........(so still not fixed)
You have to go directly into
You have to go directly into the database. Probably in phpMyAdmin if you have that available. There should be a table in the database called filter_format. If you browse that table you should see the list of input formats. Any you have disabled will have a 0 in the status field. Change that to 1, clear the cache, and you should see your filters again.
Woolwich Web Works: Custom web development
Thanks
Thank you, that fix just saved my butt.
Thank you
This works. You rock.
Hard to believe this is still
Hard to believe this is still an issue a year and a half later.
After 4 years it's still an
After 4 years it's still an issue also in Drupal 7 !!
This worked for me but I had
This worked for me but I had to run a script to update my database. Changes wouldn't stick for some reason.
db_update('filter_format')
->fields(
array(
'status' => 1,
)
)
->condition('format', 'full_html')
->execute();
Thank you!You have execute
Thank you! Yes you have execute update.php.
Hopefully this bug will be fixed soon.
IT'S GOOD TO BE HERE » Blog
THANKS!
Thanks Drupalchick! Your tip just saved my behind ;) I disabled Filtered HTML and all the stuff on my website disappeared...so I had to quickly follow your tip and it's all working now and Drupal is happy again :)
Living life in a grande way.
Text format missing
Hi Byan,
I mistakenly disabled the HTML Text Format also. I followed the instructions as outlined by DrupalChick but it didn't do any thing for me.
The lines of code you posted, did you mean this to be written as an MySQL script or on the Unix command line?
db_update('filter_format')
->fields(
array(
'status' => 1,
)
)
->condition('format', 'full_html')
->execute();
(I'm pretty new to Drupal.)
I wish the Drupal people would fix this bug!
Thank you.
Thank you.
Unbelievable. Since 4 years
Unbelievable. This was filed 4 years ago and it's still a bug that has not been merged into the core even though a patch has been submitted by a community member. I am curious to know what does it take to fix this kind of stuff.
In the mean time, we have just started a new module called tidbits (still in dev waiting to push the code) that will be there just for this kind of stuff, there is nothing to download yet, but we will be adding the following:
- Un-merged useful patches,
- Bringing back needed Drupal features that were removed,
- Implementing useful trick that could be needed in some use cases,
- etc.
Each feature will be option. You just enable the one you need for your site.
Cheer guys.
Live long ... and prosper!
I also bump on this issue
Today I also bump on this issue.
Drupal Theme developer.
Shivcharan
Insane that this still hasn't
Insane that this still hasn't been fixed.
Same issue is also found in Drupal 8
Same issue is also found in Drupal 8
Drupal Theme developer.
Shivcharan
Almost 5 years and now it has
Almost 5 years and now it has moved to Drupal 8!
Can't the core Drupal developers notice these issues??
=-=
Can't complaining users read and follow already linked issues in which core drupal developers can be seen actively working on a fix?
...yes, I saw the linked
...yes, I saw the linked issues for the last 5 years... :)
I love Drupal, but sometimes it makes me wonder how some of the issues are pending for so many years and over so many versions...
This specific issue is not that hard to fix and it's basically crippling a whole Drupal system!
=-=
assessments such as the above make me question why you've not provided the fix. If you've had the fix for the 5 years then your inaction is also part of the problem. no?
I knew my statement will
I knew my statement will generate that question ;)
Actually I stopped being a developer 13 years ago. At the time I used C++, Javascript, SAS & Java only. Then worked a little on ASP but never on PHP.
The concept should be the same, that's why I am predicting that it should be an easy fix. But I might be wrong...
Here's my simple suggestion about one solution:
The Core Text Format settings are written in a mySQL table, so if we need to re-establish a deleted format, we can click on a new button on the text format page that says
Reset to Defaultwhich will re-insert the original entries in that table.What would you suggest about a solution to this issue?
=-=
My suggestion is to follow the issue in which a patch is being generated for D8 and test it. Provide feedback as necessary.
D8 workaround?
Until this issue is not fixed, how this can be "workarounded" in D8? I can't see any table called filter_format there.
The data now sits inside the
The data now sits inside the 'config' table.
To view the data, do a db query: select collection, name from config where name like 'filter.format%';
Then, you will want to update the data field for the filter format which you disabled, and change the status from a 0 to a 1.
how to re-enable module text format in D8 ?
Also drupal 8, i have the issue with mailchimp campaign text format. I disabled it and now i cant see it anymore. In the config table, it is also not present, maybe because it is not a core text format. So how i can re-enable module text format in D8 ?
It should be in that table,
It should be in that table, but after disabling it is not anymore. Took the row from an backupped version (before disabling) and it worked again !
To Fix with Drush
For drupal 7 to do this with drush:
drush sql-query "UPDATE filter_format SET status = '1' WHERE filter_format.format = 'filtered_HTML'";
As a D8 workaround you can
As a D8 workaround you can export and reimport the disabled text format. Worked for me.
Which requires enabling Configuration Management
You'll receive an 403 on admin/config/development/configuration/single/export otherwise.
Cannot find "full html" in the export options
I don't see Full HTML in the D8 admin/config/development/configuration/single/export --> Text Format options.
Come to think of it, I don't remember ever disabling them. But since I am using Acquia's lightning distrib, perhaps they came pre-disabled?
rule of thumb - don't disable text formats ...
Don't even disable the built in text formats ...
Instead go to permissions and restrict the text formats only to the roles that should have access to them.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
I've never disabled the built-in text formats
but i still don't see full html etc. Only Rich and Plain Text available.
Worked a treat
Thanks mrupsidown
worked great.
worked
works if u read careful and implement, important to change status! thanks.
Updated database...
Well, the referenced table above was not to be found in my Drupal 8.4.x version. Instead, I had to go to a functioning site and extract from the `config` table the lines for editor.editor.basic_html and filter.format.basic_html, and their long blobs.
Inserted into the config table of the injured site, cleared caches, enabled for users and boom. It works. Cannot recall why I got rid of those formats....
:)
Thanks Cayenne, it worked for
Thanks Cayenne, it worked for me too!
I also was missing "FULL HTML" in my D8 Lightning (Acquia) Install.
I went over to my local D8 non-lightning install and exported exactly as described by Cayenne.
I then went over to my D8 Lightning and Imported (a simple copy-and-paste. No file exporting / importing is required)
FULL HTML then appears where you expect it,for me, it was in creating a custom block.
It works! Why Lightning thought it was a smart idea to remove "FULL HTML" is a mystery.
If you do not have access to a 'normal' D8 install, here is the codes:
uuid: dfa9cb7d-d869-46f0-99aa-3df5bcfde6a4
langcode: en
status: true
dependencies:
module:
- editor
_core:
default_config_hash: hewPmBgni9jlDK_IjLxUx1HsTbinK-hdl0lOwjbteIY
name: 'Full HTML'
format: full_html
weight: 1
filters:
filter_align:
id: filter_align
provider: filter
status: true
weight: 8
settings: { }
filter_caption:
id: filter_caption
provider: filter
status: true
weight: 9
settings: { }
filter_htmlcorrector:
id: filter_htmlcorrector
provider: filter
status: true
weight: 10
settings: { }
editor_file_reference:
id: editor_file_reference
provider: editor
status: true
weight: 11
settings: { }
D9 still there...
Even a more dirty trick
mysqldump DB config >config.sql
vi config.sql
1,$s/\\"status\\";b:0/\\"status\\";b:1/g
:wq
mysql DB <config.sql
flush caches
Risc is all yours....
Worked for me.
Programmatically from code for Drupal 8/9/10
Include this code at the end of index.php file:
This code enables the text format "full_html" (change if it needs someone other).
Then flush the cache, reload the page, and verify that the text format is enabled.
Finally, remove this code.
Great!
Great!
Works!
Thank you! Works great!
Worked like a charm! Thanks!
Worked like a charm! Thank you!
Still not fixed for as of October 2023
For the record. This is still bug is till not fixed as of October 2023. See #2502637: Disabled text formats can't be seen in the GUI
The extremely dirty trick in the comment by fanton above works.
- gisle