Support for multiple "Field Collection" fields to have a dependency on all instances of the fields within that collection. For example, say you create a "Field Collection" field and checked it to have the "Number of values" set to unlimited. Then you configure the "Field Collection" field to have a checkbox and textarea field attached. When you would check the "checkbox" field you would like to then display the textarea field which you setup using the "Conditional Fields" module interface. This all works for the first instance of the "Field Collection" field. When you start creating multiple instances using the "add another item" button, the checkbox condition will not work for those additional instances. Does any one have any suggestions on how I can go about implementing this?
Thanks,
Droath
Comments
Comment #1
airb CreditAttribution: airb commentedsame happens here.
Comment #2
airb CreditAttribution: airb commentedduplicate of http://drupal.org/node/1438632
Comment #2.0
airb CreditAttribution: airb commentedUpdated explanation of feature
Comment #3
FranckV CreditAttribution: FranckV commentedHi, I also have the need for this functionality.
Comment #4
droath CreditAttribution: droath commentedI have a patch that adds this functionality, I will be releasing it here soon...
Comment #5
droath CreditAttribution: droath commentedHere is the patch that implements this functionality described above.
Comment #6
droath CreditAttribution: droath commentedI rerolled the patch so It could be applied from the "conditional_fields" module directory.
Comment #7
bryancasler CreditAttribution: bryancasler commentedCan't wait to test this!
Side question, would your patch possibly solve this issue as well? #262453: Grouping dependencies by dependent with OR/XOR evaluation
Comment #8
rhiss CreditAttribution: rhiss commentedi try to apply the patch online through: http://owl.cs.manchester.ac.uk/patch/patch-form.php
but the problem for the "Field Collection" fields remained.
i have the condition set by using an select box, it only works for the first item in the collection ....
any suggestion for me ?
Comment #9
droath CreditAttribution: droath commented@rhiss
Can you confirm the patch was applied correctly using the third-party patching tool? If your familiar with git, you can read how to apply patches here: https://drupal.org/node/707484. It's about 3/4 way down the page, where they tell you how to apply a patch.
How many "field collection" fields are attached to the entity your working with? I have only tested with one "field collection" field attached to a node entity, but the "field collection" also has another "field collection" field attached to it as-well. On that second collection is where I have the conditional field module configured to manipulate the form. Let me know if you have a different situation, and I will adjust my patch if needed.
@animelion
I will look and see if this patch can help resolve issue.#262453: Grouping dependencies by dependent with OR/XOR evaluation
Comment #10
rhiss CreditAttribution: rhiss commenteddroath thx for your attention. after checking the online-patched version i noticed, nothing was patched.
i tryed patching with git, both of you versions, from root and module dir but i get errors like "warning: squelched 26 whitespace errors
warning: 31 lines add whitespace errors." i m not so familiar with patching but i could try to do it manualy, or you could post your patched module file here, would be great!
basicly what i want to do is to have one "field collection" on a node with diffrent fields(image, file, long text,... ) and select on each added entity instance which fields i want to edit. it should become some flexible content node without content syling in the RTEditor.
i know there are other ways to do it with entity types, but with the Conditional Fields Module and FieldCollections it should work as well!
Comment #11
3rdLOF CreditAttribution: 3rdLOF commentedPatch in #6 fails completely
Comment #12
3rdLOF CreditAttribution: 3rdLOF commentedI tried patching manually, but there are just way to many differences in the code. It looks like the latest version of CF changed quite a bit, thus making the pacth obsolete. Bummer.
Thanks for doing it thought.
Comment #13
droath CreditAttribution: droath commentedThis patch has been altered to work with conditional_fields 7.x-3.x-dev (2012-Apr-13).
The issue that I uncovered was that we were not storing multiple conditional fields in $form['#conditional_fields'], just data for the first conditional field, which is delta 0.
For instance, say we had field $element[foo][und][0] this would index the $form['#conditional_fields'] array by the dependees/dependents field name, so it would be like this: $form['#conditional_fields']['foo'][...][...].
So when $element[foo][und][1] tried to join $form['#conditional_fields'] array it wouldn't be able too, since we were already storing that data for the dependees/dependents foo field.
The way I implemented it in the patch was by indexing the $form['#conditional_fields'] array by the field parents flatten array. So that it could accommodate for multiple conditional fields, since it now has a unique field key. So now $form['#conditional_fields'] stores data like this:
Since we are now storing the field parents as a flatten key, we could then remove $form['#conditional_fields'][foo:und:0][foo][parents] array, as that's the same data collected twice. But I'll leave that up to the module maintainer.
Let me know if you have any issues with this patch, or If anyone has a better solution on how we can accommodate for this functionality.
Comment #14
droath CreditAttribution: droath commentedComment #15
3rdLOF CreditAttribution: 3rdLOF commentedWas this commited to the 17th dev release? Just wondering
Thank you very much for the reply and the patch.
Comment #16
3rdLOF CreditAttribution: 3rdLOF commentedI tried applying it on the 17th dev release, it failed. I know you say it was made for the 13th one, but I tried it.
Comment #17
rhiss CreditAttribution: rhiss commentedsame here. i tried patching the last conditional_fields 7.x-3.x-dev (2012-Apr-17). didnt work.
am i missing something, is there a version 7.x-3.x-dev (2012-Apr-13)?
Comment #18
bigjim CreditAttribution: bigjim commentedI was able to apply the original patch against the 4/13/2012 -dev version (git commit b10aa5aa310). I found a "}' was missing on line 627.
The attached patch is re-rolled against the 7.x-3.x HEAD (git commit d905202fad), which is likely one commit ahead of the 4/28 -dev version on the project page right this moment.
The attached patched worked great for me. I tested in on a 3 field field collection. My first field was select box, the 2nd and 3rd fields in the collection were check boxes. I set-up my dependencies respectively between the 1st, 2nd and 3rd fields and all worked great.
Comment #19
bigjim CreditAttribution: bigjim commentedLooks like it's already in the repo as of 4/24, marking this fixed. It should be in the May 1st -dev tar ball.
Comment #20
bigjim CreditAttribution: bigjim commentedsorry I jumped the gun doesn't look like it's actually fixed yet
Comment #21
3rdLOF CreditAttribution: 3rdLOF commentedLAtest patch seems to have been added to latest release. (patching reports no changes)
Comment #22
rfc2460 CreditAttribution: rfc2460 commentedHi,
It seems that your patch references a file named "states_enhancements.js" that I do not find. Did you modify the states.js file to fix this bug ?
(and of course thanks for the work !)
Comment #23
Merkator CreditAttribution: Merkator commented@rfc2460 > states_enhancements.js is in conditional_fields.js.
http://drupal.org/node/206178/commits
Comment #24
wrd CreditAttribution: wrd commentedI'm not having any luck applying the patch from #18 to the current dev version, and as far as I can tell, it's not implemented. Anyone else have it working?
Comment #25
wwhurley CreditAttribution: wwhurley commentedI'm unable to either. Anyone else have luck?
Comment #26
guidotti CreditAttribution: guidotti commentedI was able to apply manually #13 to the current dev version (2012-May-05).
It works for multiple field collection, but stop working for fields outside a field collection.
I suppose the problem is Null returned by function conditional_fields_flatten_array in case of fields width no #field_parents.
My quick&dirty solution is to change:
controls like this
if (isset($field_parents_key)) {
are now useless, but not a problem.
it seems to work.
Comment #27
xcafebabe CreditAttribution: xcafebabe commented@guidotti, Would be lovely if you can share your patched code. I want to test if is working as well . Thanks in advance :)
Comment #28
guidotti CreditAttribution: guidotti commentedThis is the patch for 7.x-3.x 2012-May-05
There is a problem validating required fields that are not visible according to dependency rules.
Comment #29
xcafebabe CreditAttribution: xcafebabe commentedThank you @guidotti and @droath
Patch from #28 works on dev branch 7.x-3.x 2012-May-05 (commit 0a9f967ffbea277fcd6ecf1ea4ba20da9503fd6c)
Comment #30
John Pitcairn CreditAttribution: John Pitcairn commentedPatch at #28 applies and works as expected, but adds whitespace errors for me:
Comment #31
xcafebabe CreditAttribution: xcafebabe commentedI applied the patch with this command and didn't get errors or warnings.
Comment #32
irowboat CreditAttribution: irowboat commented#31 working where git apply isn't. thanks!
Comment #33
wrd CreditAttribution: wrd commentedWith the latest dev version, I'm now getting:
Anybody have this working on a newer version?
Comment #34
mathes CreditAttribution: mathes commentedwhy always new patches? i would like to see a working patch in the next dev update.
Comment #35
flyingkiki CreditAttribution: flyingkiki commentedcan we has this features in latest dev version or can somebody provide a new patch?
Comment #36
dharmendra singh CreditAttribution: dharmendra singh commentedi also have this issue...multiple group and conditional field not working properly....
Comment #37
naeluh CreditAttribution: naeluh commented@wrd
were you able to get this patch to work ? http://drupal.org/node/1464950#comment-6122020
I actually got the same error as you ?
thanks
Nick
Comment #38
dharmendra singh CreditAttribution: dharmendra singh commentedThanks naeluh, but actually i have drupal 6.2x proublem, sorry to post in wrong place....
Comment #39
doliveros CreditAttribution: doliveros commentedI'm having problems with the patch and the latest dev version, too. Tried to manually patch it up, but there are too many code differences.
Comment #40
joel_osc CreditAttribution: joel_osc commentedI am having the Hunk 7 failed at 444 as well when applying the patch to the latest (July 30) dev version. Any chance of getting a new dev build with the patch included? Or help on fixing the patch would also be appreciated!
Comment #41
joel_osc CreditAttribution: joel_osc commentedHere is a patch file off latest dev using git, cheers.
Comment #42
joel_osc CreditAttribution: joel_osc commentedMay be a misplaced bracket in last patch...welcome to try this one.
Comment #43
naeluh CreditAttribution: naeluh commented@joel_osc
I will try the patch and report back
thanks for your help !
Comment #44
semiaddict CreditAttribution: semiaddict commentedThe patch in #42 works great for me.
Thank you.
Comment #45
doliveros CreditAttribution: doliveros commentedGreat, #42 works great.
Comment #46
drupov CreditAttribution: drupov commentedYep, the patch from #42 is working! Thanks!
Comment #47
jason.fisher CreditAttribution: jason.fisher commented#42 along with the #1 patch http://drupal.org/files/conditional_fields-support_for_markup_field-1786... at http://drupal.org/node/1786232 has allowed conditional fields to work with Commerce Registration and Field Collections here.
Comment #48
alduya CreditAttribution: alduya commentedI tested the patch in #42 and it solves the problem for the conditional fields inside a field collection. But after that the conditional fields for the regular fields on all node types stopped working.
I traced this back to somewhere around line 260 in conditional_fields.module. The patch adds a variable $field_parents_key to point to the fields inside the field collection, but if this is only root: it should not be added.
The workaround I came up with is adding a check for the value of this variable. But this doesn't seem like a really clean solution.
Comment #49
joel_osc CreditAttribution: joel_osc commentedI am seeing a problem with conditional fields outside of field collections as well. I am not sure if it is the same as @alduya - the symptom is that none of the info I type into my dependent fields gets saved. I think @alduya might be on to something with the above code, however when I added it the fields on the form were no longer displayed as conditional - they were all displayed. I think this is a result of the first call to conditional_fields_attach_dependency:
conditional_fields_attach_dependency($form, array('#field_name' => $dependency['dependee']), $field, $dependency['options'], $id);
...where the $field_parents_key argument is ommited and $id is passed in as the field parent.
Comment #50
alduya CreditAttribution: alduya commentedThe problem I have is indeed that the value of the dependent field does not get saved.
I also added the check of my previous post to the code for that attaches the dependent; which fixes the conditional behaviour. But then there came errors from theconditional_fields_evaluate_dependencies which I could not get around.
Are there people who know this module better who can help out here? The patch in #42 solves the issue for conditional fields in field collections, but breaks conditional fields outside field collections.
Comment #51
alduya CreditAttribution: alduya commentedSorry, correction and clarification.
I first only added the check to the code that attaches the dependent (line 278). But that broke the conditional behaviour.
Then I also added the check to the code that attaches the dependee (line 290). This fixes the conditional behaviour, but the validation gives errors.
Comment #52
Anonymous (not verified) CreditAttribution: Anonymous commentedI have applied the patch in #42, and it works for the most part, but it doesn't affect field collections inside a field collection. The Or condition also doesn't seem to be working.
Comment #53
Anonymous (not verified) CreditAttribution: Anonymous commented#42 works with a multiple field collection for me
Comment #54
monsoon CreditAttribution: monsoon commentedIt is possible to get a copy of the module after patch #42 has been applied. Would any one please share the zip file?
I am not skilled to use git.
Thanks
Comment #55
aviddv1 CreditAttribution: aviddv1 commentedHas anyone had any luck applying this patch to the latest version? It doesn't even patch for me.
Comment #56
Opensoft CreditAttribution: Opensoft commentedHas anyone found any solution? We would like to chip in if anyone could solve the issue and provide a patch.
Comment #57
monsoon CreditAttribution: monsoon commentedI found a work around: using field collection and conditional fields modules I am able to hide collection of fields based on dependee field's value.
Comment #58
kaizerking CreditAttribution: kaizerking commenteda field collection is normally attached to a host entity,hence a generic entity support is required
in my case my field collections are attached to profile2.
hence i would need conditions on two entities
1. field collection fields as fields on profile2 and mange dependencies as field collection fields as fields
2. manage dependencies of fields of a field collection item
3.manage dependencies of fields across field collection items i.e irrespective of entity they are attached to, in my case all
So, at the profile2 level the filed list includes
1. all the field collection items as field names (they are fields with respect to profile2)
2. all the fields of all the field collection items
3. any fields directly attached to profile2
Comment #59
aendra CreditAttribution: aendra commentedPatch from #42 applied (albeit with whitespace errors) against the dev commit from July 29, 2012 with hash de8d798ffc3d976f1ad4302b7b0af086e825a26d.
To anyone needing this functionality who is not that familiar with git (note that this will break your site for a minute or so):
0. Put your site into maintenance mode if you're concerned about users getting WSODs (Not that you really should use patched modules on a production site, but that's a discussion for another day).
1. Backup your existing conditional fields directory by moving it into sites/all (I.e., one directory below "modules" -- feel free to create a directory like sites/all/disabled to put it in if you prefer).
$ mv conditional_fields ..
2. Run the following:
$ git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/conditional_fields.git
$ cd conditional_fields
3. Once in the newly-cloned conditional fields directory, checkout the older dev version:
$ git checkout de8d798ffc3d976f1ad4302b7b0af086e825a26d
How did I get that version hash?
git log
shows all commits in the branch.4. Download and apply the patch from #42:
$ wget http://drupal.org/files/conditional_fields_fixed_multiple_field_collection_fields_1464950-42.patch
5. Apply using git:
$ git apply -v conditional_fields_fixed_multiple_field_collection_fields_1464950-42.patch
I haven't really had to checkout an older dev version to get a patch to apply before, figured I'd document the process in case it helps someone!
Comment #60
dagomar CreditAttribution: dagomar commentedThank you Aendrew, your steps work for me.
Comment #61
arosboro CreditAttribution: arosboro commented@jason.fisher (#47), I've been working on Commerce Registration for a client, and that's why I wrote the markup field patch. I'm going to look at the patch in #42 and see about updating it to apply to the latest commit in the repo, so you won't need to follow aendrew's instructions (#59).
Comment #62
arosboro CreditAttribution: arosboro commentedHere's the updated patch, tested it for an event with two registrations in Drupal commerce.
Comment #63
arosboro CreditAttribution: arosboro commentedComment #64
klonosThanx for sharing Andrew ;)
Comment #65
aendra CreditAttribution: aendra commented@arosboro -- Thanks for doing that! I can confirm that it patches cleanly against 7.x-3.x, revision hash ec8fdd9adcf942337e07b66157d159c418923bbb.
Comment #66
kaizerking CreditAttribution: kaizerking commented@ arosboroIts great work and thanks,
still this needs this mentioned at# #58 the
dependent and dependees listing of all the fields of all the field collection items attached to host entity eg:hostEntity - profile2 profile
Comment #67
kenorb CreditAttribution: kenorb commentedFixing the patch file by removing 'a/' and 'b/' to prevent the error (can't find file to patch at input line 5) when using drush with .make file.
Otherwise it works as it should.
Comment #68
artis CreditAttribution: artis commentedI can confirm that this patch applies to 7.x-3.x-dev (2012-Nov-12) and works correctly.
Comment #69
dagomar CreditAttribution: dagomar commented#67 works for me on 2 different installs.
Comment #70
kenorb CreditAttribution: kenorb commentedComment #71
aendra CreditAttribution: aendra commentedI don't know about you folks, but I'm so excited by this most recent status update that I can barely sit still. :)
Comment #72
Anonymous (not verified) CreditAttribution: Anonymous commentedThose who are getting the patch to work, are you setting the dependencies on the content type or the field collection? Even with the patch, the dependencies don't seem to be working when a field collection within a field collection depends on the value of another field. Here's my setup:
I have a field collection called "Main Content Well". Within this field collection, I have an image field, and another field collection called "Content Section" (the content manager can add as many as he wants of these). This content section has a select list, and different fields should appear/disappear based on the selected option. For example, if from the select list they select "Youtube video", all of the field except for the youtube video field should disappear. This works fine for single fields, but for field collections, they won't hide. Is this what this patch is fixing? Or is this another issue?
Comment #73
shapp CreditAttribution: shapp commentedHas somebody already applied the patch successfully? I'm getting an error.
Comment #74
kenorb CreditAttribution: kenorb commentedTry removing a/ and /b in the 1st line.
Comment #75
smitherrama CreditAttribution: smitherrama commentedRemoved the 'a/' and 'b/', but I am getting the same error.
Comment #76
shapp CreditAttribution: shapp commentedAlso tried it without the a/ and b/ but same problem here as #75
Comment #77
nkLiVF CreditAttribution: nkLiVF commentedtry:
patch -p0 < file.patch
?
Comment #78
funkatron101 CreditAttribution: funkatron101 commentedApplied the patch from #67. Re-uploaded the module. Saw no warnings, but also saw no change. What am I missing?
Comment #79
drupov CreditAttribution: drupov commented#72 - your explanation is confusing, maybe you can provide a screeenshot?
Anyway I just tested the #67-patch with field collections within field collections and everything works just fine.
Kudos to guys in the issue queue, that made it work. It's been a long fight.
Comment #80
aerrasti CreditAttribution: aerrasti commentedThank you for your explanation aendrew :) this thread solve my problems
Comment #81
calmher CreditAttribution: calmher commentedThank you so much for that very helpful fix #67 worked very well for me. Just re-uploading a cleaner patch, taking out the 'trailing whitespaces' error.
Kindly review if this works okay.
Comment #82
rbosscher CreditAttribution: rbosscher commented#81 patch is actually the only patch that was working for me.
However nested field collections with a dependency does still not seem to work on my site.
Is it in the scope of this patch or should I create a new issue?
Comment #83
sk2013 CreditAttribution: sk2013 commentedwe tried #81. it doesn't work.
we applied the patch directly. without using git.
Any other possibilities is there?
Comment #84
rbosscher CreditAttribution: rbosscher commentedMaybe it helps maybe not.
My steps were:
Uninstall module
Delete folder /sites/all/modules/conditional_fields
Download latest 7.x-3.x-dev
Install it
(I used patch manager)
Add the patch
Applied the patch
Comment #85
calmher CreditAttribution: calmher commented@in1ventures, could you try clearing your cache and see if that helps?
@rbosscher, re nested field collection, perhaps it will be cleaner to create a new issue for this?
Comment #86
sk2013 CreditAttribution: sk2013 commentedIt worked for first field collection. But it is not working with nested field collection fields.
Any other possible solutions is there?please give us.
Comment #87
opensoft1 CreditAttribution: opensoft1 commentedComment #88
rbosscher CreditAttribution: rbosscher commentedI've done a bit of searching.
Seems that nesting field collections issue is arround a while in 6.x versions as wel in 7.x
For: 7.x
The nested field collections are addressed in #1683136: Multiple Field Collections not displaying properly when using Conditional Fields but is pointing to this issue.
The issue starter of #1886628: How do i create nested dependent fields? is probably also refering to nesting field collections.
Not sure that this issue is about nesting fields, but could be a solution #1398482: you can specify parent relationships
As soon as I have some time I'll have a look at that one.
@opensoft1
On the module name field, did you filed it in as the module machine name?: "conditional_fields"
Your patch is being applied at sites/all/modules/contrib/conditional_fields while it probably should be applied on sites/all/modules/conditional_fields
Comment #89
opensoft1 CreditAttribution: opensoft1 commentedwe tried #88.
It doesn't work to us.
our requirement is
field collection 1
---field1
---field2
---field collection2
--- field1(checkbox)
--- field collection3
if clicked field1 of field collection2,field collection3 should be show otherwise it should be hide. This is our requirements. How can we achieve this through conditional fields?.
Is there any possible solution? Please guide us.
Comment #90
opensoft1 CreditAttribution: opensoft1 commentedhi..... Is there any updates for this issue? pls kindly request you to give some solution for this issue
Comment #91
dafederHaving the same issue: I can have a field collection dependent on another field in a content type. But if I try to create the same thing within another field collection, nothing happens; the dependent field collection is visible always and changing the dependee field seems to do nothing. Interestingly, if I have both of these situations on a form (a field collection dependent on a top-level field, and a nested field collection dependent on a field in the top-level field collection), both work as expected. Perhaps the required JS simply isn't being loaded when the form's only dependency is in a nested field collection. I don't see any errors in my browser's console.
Comment #92
kenorb CreditAttribution: kenorb commentedAny progress on committing the #81 patch?
Comment #93
bigjim CreditAttribution: bigjim commentedPatch from #81 applied cleanly for me using git apply against the 2012-Nov-12 7.x-3.x-dev snapshot
Comment #94
jwilson3Patch in #81; RTBC++ Thanks for all the hard work on this issue!
Regarding #86, #89, and #91 (supporting nested field collections) -- the patch is already pretty big and hard to review, so I suggest dividing it out into a second followup issue, so that it doesn't block this patch from forward progress and making it into the code-base as is.
Comment #95
MatthijsI've created a patch for cross-entity dependees, see #1995516: Cross entity (Inline Entity form and Field collection) dependees. It's probably far from perfect, but it might be a good start!
Comment #96
dafeder#81 worked for me for non-nested collections.
Comment #97
richardbyy CreditAttribution: richardbyy commentedHi, this version works fine with Field collection modules, and other modules, without bug when adding new field collection entries.
Comment #98
chris.jichen CreditAttribution: chris.jichen commentedI just tested on 'required' feature on field collection. It works on the front end (shows the asterisk * ) but It doesn't actually validate on the form submit.
The 'optional' feature doesn't work either. Correct me if i am wrong.
Thanks
Comment #99
mahyarsbt CreditAttribution: mahyarsbt commentedi test #97 in admin form but not work for me. i am using "conditional fields" for "profile 2" with "field collection".
i created two field collection with many fields inside and add this fields in profile and can create dependencies but when change radio box not works "hide/show".
please help me how can i use field set in conditional fields module.
i searched and find many issues about this problem. but not found any solution or patch.
any body can help?
thanks
Comment #100
MO-2 CreditAttribution: MO-2 commentedSolving two issues with 2 patches
Issue #1 - This issue - Conditional Fields not working well with multi-value field collections.
Issue #2 - Nested field collections not responding as dependents on show/hide options (maybe others, but not tested)
To solve:
I combined #81 above with this other patch that solves for nested field collections.
Outcome:
It seems stable and working. I've attached the multi-patched version here. All you need to do is replace the .module file in the current dev release.
UPDATE
Please help roll this dual patch to a release: https://drupal.org/node/2088101
Comment #101
jonhattan+1 to jwilson3 words in #94:
#81 is the latest working patch.
Patch in #41 introduces an extra + at line 294. None of the subsequent patches fixes it:
Patch attached is #81 with this fix and a minor indentation fix. See interdiff.
I'm marking RTBC since #81 worked fine.
Comment #102
divined CreditAttribution: divined commented81,100 and 101:
Notice: Undefined index: #field_parents in conditional_fields_element_after_build() (line 278 in conditional_fields.module).
Warning: Invalid argument supplied for foreach() in conditional_fields_flatten_array() (line 2008 in conditional_fields.module).
Comment #103
divined CreditAttribution: divined commentedAnd states not aplied for field.
Comment #104
divined CreditAttribution: divined commentedUpdate:
States are aplied for all field in field collection, but i can create node without fill this fields.
Empty validator not working.
Comment #105
jonhattan#102
Notice: Undefined index: #field_parents in conditional_fields_element_after_build() (line 278 in conditional_fields.module).
@divined what field types are you using in your field collection?
Comment #106
divined CreditAttribution: divined commentedi have 3 fields:
1. selectlist (int) with 2 choices - "type of deal" (sell or rent)
2. field_collection with 2 subfields - "sell price"
- textfield (not required by default) - "price"
- selectlist (required by default) - "currency"
3. field_collection with 3 subfields - "rent price"
- textfield (not_required by default) - "price"
- selectlist (required by default) - "currency"
- selectlist (required by default) - "period of rent"
i have 4 dependencies rules:
1. "rent price" is visible when "type of deal" has value "2".
2. "rent price" is required when "type of deal" has value "2".
--
3. "sell price" is visible when "type of deal" has value "1".
4. "sell price" is required when "type of deal" has value "1".
---
Visible rule work as well.
Required rule mark not_required fields as required, but system not validate empty values
Required rule mark required fields with double asterisk
Comment #107
Jody LynnThe patch in #101 is working well for me. Thank you all.
Comment #108
jonhattan@divined the problem you describe in #106 is not related to this issue. This issue is about multivalued field_collection fields.
Your setup fails in the same way with or without the patch here. You may open a new issue for the bugs with required fields within field_collection.
I'm unable to reproduce #105, thus moving back to needs review.
Comment #108.0
jonhattanFixed spelling
Comment #109
yannickooThe patch from #101 does not work anymore and re-rolling is not funny but finally I did it :) I also uploaded a patch without all the whitespaces so that it is cleaner to see what the patch actually does.
BTW the patch works fine, thank you guys for the work!
Comment #110
yannickooJust hid old files because it confuses people who just want to apply the patch.
Comment #111
kumkum29 CreditAttribution: kumkum29 commentedHello,
i get an error when i apply this patch (109) with git:
Thanks for your help.
Comment #112
jay.lee.bio CreditAttribution: jay.lee.bio commented#109 worked for me. Thank you.
Comment #113
yannickooI could apply the patch without any errors:
Comment #114
nevergone CreditAttribution: nevergone commentedPatch rerolled (commit: 23eac31) and interdiff added.
Comment #115
yannickooWhy did you re-roll the patch, the patch from #109 applies cleanly:
Comment #116
nevergone CreditAttribution: nevergone commented@yannickoo:
Ok, no-test patch is failed:
Comment #117
yannickooThe "no-test" patch was just the patch without whitespaces so that people can better see what the patch actually does.
Comment #118
kumkum29 CreditAttribution: kumkum29 commentedHello yannickoo,
After several attempts to patch I always get an error:
I also tried to patch the module at hand but I also have an error in the code.
Can you provide us the file patched?
Thank you for your help.
Comment #119
danielphenry CreditAttribution: danielphenry commentedpatch in 109 does not apply. using latest 7.x-3.x dev. says segment #6 (the largest section) doesn't apply.
Comment #120
danielphenry CreditAttribution: danielphenry commentedSo I got the patch in 109 to apply when I checked out the repo directly then applied the patch via git. So it appears it does still apply. It also works. Can this get checked in?
Comment #121
loze CreditAttribution: loze commentedconfirming patch in 109 works. thanks!
Comment #122
jeffglenn CreditAttribution: jeffglenn commentedThe patch in 109 works in Field Collections but breaks other Conditional Fields on my content type. When I go to save content in a Conditional Field that is not within a Field Collection the content is not saved. When I revert the module back to the original state (before the patch), everything works fine but of course I can't have Conditional Fields in Field Collections.
Anyone else run into this?
Comment #123
rudy.barrett CreditAttribution: rudy.barrett commentedI get the error with patch #109 using Conditional Fields 7.x-3.0-alpha1 inside of Field Collections:
Hunk #1 succeeded at 272 (offset 13 lines).
Hunk #2 succeeded at 289 (offset 13 lines).
Hunk #3 succeeded at 368 (offset 13 lines).
Hunk #4 succeeded at 399 (offset 13 lines).
Hunk #5 succeeded at 414 (offset 13 lines).
Hunk #6 FAILED at 443.
Hunk #7 succeeded at 1001 (offset 15 lines).
Hunk #8 succeeded at 1984 (offset 9 lines).
jeffglenn, I continue to be unable to use conditional fields with multiple entries inside of a field collection
Comment #124
Jody LynnHere's a fun one:
If you have a multiple field collection inside of another (multiple) field collection, with the patch in 109, the inner field collections after the first one does not have working conditional fields.
So if you have field collection foo1 which contains collections bar1 and bar2, and you have field collection foo2 which contains collections bar3 and bar4, the conditional fields work properly in bar1 and bar 3 but not in bar2 or bar4...
Comment #125
danielphenry CreditAttribution: danielphenry commentedrudongg: you need to pull the repo from git and then patch it. It will not work on any of the release branches.
Jody Lynn: while this indicates their are a few more bugs to fix this patch is a clear step forward I think it's important this patch gets put in asap. Then a new issue can be opened for that more specific case.
Comment #126
GBain22 CreditAttribution: GBain22 commentedI'm getting the same issues as rudongg - Jody Lynn - how can you do that if you're not using Git? I simply downloaded the patch and in SSH I applied "patch -p1 mypatchfile.patch" and resulted in the Hunk #6 FAILED at 443.
Is there a way around this if you're not using git?
Comment #127
rudy.barrett CreditAttribution: rudy.barrett commentedThanks danielson, the patch applied cleanly. For others, here is the workflow:
1. git clone --branch 7.x-3.x http://git.drupal.org/project/conditional_fields.git
2. wget https://drupal.org/files/issues/conditional_fields-fixed_multiple_field_...
3. git apply -v conditional_fields-fixed_multiple_field_collection_fields-1464950-109.patch
response:
Checking patch conditional_fields.module...
Applied patch conditional_fields.module cleanly.
Thanks again for the patch!
Comment #128
jeffglenn CreditAttribution: jeffglenn commentedI can confirm that pulling branch 7.x-3.x from git then using the patch works. I can now have Conditional Fields inside and outside of Field Collections and all works and content is saved.
Thanks rudongg for detailing!
Comment #129
capellicThanks, rudongg! I have provided the same steps that are in #127, but wrapped them in the "code" tag as as not to have the URL truncated and added the change directory as a step. Be sure you are in the target directory (sites/all/modules/contrib) before running the git clone command. If you don't have wget, go to the URL in the browser, download and then put the patch file in your conditional_fields folder -- you may have to remove the ".txt" at the end of the file name.
Patch applies cleanly, would love to see this in Dev! Thanks all!
Comment #130
capellicStarting to see these notices/warnings after applying patch:
Comment #131
gmario CreditAttribution: gmario commentedHi,
I have applied the patch #109 with no errors. But this patch have introduced a bug in my form.
In my form (to add a node) I have a checkbox that controls if a collection fields must be visible or not. The collection fields is a multivalued field and into it there is a combo box that controls if a textbox is visible or not. The patch solved the dependencies problem into the field collection in case of more then one value (combo box - textbox), but now, when the form is submitted, the node created have the field collection always empty.
There is anybody that can point my on the right direction on where to check, in the trying to solved this bug?
update: every field collection present in content type and that is dependent from another field's state, it is not being saved in the node being created.
I have a content type, named A, with a field collection, named fc1. the fc1 field is dependent from another field (checkbox) named cb1. When cb1 is checked fc1 become enabled so that it is possible to fill its fields.
When the form it is submitted, the node is created but with a empty fb1 field.
does anyone can help?
tnks a lot
gmario
Comment #132
gmario CreditAttribution: gmario commentedHi,
after a bit of debugging, i've found the reason of misbehaviour explained in the previous post. The patch of comment #109 inserts a bug
the code in conditional_fields.module before to apply the patch is
after applied the patch
the function call _conditional_fields_element_add_property is put outside the brach "else" of "if" statement at row 497.
in attachment the new patch.
a si biri
gmario
Comment #133
dahousecat CreditAttribution: dahousecat commentedPatch #132 worked for me but I had to apply it to latest dev release (7.x-3.x-dev 2014-Jan-06) to get it to work.
Comment #134
pedromvpg CreditAttribution: pedromvpg commented132: conditional_fields-fixed_multiple_field_collection_fields-1464950-132.patch queued for re-testing.
Comment #135
pianomansam CreditAttribution: pianomansam commentedI can confirm that patch in #132 works as intended!
Comment #136
balsama+1 for patch in #132. Applied cleanly against dev version from 06JAN2014 and works as expected.
Comment #137
sketman CreditAttribution: sketman commentedThe same here, patch in #132 worked correctly.
Comment #138
Lukas von BlarerWorks great. Thanks!
Comment #139
khasmir CreditAttribution: khasmir commentedPatch #132 apply it to latest dev release (7.x-3.x-dev 2014-Jan-06) and starting to see these notices/warnings after applying patch:
Does anyone can help?
Thanks
Comment #140
leewillis77 CreditAttribution: leewillis77 commentedHi,
We've applied the patch in #132 but are experiencing the warnings originally reported in #102, specifically we're getting:
The field that's throwing the error is a views reference field on the main node. It appears that this field does not have #field_parents set at all. We don't have any dependencies set involving this field, so not sure if conditional fields needs to process the field.
I suspect the bug could be worked around in our case by moving the
$field_parents_key = conditional_fields_flatten_array($field['#field_parents']);
inside the
if (isset($dependencies['dependents'][$field['#field_name']])) {
and
if (isset($dependencies['dependees'][$field['#field_name']])) {
blocks, but not sure if that's the right fix or not.
Comment #141
leewillis77 CreditAttribution: leewillis77 commentedSetting back to needs work, as these warnings aren't thrown without the patch. Happy to provide further info, or test alternative approaches / patches.
Comment #142
moertle CreditAttribution: moertle commentedAfter applying the patch #132 I get a PHP-Error:
Error: syntax error, unexpected '}' .... in conditional_fields\conditional_fields.module on line 670
After removing the closing brace (
}
at line 643 (nearby$has_states = TRUE;
), it seems to work as expected.What did I wrong?
UPDATE:
my quickfix was wrong, is it a good idea to use the DEV Version for D7? The patch seems to be applied there
UPDATE II:
well, I'm sorry, just realized now that the patch IS for the DEV Version, everything ok. Thanks for the patch, it workes fine.
Comment #143
guillaumev CreditAttribution: guillaumev commentedThe patch is working for me. Thanks !
Comment #144
capellicWorking well for me, thanks to all who worked on this.
Comment #145
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am getting the same errors as in 139.
https://www.drupal.org/node/1464950#comment-8650803
Comment #146
jamiehollernPatch in 132 works for me, however I can only add a single dependency to any collection as only one works.
Edit to say that I'm also seeing the error notices reported in 139 and 140.
Comment #147
andy.alexander CreditAttribution: andy.alexander commentedI can confirm, patch 132 works for me.
Comment #148
dnlmzw CreditAttribution: dnlmzw commentedI'm experiencing the same as #146. Patch works and I can now use it together with Field Collections, but Conditional Fields only works on the first collection in a Field Collection when the "Number of values" is set to "Unlimited".
So - In reality the issue that was initially described still persists. Has anyone found a way around this issue?
Comment #149
ocastle CreditAttribution: ocastle commentedIt also works only on the first field collection item for me too. Its for both "Unlimited" and anything >1. (Checked both alpha and dev release)
I've also got the setup that a field collection within this field collection should only be visible when a select box is a certain value, but this field doesn't get hidden. -- This has been patched here: https://www.drupal.org/node/1648128
Going to be looking mainly for a solution to the multiple field collection item problem - I could probably use a different setup on the child field collection for now.
Comment #151
Rajab Natshah CreditAttribution: Rajab Natshah commentedPart working .. #13 droath's patch is working for me for the --dev.
( No It's not working )!!!!!
Comment #152
ocastle CreditAttribution: ocastle commentedPatch #132 worked for me against the Dev Release and fixed all field collection items (Unlimited and Limited > 1).
Comment #153
Rajab Natshah CreditAttribution: Rajab Natshah commentedI do have this patch #153 working from #100 ..
Comment #154
Rajab Natshah CreditAttribution: Rajab Natshah commentedComment #155
Rajab Natshah CreditAttribution: Rajab Natshah commentedA better patch #155 To have the fix in nested entity reference and inline entity forms
Comment #157
shawnrosspeters CreditAttribution: shawnrosspeters commentedPatch #155 seems to almost be there, but couple quick questions:
I just want to be sure we're using the most stable combination as patching might be necessary sometimes but always increases the chances of stuff breaking when trying to perform updates to the site. Thanks all!
Comment #158
Rajab Natshah CreditAttribution: Rajab Natshah commentedPatch #153 works in a perfect way.
But if you have a nested entity reference inside the field collection.. with Inline entity form you will run into some problems with conditional fields ( This is when patch #155 do the work ).
I suggest patch #153 can work if the patch going to make it to the Module. Note .. It's the attachment of MO's comment #100. It took me long time testing all this list of patches.
Rewarding :)
Comment #159
cobaltje CreditAttribution: cobaltje commentedIs there a possibility that this come in a new module update?
I don't have the possibilitys do execute this patch :( I need a module update for this.
Comment #160
shawnrosspeters CreditAttribution: shawnrosspeters commentedHas anyone had success in the following setup because I've tried all patches available and nothing works.
Page Type
- Field Collection (unlimited)
-- Select List (Dependee Trigger)
-- Field Collection 1 (limit 1) (Dependent 1)
-- Field Collection 2 (limit 1) (Dependent 2)
-- Field Collection 3 (limit 1) (Dependent 3)
The idea here is that when you add a new "Page", you can add an unlimited number of rows and each row allows you to select from the trigger field and thereby making the dependent selected visible.
There's been a LOT of work to get Conditional Fields and Field Collection to play nice but I'm just wondering if something's missing here.
Thanks everyone!
Comment #163
Rajab Natshah CreditAttribution: Rajab Natshah commentedOk .. Seems that we still need more fixing for this issue to work with other modules too.
It's had been a long time that this issue is not fixed yet.
Comment #164
dnlmzw CreditAttribution: dnlmzw commentedSame as #152.
Patch 155 works for me after I implemented the 7.x-3.x-dev version. (Updating from "7.x-3.0-alpha1")
This was my first time applying a patch. I struggled a bit with understanding how to make it work and thought I'd share how I did (MacOSX):
Download and backup
> Make a copy of your original "conditional_fields" folder (Located in "/sites/all/modules/conditional_fields")
Attention: The copy cannot be located in the "modules"-folder. It will conflict with the new version, even when named differently.
This might cause problems for some people, but worked for me updating from "7.x-3.0-alpha1".
Navigating using the Terminal
Applying the patch
This solved the problem for me. I have not yet experienced any side-effects, but can't promise this will work for everyone.
Comment #165
jyraya CreditAttribution: jyraya commentedThe patch #155 does not work well in my context.
I applied it on the module version 7.x-3.0-alpha1 with Field collection 7.x-1.0-beta7 and Entity API 7.x-1.5.
I got the same exception at the Simple test met while testing automatically the patch; I.E.:
Notice: Undefined index: field_video in conditional_fields_evaluate_dependencies() (line 1026 of C:\xampp183\htdocs\...\sites\all\modules\contrib\conditional_fields\conditional_fields.module).
Warning: Invalid argument supplied for foreach() in conditional_fields_evaluate_dependencies() (line 1029 of C:\xampp183\htdocs\...\sites\all\modules\contrib\conditional_fields\conditional_fields.module).
Notice: Undefined index: field_video in conditional_fields_evaluate_dependencies() (line 1050 of C:\xampp183\htdocs\...\sites\all\modules\contrib\conditional_fields\conditional_fields.module).
These messages, I got them for each dependee fields defined in my field collection and for each contributed field collection item.
I tried after with the latest dev version and I got the same result.
My case is the following:
Field Collection item
The field collection is unlimited.
I started to debug the code and discovered that this:
We retrieve "dependees" of a field by using the field name value but $form['#conditional_fields'] has the following structure:
What is the logic behind "root:field_collection_field_name:und:1:"?
What is the key if I have a field collection inside a field collection?
Comment #167
jlongbottom CreditAttribution: jlongbottom commented#132 worked for me against latest dev version
Comment #168
deepakaryan1988#155 worked for me. I used latest dev version and applied this patch with field collection 7.x-1.0-beta7.
Comment #169
nimoatwoodway#132 works for me against latest dev version. Many thanks!
Comment #171
SocialNicheGuru CreditAttribution: SocialNicheGuru commented155 applies to the Jan/14 dev version
It has to be the first patch applied to the module if there are other patches to be applied.
Update 1:
I am getting this too::
https://www.drupal.org/node/1464950#comment-9177749
I have a field_collection
within the field collection are two other field collections being controlled by a list field.
There is an issue with nesting field collections and using this module
Comment #175
asif_khan CreditAttribution: asif_khan commentedpatch 153 works for me with this field_attach_form() overwrites #entity_type and #bundle to field collection
thanks
myset up is
content type
----fields
----field-collection
---- --------fields
---- --------field collection
-- ------ --------field a--select list
-- ------ --------field b-- text--depends on field a's specific value
-- ------ --------field c--text--depends on field a's specific value
Comment #180
edmund518 CreditAttribution: edmund518 commentedWait for updates, apply 155, but it fails.
patching file conditional_fields.module
Hunk #1 succeeded at 213 (offset 13 lines).
Hunk #2 succeeded at 271 (offset 13 lines).
Hunk #3 FAILED at 288.
Hunk #4 FAILED at 305.
Hunk #5 FAILED at 384.
Hunk #6 FAILED at 415.
Hunk #7 FAILED at 430.
Hunk #8 succeeded at 461 (offset 15 lines).
Hunk #9 succeeded at 475 (offset 15 lines).
Hunk #10 succeeded at 568 (offset 15 lines).
Hunk #11 succeeded at 661 (offset 17 lines).
Hunk #12 FAILED at 1210.
Hunk #13 FAILED at 1989.
Hunk #14 succeeded at 2023 with fuzz 2 (offset 29 lines).
7 out of 14 hunks FAILED -- saving rejects to file conditional_fields.module.rej
Comment #183
ex0r CreditAttribution: ex0r commentedStill no fix to this ? There are bunches of patches released and none of them seem to work >.<
Comment #184
Marfio CreditAttribution: Marfio commented#153 working form me
Field Collection - 7.x-1.0-beta8
Conditional Fields - 7.x-3.0-alpha1
Comment #185
steven_ght CreditAttribution: steven_ght commentedHey Marfio,
Could you tell us how you applied the patch ?
I'm running the same versions as you (Field Collection and Conditional Fields) but the patch doesn't apply on the code.
I tried to apply it with Drush (make) but the build fails (patch doesn't apply error) so I tried to clone the module's repository and apply the patch manually but errors keep on being thrown.
Thanks !
EDIT : The problem started to occure anew while upgrading core from (Pressflow) 7.32 to 7.34
Comment #186
aarefjev CreditAttribution: aarefjev commentedSteven_ght:
same problem here - just installed patch manually, still not working. Pain in the ass really....
Versions used :
Field Collection - 7.x-1.0-beta8
Conditional Fields - 7.x-3.0-alpha1
Drupal Core: 7.32
Comment #187
steven_ght CreditAttribution: steven_ght commentedaarefjev:
We've tried several things (core downgrade, modules downgrades etc etc ...) ... We've come up with a working codebase, it seems that Asset is the reason of the problem. After upgrading it to the latest available version (not the latest release) by cloning its repository, our problem seems solved.
EDIT : We were using the 1.0-beta4 version
Comment #188
gmaxime CreditAttribution: gmaxime commentedI got it working !
Conditional Fields 7.x-3.0-alpha1+12-dev
Field collection 7.x-1.0-beta8
Patch 153 ;)
Thanks RajabNatshah !
Comment #189
odegard CreditAttribution: odegard commentedCan confirm that Patch in #153 works. I installed latest dev (2015 jan 06) and used it successfully with multifield.
Comment #190
amitgoyal CreditAttribution: amitgoyal commentedRe-roll of #155 which applies cleanly and fixes following issues,
- #155 leaves extra '+' in the start of the line.
- #155 causes duplicate hook_js_alter().
Comment #192
amitgoyal CreditAttribution: amitgoyal commentedRecreated the #190 patch as there was path issue w.r.t. creation of patch.
Comment #194
mrvinch CreditAttribution: mrvinch commented#192 Works like a charm. Thank you for the work amitgoyal and all others above who contributed.
My case was a dependent field collection that was nested inside another collection. The triger was a select list in the parent collection.
Using 7.x-3.x-dev 2014-Jan-06
Comment #195
paulmartin84 CreditAttribution: paulmartin84 commentedThe hiding and showing of fields etc. was working correctly for me, but after saving the node I was experiencing the same issues mentioned in #165 and #171. This seems to fix that issue.
Comment #196
goblin29 CreditAttribution: goblin29 commented#195 works for me. Thanks paul I am using
Conditional Fields : 7.x-3.0-alpha1
Field Collection: 7.x-1.0-beta8
Comment #197
balsamaTest #195
Comment #198
sosyuki CreditAttribution: sosyuki commentedThanks #195 It`s work.
Comment #199
Ritch CreditAttribution: Ritch commentedConditional Fields : 7.x-3.0-alpha1+15-dev
Field Collection : 7.x-1.0-beta8
Thank's #195 works for me.
Comment #201
michielkenis CreditAttribution: michielkenis commentedConditional Fields: 7.x-3.0-alpha1
Field collection: 7.x-1.0-beta8
Patch #195 is working too
Comment #202
cassien CreditAttribution: cassien commentedConditional Fields: 7.x-3.0-alpha1
Field collection: 7.x-1.0-beta8
Patch #195 is passing but is not working
I have that fatal error :
Fatal error: Call to undefined function conditional_fields_flatten_array() in C:\wamp\www\ryser\sites\all\modules\conditional_fields\conditional_fields.module on line 278
Any idea ?
Comment #203
clint.beacock CreditAttribution: clint.beacock commentedConditional Fields: 7.x-3.0-alpha1
Field collection: 7.x-1.0-beta8
Patch #195 is working for me too, but I do get the following warnings come up:
Notice: Undefined index: #field_parents in conditional_fields_element_after_build() (line 278 of /vagrant/www/niagara-drupal/sites/all/modules/contrib/conditional_fields/conditional_fields.module).
Warning: Invalid argument supplied for foreach() in conditional_fields_flatten_array() (line 2022 of /vagrant/www/niagara-drupal/sites/all/modules/contrib/conditional_fields/conditional_fields.module).
Comment #204
csedax90 CreditAttribution: csedax90 commented#195 with Field collection 7.x-1.0-beta8+6-dev is working correctly... no errors or warnings
Comment #205
Pryrios CreditAttribution: Pryrios commented#195 also works for me.
Field Collection: 7.x-1.0-beta8
Conditional Fields: 7.x-3.0-alpha1
Comment #206
kenorb CreditAttribution: kenorb commentedComment #207
kenorb CreditAttribution: kenorb commentedRe-applying patch against dev, the last one wasn't applying cleanly anymore, therefore this patch needs to be re-tested.
Comment #209
jlbellido#207 works well for :
- Contional fields : 7.x-3.0-alpha1+15-dev (Current dev version)
- Field collection : 7.x-1.0-beta8
Thanks a lot for your work in this issue!
This should be a RTBC again?
Comment #210
kenorb CreditAttribution: kenorb commentedComment #211
MustangGB CreditAttribution: MustangGB commentedRTBC from me too.
Comment #212
Blanca.Esqueda CreditAttribution: Blanca.Esqueda commentedHi,
patch on #207 works for me... but I had to do some updates to the patch:
Line 29 has double ++
- unset($behaviors[CONDITIONAL_FIELDS_FIELD_EDIT_RESET_UNTRIGGERED]);
- $behavior($form, $form_state, $dependent, $dependent_info);
By
- // Custom behaviors are callbacks.
- if (function_exists($$behavior)) {
- $$behavior($form, $form_state, $dependent, $dependent_info);
- }
Comment #213
likewhoa CreditAttribution: likewhoa commented@Blanca care to re-roll patch?
Comment #214
mmartinov CreditAttribution: mmartinov at NDP commentedAs stated in #209, the patch from #207 applies cleanly on conditional_fields-7.x-3.0-alpha1+15-dev which is the current dev version.
I don't think a re-roll is needed.
Comment #216
stefan.r CreditAttribution: stefan.r commentedApplies against HEAD so re-roll should not be needed. Queuing another test to confirm.
Comment #217
likewhoa CreditAttribution: likewhoa commented@mmartinov @stefan.r sure it applies cleanly but @Blanca suggest it needs works and seeing how she saw that it had an extra '+' and a couple of others things this is why I requested a re-roll.
Comment #218
stefan.r CreditAttribution: stefan.r commentedThose changes refer to code that is not in dev anymore so I think those may just have been the steps needed to apply it to an older version.
Anyway, a reroll is attached just in case.
Comment #219
stefan.r CreditAttribution: stefan.r commentedHmm, that double + definitely didn't belong there though
Comment #220
Blanca.Esqueda CreditAttribution: Blanca.Esqueda commentedThe version of conditional fields that I'm using is: "7.x-3.0-alpha1"
Sorry I didn't add the note before. I guess I needed to do some changes because I have "7.x-3.0-alpha1" instead of "7.x-3.0-alpha1+15-dev".
As commented the patch suggested is working.
Comment #221
dramblys CreditAttribution: dramblys commentedhey everyone!
I'm using '7.x-3.0-alpha1' of Conditional fields, tried to apply patches above (..219, and #207 with #212 changes). But, for some reason, it either says error on 414 line (or smth like this for 219 patch. my guess it's because i'm not using the "dev" version) or it says 0 changes (for edited #207 patch).
Could anyone advise. I'm pretty new to whole patching thing, but it seems I haven't done any mistakes in the process.
Also I'd like to add, that the logic of condition works in my case, but the JS (hide/show) in additional (second, third and so on) field collections is not working.
And thank you in advance for your replies.
Comment #222
Pryrios CreditAttribution: Pryrios commentedThe pacth is applied to the last dev version (7.x-3.0-alpha1+15-dev) which is different from yours. Look at comment in #212 which has the same case as you (7.x-3.0-alpha1) for correcting your issues.
Basically, you can either download the patch in #207 and change it according to #212 or download version "7.x-3.0-alpha1+15-dev" and apply the patch "as is" in #207.
Comment #223
MustangGB CreditAttribution: MustangGB commented#219 is just a re-roll of #207, so setting back to RTBC.
Comment #226
likewhoa CreditAttribution: likewhoa commented@MustangGB the re-roll was intentional, see comment #212 for details on why this was re-rolled. Now we need another re-roll to fix the patch failure
Comment #227
ivanatrix CreditAttribution: ivanatrix commentedPatch #207 applied successfully against latest 7.x-3.0-alpha1+16-dev. Pretty much solved my problem. Still don't understand why re-roll is needed.
Comment #228
zestagio CreditAttribution: zestagio commentedPatch #207 no ok for me. Effects "Fade in/Fade out" and "Slide down/Slide up" not working for field collections.
Comment #229
zestagio CreditAttribution: zestagio commentedCode style fixes
Comment #230
zestagio CreditAttribution: zestagio commentedComment #231
stefan.r CreditAttribution: stefan.r commentedplease can you post an interdiff with 219 as well, for reference?
Comment #232
zestagio CreditAttribution: zestagio commentedMain differents are:
this changes are required, because on ajax updation of the field collection (add or remove field item), we must update settings, because html IDs updating on each ajax request:
Comment #233
funkeyrandy CreditAttribution: funkeyrandy commentedi cant seem to apply #229 to latest dev...any help?
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 472:
Comment #235
zestagio CreditAttribution: zestagio commentedOk for me
Comment #236
gjones CreditAttribution: gjones commentedHunk #4 FAILED at 386
Comment #240
madelyncruz CreditAttribution: madelyncruz commented#195 patch works. Thank you.
Comment #241
bpadaria CreditAttribution: bpadaria commented#195 worked for me as well.
Thanks.
Comment #242
Solidus_BR CreditAttribution: Solidus_BR commented#195 is working very well. It solved my problem! Thanks a lot!
Comment #243
kenorb CreditAttribution: kenorb commentedComment #244
njbarrett CreditAttribution: njbarrett as a volunteer commented#195 doesn't seem to apply on the latest dev anymore. I used #229 and that is working.
Comment #246
tengokui downloaded latest dev version but #229 patch is not working... it will trigger php error for bad } location
UPDATE: Tried today and worked... i think i did a bad patch before
Comment #247
TravisJohnston CreditAttribution: TravisJohnston commentedThanks a lot! I am using Conditional Fields with Commerce Registration and there are often times more than one registration form on a page, and only the first registration form was adhering to the conditional rules while all additional forms just showed all fields without hiding them by default. #195 worked for me with the latest dev.
Comment #248
joelstein CreditAttribution: joelstein commented#195 worked for me with latest DEV. Also needed this for Commerce Registration. Thanks!
Comment #249
letuptit CreditAttribution: letuptit commented#195 worked for me. very good. Thank you very much.
Comment #250
MmMnRr CreditAttribution: MmMnRr commented#195 worked for me.
Versions:
Field Collection - 7.x-1.0-beta8
Conditional Fields - 7.x-3.0-alpha1
I had to use the older Conditional Fields 7.x-3.0-alpha1 version instead of the latest 7.x-3.0-alpha2 version.
Some errors appear when applying the patch from #195 to the latest version:
Comment #251
tengokuthanks @MmMnRr, using drush.make the #195 patch and Conditional Fields 7.x-3.0-alpha1 applied succesfully with no errors and is working.
latest version of conditional fields 3.0-alpha2 still has the problem, and #195 and #229 patch doesn't work.
Comment #252
hanoiiFor me, #229 applies fine on both dev and alpha2 and in both I see it does solve the problem. For the ones that don't, maybe give a bit of an example of their use case. Might be nice to create a feature module with the CTs and FCs involved that could help narrow this down. But it is a much needed fix.
Comment #253
ronaldmulero CreditAttribution: ronaldmulero for edX commentedI also confirm that patch #229 works fine on both dev and alpha2 and solves this problem. Thank you zestagio!
Comment #254
tengokui tried the patch #229 again on alpha2 and now works (my bad sorry).. thanks!!!... is there a reason for this not to be merged?
Comment #255
francoisleralle CreditAttribution: francoisleralle as a volunteer commentedI confirm patch #229 works fine on alpha2
Comment #256
Arne Slabbinck CreditAttribution: Arne Slabbinck commentedConfirming patch #229 works on Conditional fields 7.x-3.0-alpha2 !
(using Field Collection 7.x-1.0-beta8)
Thx!
Comment #257
parasolx CreditAttribution: parasolx commentedConfirming that patch #229 also works for me using Conditional fields 3.0-alpha2. Should incorporate into latest version.
Comment #258
acrosmanComment #259
joshf CreditAttribution: joshf at Third and Grove commentedThis patch causes a regression for me.
I have a node type "Event" with two fields, "Featured" and "Speakers."
"Featured" is a boolean.
"Speakers" is a field collection which depends on "Featured" being checked. It has several fields such as "Bio" and also a boolean for "External". Depending on the value of the "External" checkbox, different fields on the field collection item are shown or hidden.
This last functionality (changing the field collection fields available when based on the "External" value) works, now, thanks to this patch. However, with the patch applied, changes to the field collection items no longer save properly. No error appears; the changes just don't show up. Without the patch, everything saves properly. Also, when I remove the dependency between "Speakers" and "Featured", everything saves properly.
Comment #260
joshf CreditAttribution: joshf at Third and Grove commentedAttached a reduced test case demonstrating the issue reported in #259.
I found that it doesn't seem to matter if your field collection items have dependencies. If the field collection field itself is dependent on another field, the field collection doesn't save properly.
Steps to reproduce:
1. Enable the attached module
2. Browse to /node/add/event
3. Fill in the Title field
4. Check "Featured"
- "Speakers" field should appear
5. Fill in a Bio for one of the "Speakers" field collection items
6. Click save
7. Return to the edit screen for the new node
- Observe the Bio information is not saved
Thanks for everyone's hard work on this.
Comment #261
joshf CreditAttribution: joshf at Third and Grove commentedThe attached patch applies cleanly to the latest dev and does not exhibit the issue I described above.
I didn't really do anything other than reroll it, so my issues may have been a result of trying to patch alpha2.
Comment #262
anouPatch from joshf (#261) works for me. Thanks.
Comment #263
Unitoch CreditAttribution: Unitoch for University of Minnesota commentedI can confirm that the patch from #261 also applies cleanly for me to alpha2, and also eliminates this issue. Marking RTBC.
Comment #264
sassafrass CreditAttribution: sassafrass as a volunteer commentedI can confirm that the patch from #261 applies cleanly for me to 7.x-3.x-dev, and eliminates this issue. Thank-you!
Comment #265
LiamPower CreditAttribution: LiamPower at Reading Room commentedI can also confirm that the patch from #261 fixes the issue when applied to 7.x-3.x-dev
Comment #266
nwoodland CreditAttribution: nwoodland commentedPatch from #261 fixed the issue for me on the latest dev version as well
Comment #267
ovi.indrei CreditAttribution: ovi.indrei as a volunteer commentedI confirm that patch from #261 works in 7.x-3.0-alpha2
Comment #268
scotwith1t+1 for this patch against dev. Thanks!! Let's get this thing committed.
Comment #269
lasensio CreditAttribution: lasensio commentedI confirm that patch from #261 works in 7.x-3.0-alpha2 for the exact same issue with Paragraphs
Comment #270
akishankarI confirm that patch from #261 works with:
conditional fields module v-7.x-3.0-alpha2
field collections module v-7.x-1.0-beta11.
This patch can be committed.
Comment #271
badcrocodile CreditAttribution: badcrocodile commentedPatch #261 worked for me with Paragraphs 7.x-1.0-rc4 & Conditional Fields7.x-3.0-alpha2!
Comment #272
paulwdru CreditAttribution: paulwdru commented#261 patch works for 7.x-3.0-alpha2
Multivalue Multified was also solved. Great & thanks
Comment #273
peterpoe CreditAttribution: peterpoe as a volunteer commentedPlease test this new patch.
Changes from #261:
- Avoid changing the signature of API function conditional_fields_attach_dependency()
- Simplified creation of field parents key
- Code styling and comments
Comment #275
peterpoe CreditAttribution: peterpoe as a volunteer commentedOops.
Comment #276
peterpoe CreditAttribution: peterpoe as a volunteer commentedNote: when committing, also add credit to liquidcms, ocastle from #1648128: field collections within other field collections do not function when set as dependents
Comment #277
xaffimarc CreditAttribution: xaffimarc commentedI can confirm #275 works for me on the latest dev version (7.x-3.x-dev | 2016-Mar-29)
Also, my use case is for commerce registration when using conditional fields on multiple registrations at the same time
Comment #278
kenorb CreditAttribution: kenorb commentedComment #279
stefan.r CreditAttribution: stefan.r commentedInterdiff between 261 and 275
Comment #280
alanburke CreditAttribution: alanburke at Annertech for Liip commentedNo longer applies
Comment #281
b.anas CreditAttribution: b.anas commented#275 works great, thanks guys !
Comment #282
pipep CreditAttribution: pipep commented#275 +1
Thanks !
Comment #283
hanoii@peterpoe indeed the patch doesn't apply anymore. I just attempted to re-reroll but you refactor one bit of code that probably needs modifying, specially around
conditional_fields_evaluate_dependencies
and a new function so as you seem to be on top of this, probably best if you tacked it yourself.Comment #284
aburrows CreditAttribution: aburrows as a volunteer commentedSame issue as @hanoii, i'm currently working on this issue for a project so will hope to create a patch.
Comment #285
UnsettlingTrend275 seemed to work fine for me! (crossing fingers that it stays that way.)
Comment #286
Huelfe CreditAttribution: Huelfe commented#275 works for me, thank you! :)
Comment #287
Shashwat Purav CreditAttribution: Shashwat Purav commentedConfirmed #275 worked on Drupal 7.43 and "Conditional Fields" module version 7.x-3.0-alpha2.
Comment #288
paulwdru CreditAttribution: paulwdru commentedHi,
Since the patch works & tested, why not committed ? Otherwise there'll be infinite re-roll & re-roll & re-roll...
Thanks
Comment #289
alimbert CreditAttribution: alimbert commentedAny Update on patch #275 being applied to a release?
Comment #290
paulwdru CreditAttribution: paulwdru commentedHi,
Currently, too many patches are created for different bugs and can't be applied 1 after another, for eg after applying patch #275 here, I FAILED to apply the patch #139 in #1561272: Conditionally required fields are not required.
Hence, please commit the patches once tested to be working instead of dragging the issue indefinitely resulting in conflicts with other patches for other bugs.
Thanks
Comment #291
sketman CreditAttribution: sketman commented#275 works for me, let's commit it please..
Comment #292
stevendeleus CreditAttribution: stevendeleus commentedThe problem persists if the dependent fields are images with the media widget (Media module). It can be solved by adding one extra check for the entity bundle:
Comment #293
calebyoder CreditAttribution: calebyoder commented#275 seems to be working for me with the little I tested it (in my situation). Thanks!
-Caleb
Comment #294
akishankar#275 +1
Comment #295
DarkteK CreditAttribution: DarkteK commented#275 ++1 Worked like a charm !
Edit: Patched applied on version "7.x-3.0-alpha2"
Comment #296
fire-wolf CreditAttribution: fire-wolf commented#275 works great! Thanks!
Comment #297
morybel CreditAttribution: morybel commentedHi,
I have tried 3 times #275 and I always get fatal error. This is the longest patch I have come across so far so I'm guessing I'm doing some copy-paste error somewhere. Could someone upload a copy of the file conditional_fields.module so I can test. I have 7.x-3.0-alpha2.
Thanks.
Comment #298
knalstaaf CreditAttribution: knalstaaf commented#275: "Can't apply 4 of 57 hunks" when applying it on 7.x-3.x-dev (2016-Mar-30) - see #283.
Comment #299
MahtabAlam#275 works for me. :) Thanks
Comment #300
DarkteK CreditAttribution: DarkteK commented@morybel What O.S are you using, linux? Windows?
Comment #301
capogeannis CreditAttribution: capogeannis as a volunteer commentedMany thanks. #275 working great for me.
Comment #302
usdv CreditAttribution: usdv at ADCI Solutions commentedHey guys,
I use Conditional Fields module with Multifield module https://www.drupal.org/project/multifield and I had the same problem. So the good news is that patch #275 works well with this module as well. Thanks a lot!
Comment #303
kespinosa05@gmail.com CreditAttribution: kespinosa05@gmail.com as a volunteer commentedThere is patch integrating some patch
conditional_fields-fixed_multiple_field_collection_fields-1464950-276.patch and conditional_fields-conditionally_required-1561272-152.patch into 7.x-3.x branch of yesterday both works for me.
Comment #304
kyoder CreditAttribution: kyoder commentedPatch #275 no longer applies cleanly against the latest dev branch.
Comment #305
aaronglamb CreditAttribution: aaronglamb as a volunteer commented#275 succeeded on 7.x-3.0-alpha2 with PHP 7.0.8.
Excellent work - thank you!
Comment #306
djdevin#275 causes a fatal against 7.x-3.x even re-rolled, so something else must have changed.
I tried #303 which does show/hide field collections properly, however, required field collections are still required even when not triggered.
Comment #307
karthid CreditAttribution: karthid commented#275 works great. Thanks
Comment #308
jomarocas CreditAttribution: jomarocas as a volunteer commentedFor me the patch working good, why users tell that no working, maybe conflict with other module, update the issue
Comment #309
MustangGB CreditAttribution: MustangGB commentedPatch also adds support for multiple Multifield fields.
Comment #310
b_sharpe CreditAttribution: b_sharpe commented#275 applies to 7.x-3.0-alpha2 cleanly, but does not account for field translation.
Here is the updated version for field translation. Again, this is against 7.x-3.0-alpha2 as Dev appears to need a full re-roll of this patch at this point (hence why leaving in 'needs work')
Comment #311
jyraya CreditAttribution: jyraya commented@MustangGB, it is a good news that the patch adds support for multiple Multifield fields.
Nevertheless, IMHO, we should not change the issue title to include this type of fields by cause we enlarge the issue scope and then, we risk that problems related to "Multifield fields" pop up and block the ticket closure for months while a lot of us are waiting a final fix since almost 4 years.
If there are problems with "Multifield fields", that should then is treated in a different ticket.
Comment #312
kopeboy CreditAttribution: kopeboy commented#310 works with 7.x-3.0-alpha2 (latest stable release)!
Thanks!
Comment #313
ocastle CreditAttribution: ocastle at Full Bundle commented#310 also works for me on 7.x-3.0-alpha2 with Field Collections.
Cheers.
Comment #314
shuva.15 CreditAttribution: shuva.15 commented#310 works perfectly with 7.x-3.0-alpha2 version. Thanks..
Comment #315
msantos202 CreditAttribution: msantos202 commented#310 works perfectly with 7.x-3.0-alpha2 version. Thanks..
Comment #316
slipstreamer CreditAttribution: slipstreamer as a volunteer commented#310 works perfectly with 7.x-3.0-alpha2 version. Many Thanks to those who have worked on this.. Any chance this being pushed to dev?
Comment #317
donaldwbabcock CreditAttribution: donaldwbabcock commentedAlso can confirm #310 applies against 7.x-3.0-alpha2 version and resolves my issues with Conditional Fields and Paragraphs 7.x-1.0-rc4. In my case at render the Conditional Field dependencies were respected, but in the editor interface only the first paragraph of an multi-paragraphs field on any node was being affected by the dependencies.
Can we get this refactored against current dev and then committed, given our utter dependency on paragraphs (and nested entities generally) this now seems like long past due.
Comment #318
pauljb CreditAttribution: pauljb commented#310 works for me too. Thank you.
Comment #319
cgoffin CreditAttribution: cgoffin at Sopra Steria commented#310 works for me too. Thank you for the contribution.
Comment #320
donaldwbabcock CreditAttribution: donaldwbabcock commentedIt's been about a month of messing around with this and I've found that #310 + 7.x-3.0-alpha2 + Paragraphs 7.x-1.0-rc5 (rc4 until yesterday) works "for most use cases".
One where it does not is paragraph fields inside paragraphs in editor mode.
If I have a dropdown and a paragraph entity field on a node, it works as expected, the paragraphs field is hidden for both editor and display (I haven't tested it but I think this was true without #310).
If I have a dropdown and a paragraph field inside a paragraph, and the drop down controls whether the "child" paragraph field shows, it does not "hide/show" the paragraph in the editor, but is correctly hidden/shown in the display.
I have been able to trace it as far as being able to see that a state trigger is not being attached to the dropdown in the editors interface for the nested paragraph.
Perhaps someone more familiar with CF and this patch thread could easily spot why nested dependent paragraphs are not getting a proper state on the editor side.
-----------------------------------------
EDIT: to clarify, I have traced that an event listener is not being registered for the dropdown and reflected in DOM.
Comment #321
siva_drupal CreditAttribution: siva_drupal as a volunteer and commented#310 work for me too. Thanks a lot for the contribution.
Comment #322
Kris77 CreditAttribution: Kris77 commentedIt seems to not work with FieldGroup Multiple module...
Comment #323
cgoffin CreditAttribution: cgoffin at Sopra Steria commentedThe patch from #310 worked for me, but sometimes I get php notices. I added an extra check to the patch to fix those notices.
Comment #324
Nishruu CreditAttribution: Nishruu at Yogarik for Yogarik commented@cgoffin, your patch should contain only relative paths (no sites/all/modules/...). (see https://www.drupal.org/node/367392 ).
Comment #325
smurfxx CreditAttribution: smurfxx commentedI'm a bit confused: starting form 7.x-3.0-alpha2+10-dev which patches do I have to apply?
Is there a single patch to apply to 7.x-3.0-alpha2+10-dev? Or can someone post a conditional_fields.module already patched?
Thanks!
EDIT: Sorry I see that patches are applied to latest stable release, sorry!
Comment #326
hondaman900 CreditAttribution: hondaman900 commentedPatch at #275 worked fine for me on 7.x-3.0-alpha2. I used Netbeans to apply the patch.
Thank you!
Comment #327
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedis there a patch that will apply to the latest dev?
Comment #328
drclaw CreditAttribution: drclaw commentedHere's a version of the patch in #310 that applies to the 7.x-3.x-dev branch. I didn't use the one from #323 because it doesn't apply, and there was no interdiff to actually see what the differences were from the earlier one.
On the topic of interdiffs, it's hard to produce one that's meaningful when re-rolling a patch for a different branch. Instead I've just diff'd the patches using OSXs command line diff tool. It basically just highlights the two blocks from the original patch that had problems applying.
I tested this quickly with the paragraphs module (which has the same issues as field collection) and it appears to work. Hopefully someone can give it a whirl with field collection and report back!
Thanks!
Comment #330
SocialNicheGuru CreditAttribution: SocialNicheGuru commented#328 This causes field_collections to longer be affected by conditional_fields. It is always visibleno it was not this patch. it was another.
Comment #331
Brandonian CreditAttribution: Brandonian commentedWhile testing patch #328 in our codebase, I ran into an issue where conditional_fields_field_form_get_values() would fail, because of line ~1040
In our case, $form['#conditional_fields'][$fieldname] didn't exist. This would cause issues with, in our case, adding paragraph bundles to an unlimited paragraph bundle field. Attempting to add a bundle would cause a difficult-to-debug 500 AJAX error.
Given the description of the function, I added an empty check to the top of the function to return early an empty array if $form['#conditional_fields'] is empty. I'm unsure of exactly how to replicate the issue in a clean install, but I'm open to suggestions on how to better address if there's a better way, and/or if anyone has more insight in how to replicate this issue.
Comment #333
BR0kENMore than one dependee for the dependent will cause values to clean... (so, the patch is not fully working still)
Gosh, how
shittycomplex this project is.Comment #334
phpsubbarao CreditAttribution: phpsubbarao commented#310 working perfectly, thanks a lot
Comment #335
jojonaloha CreditAttribution: jojonaloha commentedAttached is a patch that also fixes a PHP Notice and Warning that I was getting after applying the patch in #333 against 7.x-3.x-dev.
Also attaching two interdiffs, the first includes whitespace changes, the second ignores whitespace changes (a lot easier to read).
Comment #336
capellicJust applied the patch in #335. Thanks @jojonaloha & @BR0kEN & everyone else.
Comment #337
kenorb CreditAttribution: kenorb commentedComment #341
gmarchev CreditAttribution: gmarchev commentedIt seems multiple dependees for a single dependent have stopped working sometime after #310. Currently the last dependee state overwrites the previous one.
Comment #342
gmarchev CreditAttribution: gmarchev commentedComment #343
anrikun CreditAttribution: anrikun commentedWhen a required dependent is hidden, "FIELDNAME field is required in the COLLECTION collection." still shows up for the 2nd or more items.
Comment #344
Isostar CreditAttribution: Isostar commentedI can confirm the issue mentioned by anrikun.
If you have inside a fc:
- radio field with optionA and optionB (required)
- optionA options list (required and only visible if optionA is checked)
- optionB options list (required and only visible if optionB is checked)
You will get the error 'OptionB options is required in the COLLECTION collection' when optionA is checked and optionB options list is hidden.
from the 2nd fc on.
Comment #345
niallmurphy-ie CreditAttribution: niallmurphy-ie commented7.x-3.0-alpha2+10-dev and #341 applied cleanly and seems to work as intended. Thanks.
Comment #346
scotwith1tThanks, but only partial success with the patch in #341. Specifics (without the latest dev w/patch):
- We are dealing with Scald, which allows you to create multiple entities at once via plupload. Once you've uploaded the images, you can then fill out the form for each individual scald entity ("atom") on the subsequent page.
- The fields in our implementation are a checkbox which hides 2 other fields when checked. Works fine on the first form, doesn't work at all with subsequent forms on the page.
With the latest dev and #341 patch, when the checkbox is checked in subsequent fields, only the 2nd field to be hidden is actually hidden. So close! Thought it might be because this often happens in a ctools modal, but I have the same problem when the form is filled out in a non-modal context.
Comment #347
vramiguez CreditAttribution: vramiguez commentedI tried applying #341 patch on the 7.x-3.0-alpha2 version but keep getting
(#8, #10 and #11)
Any idea why?
@niallmurphy-ie could you share the file you have to compare what is missing to get applied?
Thanks and help much appreciated.
Comment #348
niallmurphy-ie CreditAttribution: niallmurphy-ie commentedvramiguez, this is my conditional_fields.module file: https://pastebin.com/UVP1Kx7T
Comment #349
vramiguez CreditAttribution: vramiguez commentedThanks a lot niallmurphy-ie!! It worked. Much appreciated.
Comment #350
kebne CreditAttribution: kebne commented7.x-3.0-alpha2+10-dev and #341 applied cleanly and seems to work as intended here too.
Comment #351
scotwith1tDespite it not working for the use case I described in #346, I CAN confirm this does fix issues with field collections, so I think it should be committed at this point given the other confirmations above. I can open a new ticket for the Scald issue and perhaps figure out what's up with that particular situation.
Comment #352
anrikun CreditAttribution: anrikun commented@scotself You skipped issue at #343 confirmed at #344.
Comment #353
scotwith1tIndeed. Sorry about that!
Comment #354
Rasti CreditAttribution: Rasti commentedI copied ( #348 niallmurphy-ie ) code and pasted in my conditional_fields.module file , its works beautifully,
Thank you
Comment #355
emad.samirzaki CreditAttribution: emad.samirzaki commentedWhich module version did you use before you replace your .module file with this one?
Comment #356
Rasti CreditAttribution: Rasti commentedI applied it to 7.x-3.0-alpha2 released 29 September 2015
Comment #357
SkyBuzz CreditAttribution: SkyBuzz commentedI have applied #341 on dev release. Everything works perfectly except the field validation. It bypasses field validations.
Comment #358
calefilm CreditAttribution: calefilm as a volunteer commentedI applied #341 and it works cleanly. In my case, i have no problem with my dependency when validating a field.
validation = Specific value(s) for field_1
dependency = "field_2 is disabled when field_1 has value "0".
Comment #359
Chris Matthews CreditAttribution: Chris Matthews commentedComment #360
BramDriesenI created a patch for #348 (pastebin file) against the current release (alpha 2).
Will probably fail to apply against dev.
Comment #361
calefilm CreditAttribution: calefilm as a volunteer commentedThank you BramDriesen,
I tried patching in alpha version but received
I found reference for resolving this here: https://www.drupal.org/node/60116
Can you resolve this issue and repost the patch?
Thank you!
Comment #362
BramDriesenIndeed there was an issue with that patch. No idea how that happened.
Attached new patch. Only difference is the trailing "+"
Comment #363
calefilm CreditAttribution: calefilm as a volunteer commentedIs it just me? I'm still getting this:
Thank you for any assistance
Comment #364
calefilm CreditAttribution: calefilm as a volunteer commented@BramDriesen,
Thank you for the patch. I added an extra line at the end. Line 695 is now a blank line and, as a result, the patch is applied cleanly without the above messages. Not sure if that is correct on my part but your patch work as intended now.
Comment #365
rajveergangwar#323 has worked for me
https://www.drupal.org/project/conditional_fields/issues/1464950?page=1#...
Comment #366
PanchoFaced with the paralyzing situation that patch #341 had some remaining issues, while a seemingly all-new approach #348/#360/#362 failed to apply against latest dev, I carried out a three-way-merge of #348, only to find out that it has only few lines changed against the last working patch #341. These might be critical, but it's not like we're going a totally different path.
So here's my (hopefully properly applying) reroll of #348, together with an interdiff against #341. May the intense, good work continue!
Comment #368
PanchoThe three-way-merge somehow duplicated conditional_fields_library(), so I manually fixed that one.
Now these three changed lines should be all what's different between #341 and #348, see the interdiff.
If not or if it doesn't turn out to work better than #341, we should probably return to the latter, and go on from there.
Comment #370
Pancho#368 fails, too. So I think we should return to patch #341 which mostly worked fine, still does properly apply and tested green (tested today).
I'm wondering if it might be the best way forward to just get #341 committed and continue from there on with a few followups to tackle the remaining aspects. This issue here has become all too long and the patch has become all too complex to still be productive.
Setting back to Needs review per #341.
Comment #371
BramDriesenAs to the follow up comments on #341, there are issues with the patch.
Comment #372
sassafrass CreditAttribution: sassafrass as a volunteer commentedI applied patch #341 to the latest version of dev an this works for me. Thank-you!!
Comment #373
AlfTheCat CreditAttribution: AlfTheCat commentedAlso applied #341 and works great against latest dev. Thanks!
Comment #374
Thangaraj Moorthi#348 works fine. Tq so much
Comment #375
guitarodactyl CreditAttribution: guitarodactyl commentedCopy/pasted #348 over the top of conditional_fields.module file in the 7.x-3.0-alpha2 release, worked for me
Comment #376
dunot CreditAttribution: dunot at Zina Design commented#229 applies to 7.x-3.0-alpha2, not to 7.x-3.0-alpha2+10-dev.
#341 applies to 7.x-3.x-dev (7.x-3.0-alpha2+10-dev), not to 7.x-3.0-alpha2.
I've tried #348 (#360), but all these patches result no success
for file upload field dependant on text field
(video_embed_field in collection with deltas).
Selectors like [id*='edit-field-gallery-und'] doesn't work in "Custom jQuery selector for dependee".
Selectors like .video_embed_url hide all file upload dependant fields
if first instance dependee field has value.
Comment #377
James Feng CreditAttribution: James Feng commented#229 suits me very well. My version is 7. X-3.0-alpha 2
Comment #378
ergonlogicFYI, we're working on a similar feature for the D8 version in #1161314: Add basic Field Group support for ANDing conditions.
Comment #379
pinueve CreditAttribution: pinueve commented#341 against version 7.x-3.0-alpha2 works perfect
Comment #380
delacosta456 CreditAttribution: delacosta456 commentedhi i conform that #341 works on dev..
But i am a little confused on my own side about this issue Cross entity (Inline Entity form and... that ask to first apply #67(here) before using the patch on that issue .. which logically means to me that all modifications of patches here after #67 (even #341) will not be included ...
After applying successfully #341 here i could not apply the patch here (Cross entity ...Inline Entity form and...) anymore ..
Can somebody help understand and know what to do ?
Thanks
Comment #381
vibrasphere CreditAttribution: vibrasphere commentedThe #341 works for --dev only, thank you.
The bug is 8 years old from 2012. Why is this module still in alpha and not stable with 800k downloads and 70k active installs for both D7 and D8, I'm sorry but what does it take to go stable?
Comment #382
BramDriesen@vibrasphere Is there a need to get this stable? D7 is closing in on it's EOL :-)
Comment #383
vibrasphere CreditAttribution: vibrasphere commentedOkay, D8 stable when?
Comment #384
slv_ CreditAttribution: slv_ at Lullabot for Georgia Public Broadcasting commentedReuploading the patch from #362, with the empty line at the end.
Comment #385
juampynr CreditAttribution: juampynr at Lullabot commentedHere is an updated version which applies to 7.x-3.0-alpha2 and fixes the following warning:
Comment #386
dqd#382 / #383 need to be addressed. Apart from that it is not ensured that this issue still persist in its whole scope today.
Thanks for the report and all the efforts in here. But due to upcoming EOL of Drupal 7, I will close this issue on the way by cleaning up the issue queue.
Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others on this outdated version.
If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev. Thanks for understanding.