Closed (fixed)
Project:
Select (or other)
Version:
7.x-2.x-dev
Component:
CCK / Field API widget
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 23:24 UTC
Updated:
1 Apr 2014 at 15:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danielb commentedConfirmed, plus the ordering seems to get lost?
Had a quick look, couldn't figure it out.
Comment #2
danielb commentedI have another module with this functionality, I will check if it's working there.
Comment #3
danielb commentedIt works in Block Reference, I'll try to see what could be different in the code...
Comment #4
danielb commentedbah it's done a totally different way, will try to just find a fix for the current way it works
Comment #5
danielb commentedI got rid of the error by changing this line ~334 in select_or_other.field_widget.inc
to this
it's a bit iffy
Comment #6
danielb commentedand doesn't fix the ordering issue
the info about the ordering comes through in the validate function at
$element['_weight']['#value']
but I've never had to specifically handle it before so not sure
I wonder if there are some other modules that use drag and drop ordering I could check
Comment #7
Rory commentedAfter applying your change in #5 an error still occurred so I changed the start of the function from:
to:
Then your:
can become:
which looks nicer. But about this:
If you mean the checkbox "Sort options - Sorts the options in the list alphabetically." I checked that and it appears to sort the select list on the content type creation form. So yeah - maybe that's working? Am I supposed to be seeing a plain old select list there, though? Or a list of drag and drop items... because it's just a plain select list. But it sorts alphabetically (by value) when the checkbox is checked, and doesn't sort when the checkbox is unchecked. Which is good.
It would help to update the description "Sorts the options in the list alphabetically." to "Sorts the options in the list alphabetically by value." just to make this clear to an administrator before they select it.
Comment #8
danielb commentedI meant the ordering that happens when you drag and drop the items. I think that's meant to work automatically but it doesn't.
BTW The sorting you're talking about isn't actually alphabetical sorting it is a "natural order" algorithm which means nothing to most people, so saying alphabetic wouldn't be correct.
Comment #9
Rory commentedAlphabetical... natural order... I only suggested adding "by value" to the description. It's not my writing otherwise.
It would be helpful to indicate sorting applies to values, and not keys. Rather than not indicating either way.
Comment #10
rsgracey commentedWould someone please roll us up a patch for this module, so that we can make it official? I've just started having this same error, and I'd like to test a patch.
Comment #11
Rory commentedPatch attached contains the fix, and the 'Sort options' elaboration on sorting by value.
Comment #12
ilechcod commentedI'm getting the same errors.
Please how do I install this patch?
Comment #13
Rory commentedWindows patching: http://drupal.org/node/620014
Mac OS X patching: http://drupal.org/node/60818
So... once the "patch" command is operational for you, type "patch --help". That will list some very helpful examples.
Comment #14
danielb commentedIf you use git there are specific instructions for patching this module available on the project page if you click 'version control' up the top.
If we get more positive feedback I will be happy to commit.
Comment #15
danielb commentedIn there interest of speeding this issue up I have committed the patch. I find it likely that it will work, but if anyone notices any side effects I guess we'll have to revisit this.
Comment #16
Rory commented@danielb - for future reference, under a user's profile you'll find an instruction on how to pass authorship attribution to that user, via 'git commit'.
A number of patches you've applied in the past could have had authorship attributed to other users. If you fail to do this in future, authorship of patches will continue to be attributed to yourself! :-)
Comment #17
danielb commentedOh sorry dude, I thought writing your username into the commit message would cover it. I learnt maintaining modules back in the CVS days.