How do i restore default input formats?
This is what happened:
I could not use <code> tags in my stories, using TinyMCE. It simply disappeared, so I decided I had to modify my input filters. After changing both Full HTML and Filtered HTML, I got my <code> working.
But then all the old content on my site was corrupted! No linebreaks, no images, completely useless... After experiments I found, that this was caused by using HTML filter for Filtered HTML, so I removed this and things looked pretty normal again.
Question 1: If changes to Filtered HTML can influence output of old contents, what is it doing in input formats???
Now I have this problem, which may be caused by changes to the input filters, I think: My new weblinks don't work. That is, old weblinks are OK, but when I create new weblinks, they are wrong. They look fine in preview, but the saved version misses the URL definition, and it does not show up in the taxonomy term where it belongs.
I am getting paranoid, maybe, but I really think this could also be an input formats problem? Therefore, I now wish to restore my original (default) input formats.
Question 2:: How do I reset input formats to the default values?
and
Question 3:: I cannot find documentation for input filters, where should I look?
/ Henning
Comments
1) See
1) See http://drupal.org/handbook/modules/filter. The filter system is intended to sanitize and modify text output to the screen. The name may be a little confusing. The Input filter is defined on input and affects how content is output.
2) The easiest way would be if you have MySQL access. Empty (truncate) the {filters} and {filter_formats} table. Then re-insert the default dat. The code below is taken from system.install for Drupal 5.1:
The problem is that filter data is also saved in the {node} table, so your nodes may contain references to filters that no longer exist. The safest way would be to view the settings on a clean Drupal install and replicate them in your installation.
3) Try http://api.drupal.org/api/5/file/filter_example.module for documentation on how to write filters.
--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.
MySQL for input formats - and weblinks URL
Thank you very much. I have MySQL access, but your code told me, that I had renamed Filtered HTML to Full HTML and vice versa - quite confusing. After fixing this, I can create most contents as expected, and I think my filters are now back to the original definitions.
However, I still have the issue with new weblinks, that the URL disappears and they don't show - but it may be another problem, so if anyone can explain this specific problem, I would be happy!