Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
[Due to excessive number of offtopic replies, I locked this issue. chx ]
As an administrator, I'm unable to affect any change to the allowed HTML tags since the upgrade to 5.6 today. To reproduce, log in and go to:
admin/settings/filters/1/configure
Change any setting related to the HTML filter. I tried adding a tag to the allowed HTML tags. Submit the form to save changes. When the page reloads, you see no message saying "Changes were saved."
Changes to the other tabs (View and Rearrange) can be saved without a problem.
Comment | File | Size | Author |
---|---|---|---|
#7 | filter-config-208700-7.patch | 1.15 KB | pwolanin |
#3 | filter-config-208700-3.patch | 1.08 KB | pwolanin |
Comments
Comment #1
silke CreditAttribution: silke commentedJust want to confirm this bug.
As a workaround I replaced the file modules/filter/filter.module with its 5.5 version,
then added the needed tags to the list of allowed tags and replaced that file with its 5.6 version again.
Comment #2
peterpoe CreditAttribution: peterpoe commentedConfirming. Seems that this was caused by Inconsistent behavior with filtered tags, a bux fix for drupal 6 that was backported to drupal 5.
There are two separate bugs in filter.module here:
- The submit function 'filter_admin_configure_submit' (line 619) is never called, because line 608 of the form building function 'filter_admin_configure' is wrong. It's
$form['#submit'][] = 'filter_admin_configure_submit';
while it should be
$form['#submit']['filter_admin_configure_submit'] = array();
- But even if you correct this line, the system variables are not saved. I found in this page that if you use submit functions in a system settings form, there is no automatic processing of the variables. I tested it: it's true! Maybe this has changed in drupal 6, and that's why the problem wasn't noticed?
Comment #3
pwolanin CreditAttribution: pwolanin commentedHmm, obviously I backported from 6 while forgetting the change in the FAPI syntax. Things have indeed changed between 5.x and 6.x in terms of the removal of the #base element from FAPI and its use in system_settings_form(). It's too bad that this got incorporated in 5.6 before anyone noticed it.
The attached patch I just tested and seems to solve the problem.
Comment #4
webernet CreditAttribution: webernet commentedTested #3, fixes the form saving issue, but the filter cache doesn't appear to be clearing...
Comment #5
pwolanin CreditAttribution: pwolanin commented@webernet: the cache-clearing call is the same as in function filter_admin_delete_submit() - does that one work?
Comment #6
keith.smith CreditAttribution: keith.smith commentedI haven't had to edit the tags in Filtered HTML in a while, until today, when I had to do it (add a blockquote) and it wasn't working.
Anyway, the patch in #3 does solve the editing issue, in that you can add a tag to the list and the change is preserved.
But, as noted in #4, it doesn't seem to make a difference even after re-editing and saving the node. I manually truncated my cache tables and it displays correctly, however.
Comment #7
pwolanin CreditAttribution: pwolanin commenteddoh - in one function $format is an object, in another it's an int. This one seems to work to clear the cache.
Cleary I need webernet to test my patches or I'm lost...
Comment #8
keith.smith CreditAttribution: keith.smith commentedI tested this patch on the same install (after reverting the earlier patch) and it works fine. Invalidates the cache correctly, and saved values persist on the filter configuration form. Thanks, pwolanin and webernet: this makes my life much simpler today.
Comment #9
webernet CreditAttribution: webernet commentedLooks good. Works fine.
Comment #10
matt@antinomia CreditAttribution: matt@antinomia commentedFixes the issue for me too.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks for fixing the problem!
Comment #12
CompShack CreditAttribution: CompShack commentedI'm new to this and noticed the same bug. How can I apply a patch to my upgrade?
Thanks for the help.
Comment #13
gpk CreditAttribution: gpk commentedhttp://drupal.org/patch/apply
Comment #14
Crell CreditAttribution: Crell commentedI had a weird issue where this bug appeared only on one site, but not on another copy on a different server. No idea why, but with this patch it works great on both servers. Let's commit!
Comment #15
aclight CreditAttribution: aclight commentedPatch in #7 works for me as well.
Comment #16
CompShack CreditAttribution: CompShack commentedThanks for the link but it wasn't much help for me.
I managed to get it to work though - I just opened the file, and then replaced lines showing "-" with lines having "+" :)
works great.
Thanks again!
Comment #17
liamgoldstein CreditAttribution: liamgoldstein commentedHi,
I'm not sure if this is even the same issue but I can't add any html to my content.
I have tried to manually apply the patch to filter.module (as I don't have a local copy or ssh access on my hosting) but it's still not fixing the issue.
I have a 'out of the box' install of drupal 5.6 and It has never allowed me to add html to my content whether I choose filtered or full. When i try to preview or submit content with html tags in or if I change the input format configuration I just get redirected to the root of my site (i.e it doesn't display the same page with an 'updated' message it takes me to the base url).
view and rearrange work but configure doesn't.
If anyone has any ideas or is willing to give me some help I would be sooo greatful.
Thanks.
Comment #18
sethcohn CreditAttribution: sethcohn commented+1 on the patch in #7
Worked for me.
Comment #19
gpk CreditAttribution: gpk commented@liamgoldstein: this sounds like a different issue. Suggest you open a forum topic http://drupal.org/node/add/forum/22 in the first instance, or a new bug report http://drupal.org/node/add/project-issue/drupal. It's may be something to do with your server configuration interacting with Drupal in a peculiar way.
Comment #20
softtouch CreditAttribution: softtouch commented#7 patch worked, even I had to modify the file by hand (damn patch utility for windows did not patch anything...).
Now I can finally use windows live writer to post my blogs with images (had to add the tag to allowed html tags).
Comment #21
gpk CreditAttribution: gpk commentedIf anyone else is having trouble getting patch to work on Windows, there may already be another and hence conflicting "patch" program/command on your system. See http://drupal.org/node/60182#comment-634955
Comment #22
jecal CreditAttribution: jecal commentedis there any kind of QA .. even minor revisions constantly break things :/
Comment #23
jazzmoose CreditAttribution: jazzmoose commented+1 on patch in #7 - thanks very much!
: )
Comment #24
hedu CreditAttribution: hedu commentedHi,
#7 worked for me, too. Thanks a lot!
Comment #25
trumpcar CreditAttribution: trumpcar commentedConfirming patch #7 worked for me as well. Many, many thanks.
Comment #26
soxofaan CreditAttribution: soxofaan commentedpatch #7 works for me too, thanks
Comment #27
JohnFilipstad+1 on patch in #7
thank you!
Comment #28
Orthogonal Space CreditAttribution: Orthogonal Space commented+1 on patch in #7 working
Thank you!
Comment #29
rileyhuff CreditAttribution: rileyhuff commented#7 patched worked on WAMP server, used cygwin to patch.
Thank you!
Comment #31
drummModified to more-completely use Form API and committed to 5.x. Make sure to thoroughly test patches before submission in the future.
Comment #32
wolf_halton CreditAttribution: wolf_halton commentedHow do I apply the patch if I cannot get a command line in the server?
Is it really obvious?
Comment #33
gpk CreditAttribution: gpk commentedhttp://drupal.org/node/212338#comment-698979
Alternatively, now that the patch has been committed, you will be able to use http://drupal.org/drupal-5.x-dev instead of 5.6. You may have to wait for a few hours for the dev version to be (automatically) updated - it's currently still showing last update as being on Jan 11.
[Update: http://drupal.org/drupal-5.x-dev now includes this patch]
Comment #34
allella CreditAttribution: allella commentedIf you can't apply a patch then it follows from gpk's last comment that you can simply grab the /modules/filter/filter.info and /modules/filter/filter.module from the extracted 5.x-dev and replace just these two files on your 5.6 /modules/filter directory. I just did it and works like a champ.
Comment #37
chx CreditAttribution: chx commented