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.
Comment | File | Size | Author |
---|---|---|---|
#3 | conditional_fields-fix-ief-dependency-2188977-3.patch | 1010 bytes | paramnida |
|
Comments
Comment #1
ezheidtmann CreditAttribution: ezheidtmann commentedI originally uploaded the wrong features export statement. Fixed it.
Comment #2
alfaguru CreditAttribution: alfaguru commentedI have been working on a similar issue and in the case I have been testing it seems to be related to Features. When the condition settings for a field were saved from the form at admin/structure/dependencies/edit/nn all was OK, but when they were imported from a feature we got the error.
After much sweat and debugging I tracked down the problem to conditional_fields_evaluate_dependency(), which includes the following code:
What I found was that the presumption in the comments was incorrect in the case in point. $dependency_values was a long, but $values was a string. For simplicity, I would propose the following amendment, which seems to be relatively safe and fixes the bug for us:
I don't have time to turn this into a patch right now. Will do so when time permits.
Comment #3
paramnida CreditAttribution: paramnida commentedI made a patch with the changes you suggested, but it didn't work for me. I get the following error:
This is my first patch, so hopefully I did it right. Any idea what went wrong?
Comment #4
fox_01 CreditAttribution: fox_01 commentedWhen i have 2 fields of the same field base (lets call it field_mycustom) inside different entities and they are referenced with inline entity form the function that field is disable on both fields but others work.
both entites have a different dependent field (selectlist) which work generelly but the field which is now twice at the form will wether hide or show up when the dependent field gets triggered
for testing purposes i renamed the field to field_mycustom2 (not the field label, i created a new field base) from the same type (text). now conditions work inside the the referenced entity and the top level entity. if i now add the field_mycustom again to the secondary entity only the condition for the field field_mycustom still works but the other not
For this patch #3 does not work
Comment #5
fox_01 CreditAttribution: fox_01 commentedadding related issue #2533958: Duplicate field and Inline entity form
Comment #6
fox_01 CreditAttribution: fox_01 commentedComment #7
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #8
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #9
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #2 describes the issue perfectly. Patch #3 works good (yet the code style needs to be updated).
Comment #10
dqdThanks for the reports and all the hard work in here. But due to inactivity in this issue for years and because of the upcoming EOL of Drupal 7 soon, I will close this issue while cleaning up the issue queue. Check the related issue top right, there is a fix to be committed soon for Drupal 8 and above.
Comment #11
dqd