Closed (fixed)
Project:
Rubik
Version:
6.x-3.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2010 at 14:51 UTC
Updated:
2 Sep 2013 at 08:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
stijndm commentedI was able to break this down to three issues:
1. Drag and Drop is broken
This is due to the following piece of code which ignores Drag and Drop weight elements:
Changing this to the following fixes the problem, although this is just a quick fix. The point is to check for the Drag and Drop weight element before doing stuff:
2. Filter radio's aren't themed correctly
This is a problem with the css not being applied correctly to filter options in a multiple field.
More specifically, these selector under Form description exceptions are causing the style issues:
If you want a quick solution you could replace
with
3. When having unlimited fields: after adding another the filter options are themed as a fieldset again
This is to do with the theme that processes the Add Another not being run through rubik_preprocess_form_filter().
No solution here yet.
Comment #2
karens commentedI ran into this too. I think basically Rubik should just leave the filter form alone when it is in a CCK unlimited value field. I tried added a check for that before altering the filter and it leaves the other filters alone and just skips the ones that are problematic.
I don't have a cvs version of the code loaded so I can do a proper patch, but I altered the code to look like this:
Comment #3
karens commentedThat might be cleaned up by moving the test to where _rubik_filter_form_alter() is called and just bypass this function altogether if this is a multiple value field.
Comment #4
markdorisonRolled KarenS's changes into a patch.
Comment #5
nicholas.alipaz commentedpatch seems pretty good to me, except I still see an issue if I have a cck flexifield, set to multiple values, that contains a text field (filtered input).
my_flexifield (unlimited)
- input (filtered)
Comment #6
jaydub commentedThe patch in #4 will only work when the CCK field in question is set to 'unlimited' values in which case $field['multiple'] is equal to 1. If the number of values for the field in question is 2 or more then the value of $field['multiple'] is equal to the number of values.
So the revised patch simply tests for whether $field['multiple'] is greater than 0.
Comment #7
jaydub commentedI re-rolled my patch in #6 to account for an additional scenario. We are using the Better Formats module and in the case where you have a CCK field with multiple values set AND using Better Formats you only have 1 format able to be used for a given field/user, the patch in #6 doesn't help. So I've altered the patch to protect against the issue with the form alter breaking AHAH drag 'n' drop for this additional scenario.
Comment #8
mrconnerton commentedI have applied and tested #6 and works for me. I didn't use #7 simply because I don't have better formats.
Comment #9
nicholas.alipaz commentedThis still doesn't seem to fix issue with flexifield although other field types look good.
Comment #10
alduya commentedThe patch in #7 solved the issue for me. But it does generate a whole lot of these:
notice: Undefined index: #fields in /Users/alduya/Sites/testing/sites/all/themes/rubik/template.php on line 604.And line 604:
doesn't seem to be necessary. $fields is not used in that function.
Comment #11
sammys commentedHere's #7 with the #10 line removed. Works fine and even resolved a problem where some of the values in a multiple value textarea field were removed. Weird behaviour.
+1 for the commit.
Comment #12
dsnopekPatch in #11 works great for me!
Comment #13
haydeniv commentedCommitted: 3623bbb
Thanks!