Text formats uses 'disable' as the text to delete. If clicked, Drupal tells the user that the action cannot be undone. Let's be consistent and change this to delete

https://skitch.com/jeff.noyes/fgeai/text-formats-inputformats

Comments

Damien Tournoud’s picture

The text format is only disabled, not actually deleted. Not sure we want to lie to the user here.

David_Rothstein’s picture

Title: Small nit, but counts towards the overall experience of drupal » Change terminology from "disable" to "delete" when disabling a text format

Since Drupal core does not provide any facility to reenable a disabled text format, from the user's perspective it's more or less the same thing as deleting it. (A contrib module that allows text formats to be reenabled could always use terminology like "recover from trash" or that sort of thing.)

That said, I'm not sure this should be changed without fixing #949220: Text format names can never be reused (Possible solution: Allow disabled text formats to be re-enabled) also, since if you "delete" a text format rather than disable it then you really expect it be gone, and not have its name reserved for all of eternity.

An alternative solution would be to simply provide a UI for enabling text formats after they are disabled, which is also being discussed in #949220: Text format names can never be reused (Possible solution: Allow disabled text formats to be re-enabled).

David_Rothstein’s picture

Category: bug » task
sun’s picture

simply provide a UI for enabling text formats after they are disabled

I think that's the only valid way out to resolve this issue. Tempted to mark this issue as duplicate.

Noyz’s picture

Adding an ability to enable would suffice. I'm assuming the use reason for "disable" is because you can't delete a text format that's been used. So long as that's true...

1. you should be able to delete a text format that's never been used
2. you should be able to disable a text format that has been used, as well and provide an enable link on formats that have been disabled.

In either case, this message would need work too: https://skitch.com/jeff.noyes/fgx3r/are-you-sure-you-want-to-disable-the...

sun’s picture

1. you should be able to delete a text format that's never been used

That's not possible, because Filter module just simply does not know whether a text format is used anywhere already.

Noyz’s picture

That's not possible, because Filter module just simply does not know whether a text format is used anywhere already.

Content knows if a text format was used. E.g., If I create content using the "filtered" Text Format, save, then edit that same node - Drupal knows to re-render the node in filtered format. That said, if content knows which Text Format was used, why can't the Filter module be altered to know too?

sun’s picture

@Noyz: Discussing that major problem space is not the topic of this issue. Please just simply accept that the Filter module/system has zero knowledge about which text format is used where. This is not going to change anytime soon. Thanks.

dkingofpa’s picture

There was a recent post on the Drupal Planet blog about finding where text formats were being used. http://benbuckman.net/tech/11/08/drupal-7-drush-tip-find-all-content-usi...

Yes, I realize the blogger uses a shell script to accomplish the task. However, it looks like the script is just using database queries wrapped with some programming logic. The Filter module/system may not currently know about where text formats are used, but why can't we add that functionality? Maybe the blog post can help spark an idea?

David_Rothstein’s picture

I attempted to write the following comment on that blog post, but the spam filter blocked me for some inexplicable reason. In short, no, it's not that simple:

Note that the above script will find all fields that use the text format, but not all content that does.

For example, custom blocks, user signatures, and who-knows-what-else in contrib modules all have text formats which are stored outside the field API, so if you are using any of those you'd need to check a bunch of other database tables also.

busla’s picture

I "disabled" a text format that was used on thousands of nodes (imported feed items) and the body text is not visible right now. Kind of sucks.

Fixed it by manually updating the tables in MYSQL:

UPDATE field_revision_foo SET field_foo_format = 'new_format';
UPDATE field_data_foo SET field_foo_format = 'new_format';
Wim Leers’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

#2029219: Change the disable user interface with formats. Make it remove. is actually a duplicate of this one (because created later), but since it contains fewer comments and all of them explain why this can't be done: marking this one as the duplicate.