Postponed
Project:
Vertical Tabs
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2009 at 14:40 UTC
Updated:
31 Jan 2019 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
crea commentedSetting proper title.
Also, it's worth to note, that when multigroup is rendered as fieldset inside vertical tab, "add more values" works fine. Because of this, and the fact other CCK "add more" buttons work fine inside Vertical Tab, I tend to think this is problem in content_multigroup JS which fails to find proper place to add item.
Comment #2
crea commentedComment #3
markus_petrux commentedI have installed Vertical Tabs to try to debug this, and I've found the problem, but I'm afraid this cannot be fixed in Content Multigroups module. Let's see...
Vertical Tabs searches for top level elements in the form that are fieldsets, and if enabled in Content Type settings form, it manages them in the node edit form. Here, Vertical Tabs moves the whole fieldset to a new position in the DOM.
The problem is that the fieldset used by multigroups is wrapped with a div that is necessary for the AHAH processing of the "Add more values" button. While Vertical Tabs moves the fieldset in the DOM, the AHAH wrapper of the multigroup remains in its original position, and this is what is replaced by the AHAH callback, so after the "Add more values" button has been processed, the form ends up with 2 multigroups (the one that was moved by Vertical Tabs to its new position and the one that comes from the AHAH response).
The multigroup module cannot move this wrapper inside the fieldset because both things are part of the same form element. Well, I cannot see a reliable way to do it from content_multigroup_add_more_js().
On the other hand, maybe the Vertical Tabs module could take this into account and process the fieldset wrapper (not the fieldset itself, but its wrapper) when it is related to AHAH stuff?
Comment #4
markus_petrux commentedMoving to the VT queue, as I think this cannot be done in multigroups module. On the other hand, VT would have to move the DOM element used to wrap the fieldset instead of the fieldset itself.
Comment #5
markus_petrux commentedAnother thing VT could do is inject its own wrapper to the fieldset during hook_form_alter(), using #prefix and #suffix, and then it could manipulate this DOM element instead of altering the elements owned by other modules, because it is now breaking Content Multigroup, but it could probably break others.
Comment #6
markus_petrux commentedComment #7
crea commented[edit] pls ignore this. It was wrong solution.
Comment #8
EHA commentedSubscribing
I would really like this functionality with VT and multigroups for my custom node forms. netaustin placed a patch for tabs.module for fieldgroup_tabs to work with multigroups, maybe some of the code can be used as seed for this issue. See here http://drupal.org/node/590386.
Would appreciate it crea if you could share patch or module solution you described above.
Comment #9
crea commentedPatch is not possible since it's custom solution related to my site. It would be possible to make this as independent module, but I won't waste time doing it cause it can (and should) be fixed in VT module at any moment. Instructions I posted are enough to make your custom workaround. If you can't program, sorry, you have to wait for bugfix.
Comment #10
bomarmonk commentedConfirming this problem in the latest vertical tabs release and that this still needs to be fixed. Can vertical tabs include official compatibility for multigroups? Thank you!
Comment #12
dave reidI don't use CCK Multigroup so it will require someone to submit a patch and others to review it.
Comment #13
dave reidPlease test and re-confirm using the latest code, 6.x-1.0-beta6.
Comment #14
bomarmonk commentedI just upgraded to the latest release, updated the database and I get the following error
Fatal error: Call to undefined function vertical_tabs_fieldsets() in /home/gov/mysite/WWW/mysite.com/sites/all/modules/vt_default/vt_default.module on line 58Comment #15
dave reidThat's a problem with the vt_default.module. Please open a new issue at http://drupal.org/project/issues/vt_default
Comment #16
crea commentedI tried beta6 and bug is still there...copy of multigroup is created outside of VT when "add more" is pressed.
Comment #17
bomarmonk commentedConfirming that duplicate display bug is still there (and my vt-default problem is now fixed in that project-- sorry about the stray issue)
Comment #18
crea commentedComment #19
bomarmonk commentedHere is a screen-shot of the cck fieldset (a multigroup) on the edit form. When selecting "Add more values" the fieldset is still rendered a second time on the page and outside the vertical tabs display. What other information can I supply you in order to help?
Comment #20
dave reidCan someone type out a list of specific instructions to create this CCK field/multigroup so I can duplicate this?
Comment #21
bomarmonk commentedGo to http://drupal.org/project/cck and select "View all releases." Download cck 6.x-3.x-dev and install it in your Drupal 6 test environment. Download and install the latest vertical tabs module and be sure that it and the content multigroup module are enabled. Create a content type and add a new group for your content type, but choose multigroup instead of the standard group. Add some fields to this multigroup (in my case I'm using only two text fields to test). Then save your content type. Try creating this content type with this multigroup in a vertical tab on the edit form. Click "add another" below the first set of fields, and prang, you should see the duplicated fields on the node edit screen. I hope that helps!
Comment #22
dave reidAh, that's why I was so frustrated trying to figure it out. I use the DRUPAL-6--2 branch of CCK on my dev install. Ok this is not a very high priority since there isn't even a download to use CCK 6.x-3.x yet (have to checkout from CVS).
Comment #23
dave reidOk I've figured out what's going wrong here. The multigroup element has set a $element['#prefix'] and $element['#suffix']
This may require backporting the D7 vertical tabs JavaScript so that the actual fieldsets are not modified.
Comment #24
dave reidHaha, yeah this needs to be fixed in D7 as well. Things go horribly wrong with #prefix and #suffix. Created a core bug report at #656580: Fields with #prefix and #suffix fail miserably with vertical tabs. Until then, I don't know how to best fix this.
Comment #25
bomarmonk commentedIs there a temporary workaround that will fix this for vertical tabs in Drupal 6? Multigroup (CCK 3.x-dev) is being widely used, as I understand it, and the multiple fields through multigroup are more important than having vertical tabs. I may just have to disable vertical tabs and let my user interface suffer as a result :( Anyway, thanks for looking into this, anyone; I like these vertical tabs.
Comment #26
dave reidNo, there's no workaround. Its a bug that'll need to be fixed by brighter minds since there is the same problem in core as well.
Comment #27
crea commented[edit] ignore this
Comment #28
iwryanb commentedsubscribed. also hoping for a workaround or fix.
Comment #29
Canine Coaches commentedsubscribing. vertical tabs is awesome, but I am using multigroups. cannot code, but willing to test.
Chris
Comment #30
3dloco commented+1
Comment #31
kleinmp commentedI have a solution that solved the problem for me when using multigroups with vertical tabs.
I'm posting the patch, but please note that this is only a fix for the issue with multigroups (doesn't fix the more general prefix, suffix problem). Also, note that this is sort of hacky, and is really only a temporary solution.
Comment #32
sethhavens commentedsubscribing
Comment #33
dgastudio commented+1
Comment #34
seancorrales commentedHacky or not, the patch posted in #31 worked great. Thanks!
Comment #35
tim.plunkettPatch at #31 didn't work for me. Subscribing and waiting for #656580: Fields with #prefix and #suffix fail miserably with vertical tabs.
Comment #36
5t4rdu5t commentedSolved the problem completely. Patch #31 worked like charm for me. Thanks a lot! :-)
Comment #37
k8 commentedI had a problem after upgrading to 6.x-1.0-rc1 where a Standard Group would only display in a vertical tab even through set as "always open" as desired. It was unclear to me which version Patch #31 applied to.
Falling back to 6.x-1.0-beta7 resolved the problem. Vertical tabs does not show as an option which is fine.
Comment #38
damienmckennaAm running into this too :-\
Comment #39
damienmckennaAnother issue:
Comment #40
crea commented#31 works for me with beta6 (had to manually apply 1 chunk).
Comment #41
Taxoman commentedSubscribing.
Comment #42
henrijs.seso commentedSubscribing.
#31 works, but removes padding and vertical tab contents fill all tab, probably manageable with css.
Comment #43
crea commentedJust want to note that I'm no longer using a workaround I posted in #7. It turned out to be wrong solution causing different issues with form processing.
I switched to the patch in #31
Comment #44
henrijs.seso commentedIs it just me, or patch #31 acts wired. I get empty fieldset with no legend above multigroup before clicking on 'Add more items' and proper fieldset with legend after?
Comment #45
NathanM commentedSubscribing. Would love to see this fixed & committed.
Comment #46
fowlerjb commentedAfter installing Vertical Tabs 6x-1.x-dev I applied the patch from #31. It does work. When using multigroups I was able to add the new value; however in edit mode I was presented with 2 instances of the multigroup, one with the new field to add the new value, the other with the group as was before editing. I added the new value, clicked save and it worked. Going back to the view mode the multigroup appeared properly. Other than the confusion that might be caused by the user seeing 2 instances of the multigroup when in edit mode I am happy with the patch.
Comment #47
blakehall commentedHaving the same issue here. (With the patch in #31 mostly working)
Comment #48
drupalnesia commentedSubscribing, more than 1 year but still no committed path?
I have tested 6.x-1.0-rc1 and 6.x-1.x-dev but still error. Multigroups is very important feature for Drupal.
Comment #49
Vote_Sizing_Steve commentedPatch #31 works for me, fairly well. However, it would be much better for my site if the multigroup wasn't treated as a vertical tab, but as a nested group inside the other vertical tabs.
Comment #50
jstollersubscribing
I agree with #49. I would like to put my multigroup in another tab, rather than have it be its own tab.
Comment #51
jstollerProblem solved!
I've been testing the CCK patch at #849420: Cumulative Nested Fieldgroup Patches and so far it seems to work beautifully. It lets you put a multigroup inside a standard group, which prevents vertical tabs from messing with it. This also means you could group other fields with the multigroup in that same tab.
Comment #52
grndlvl commentedRe-rolling so automated patches.make applies patch without hassle.
Comment #53
jvieille commentedThe patch does not do anything actually.