chx mentioned in drupal-devel:
If someone is bored and want to code something, there is core work to do before we can go RC: custom block and comment uses filter_form. Thus their save routines need to be changed to the form execute model otherwise they won't work in some cases.
Attached is my attempt to convert block_box_add and block_admin_configure to the formsapi execute model.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | block_execute.patch | 11.44 KB | chx |
| #12 | block-admin-form-execute_3.patch | 11.74 KB | drewish |
| #11 | block-admin-form-execute_2.patch | 11.63 KB | asimmonds |
| #10 | block-admin-form-execute_1.patch | 9.9 KB | asimmonds |
| #2 | block-admin-form-execute_0.patch | 9.71 KB | asimmonds |
Comments
Comment #1
asimmonds commentedFurther tests show that I haven't got the error handling completely correct.
Comment #2
asimmonds commentedUpdate attached with form validation.
Comment #3
asimmonds commentedThis patch also fixes a typo that results in a infinite loop from the form api when admin/block/configure/* is viewed
(http://drupal.org/node/35682)
Comment #4
drewish commentedhumm, i can't get that patch to apply to HEAD. it may be on my end, patch is failing with an error that i'm not used to.
Comment #5
asimmonds commenteddrewish:
No use complaining about getting a error with this patch if you don't say what the error is, so you could be helped to fix it.
So what's the error you get?
Comment #6
drewish commentedasimmonds, I hardly think I was complaining. I simply pointed out that it didn't work for me but that the fault was probably mine. I didn't really want to turn it into a "help me debug patch" thread. But, since you asked ;) the error, using GNU patch 2.5.9 on Windows, is:
I've used it successfully on other patches but I've never seen that error.
Comment #7
asimmonds commentedSorry for sounding a little bit abrupt, 6am was a little early for me and I suppose it's a little of topic but no one else is reviewing this patch.
The problem with that version of patch is that it doesn't like patches with unix-style line-endings(LF). If you convert the patch to one with DOS/Windows style line-endings (CR/LF), it will work. You can convert it with any decent texteditor or command line utility like unix2dos.
I use the cygwin suite of tools under windows, and don't really get problems like this.
Comment #8
chx commentedThat's no Drupal error and has nothing to do with the patch.
Comment #9
drewish commentedasimmonds, no worries. Thanks for the tip, I was hoping it was something simple like that.
Comment #10
asimmonds commentedRe-roll patch for current HEAD.
Comment #11
asimmonds commentedSome code cleanups and fix the bug with individual theme block settings.
Comment #12
drewish commentedas noted in another bug, there's still a problem changing the block settings for a theme other than the user's. the problem is that up in block_menu() it makes the system's theme the default task. the form, on the other hand, uses the user's theme as the default.
i've made a small change to asimmonds patch to fix this.
Comment #13
chx commentedWhy this patch is needed? Because filter now uses #value for single case and simply old style block configure won't work in this case -- there is no format in POST edit. Therefore I deem this critical.
Rerolled.
Comment #14
drewish commentedchx's re-roll looks good to me. can we get this committed?
Comment #15
dries commentedCommitted to HEAD. Thanks!
Comment #16
(not verified) commented