not sure if this should be marked critical, but since it prevent the average joe from accessing all settings during the install, I figured it's quite a biggie
the problem is that the #attached_js doesn't get added untill theme_fieldset, where it doesn't really get used, so I moved this:
$element['#attached_js']['misc/collapse.js'] = array();
from the theme_fieldset function to the form_process_fieldset(&$element, &$form_state) function (where form.js also gets added), wrapped in the conditional
requires review with edge cases
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | 560944-form-collapse-7.patch | 3.22 KB | bowersox |
| #21 | 560944-form-collapse-6.patch | 3.22 KB | bowersox |
| #16 | fieldsets.patch | 2.91 KB | seutje |
| #13 | 560944-form-collapse-4.patch | 3.24 KB | bowersox |
| #11 | 560944-form-collapse-3.patch | 3.24 KB | davyvdb |
Comments
Comment #1
seutje commentedComment #2
seutje commentedComment #3
TheRec commentedIt works. The collapsible fieldset "Advanced options" works during install with Garland and other collapsible fieldsets are also working when using Garland as the administration theme.
I re-rolled this just to have the correct line-endings (nothing else changed), I thought it would spare you the monkey job ;)
Which other "edge" cases do you think we should test ?
Comment #4
seutje commenteddammit, always forget about the CRs :x
for the other edge-cases: I dunno, some people do some serious magic with their forms
Comment #5
bowersox commentedThe patch works for me too. "Advanced options" are back during install. In addition you can now find working collapsible fieldsets here:
Thanks for the fix! This looks ready for RTBC.
Comment #6
davyvdb commentedComment #7
davyvdb commentedI had come to the same solution for this.
Comment #8
alanburke commentedPatch applies cleanly and does the job.
Is there any way to add tests for this kind of stuff?
It's easy enough to change some markup, ids, classes etc, and forget that some javascript functionality is relying on it.
Comment #9
webchickOh, yay! Thanks a lot for this, it's been seriously annoying me. :)
Committed to HEAD!
Comment #10
bowersox commentedShould the same drupal_add_js() call be removed from seven/template.php:
Comment #11
davyvdb commentedYes, and even more. We can remove the whole
Because adding the javascript without the classes makes no sense.
Comment #12
seutje commentedthis title better?
Comment #13
bowersox commentedHere's a revised patch with one important line of code retained in form_process_fieldset() that the last patch had removed:
I believe we need to keep that line of code to keep the collapsible fieldsets working. @Davy, tell me if I'm misunderstanding or if a different change is needed.
Comment #14
davyvdb commented@brandonojc correct. copy past error :)
Comment #16
seutje commentedupdated to current HEAD (crossing fingers)
Comment #17
seutje commentedgo testbot!
Comment #18
seutje commentedomg, first try, I think I'm going to cry
Comment #19
bowersox commented+1 for the patch in 16 from seutje. The code looks good and we reduce duplication without changing functionality. I tested and found that everything works right:
Comment #21
bowersox commentedPlease review. This is just a re-roll of the prior patch. In brief, this change reduces duplicate code without changing functionality.
Tests passed:
Comment #23
mattyoung commented.
Comment #24
bowersox commentedPlease review this one instead ;-) Sorry about that last one--dumb mistake trying to fix a blank line.
Comment #25
bowersox commentedCan anyone give a quick review and test of this?
Comment #26
seutje commentedlooks good afaict
Comment #27
webchickHm. I think this makes sense. Makes the theme function a heck of a lot cleaner, anyway. I was originally concerned about that misc/collapse.js might be better as a theme-only thing, but we're already setting that and attach.js in the process function.
Committed to HEAD.
Comment #30
mikehughes commentedthis might have been fixed for most browsers but it is still an issue for Chrome users. The Advanced Options just won't show, don't even show as a hyperlink. This was using the latest stable download for 7.2 on Chrome 12.0.742.91
Comment #31
summit commentedStill not working on Chrome for version 7.19!
Greetings, Martijn
Comment #32
LadyAnna commentedStill doesn't work on chrome with version 7.36, worked when I switched to firefox though.