Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the ctools dependent functionality on field (in my case a taxonomy field) where you have made multiple selections possible the original ctools dependent matching does not work.
The original code only iterate through arrays on the trigger items and not through the selection which in this case is an array as well.
A patch for this is provided.
Comment | File | Size | Author |
---|---|---|---|
#8 | ctools_dependent-2333995-8.patch | 700 bytes | sl27257 |
Comments
Comment #2
sl27257Comment #5
sl27257New try with the same diff but in a slightly different format...
Comment #6
sl27257Comment #7
sl27257Moved to "Needs review"
Comment #8
sl27257Updated the patch. "Always reset your inner indexes"
Comment #9
DamienMcKennaComment #11
DamienMcKennaYou should only assign an issue to yourself if you're going to work on it, otherwise please leave it unassigned. Thanks :)
Comment #13
sl27257I am sorry but I am not sure I understand? This was and still is a problem with the current ctools :( (At the time I wrote it it was in 7.x-1.4) The fix is working for me but as I wrote the patch it it is always good to have some else to review it as stated here ("CNR"):
https://www.drupal.org/node/156119
If someone finds a problem I will check and update my fix. So I don't understand why it can't be assigned to me?
Please explain thanks, I might have missed something?
BR
/Thomas
Comment #14
DamienMcKenna@sl27257: I look at the "assigned" status to mean "I am actively working on this right now", not "I worked on this at some point in the past and can pick it up again if it needs attention". My rationale is that most issues bounce around with multiple people contributing to the final solution, including multiple people working on improving the patch, and having it assigned specifically to one person can turn others away from collaborating.
IMHO the best thing to do is assign the issue to you when you're actively working on it. If you stop being able to actively work on it then change the assignment to "unassigned" so someone else can pick it up, likewise when you've completed something (i.e. upload a patch) also change it to "unassigned" for others to review it.
Otherwise, thank you for the patch, I'll see if I (or someone at Mediacurrent) can give it a review this coming week. Happy New Year to you!
Comment #15
sl27257This still exists in the latest 7.x-1.6 release.
Comment #16
DamienMcKenna@sl27257: The standard practice is to just leave the version as the -dev version, that way we know it's still appropriate.
Did you test the patch?
Comment #17
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch in #8 to dependent.js applied cleanly to the latest ctools 7.x-1.x-dev, but still needs to be reviewed and tested.