Hello, i get this notice. I use php 5.4 and latest drupal core and conditional_fields-dev

Notice: Undefined variable: 3 in conditional_fields_form_after_build() (line 595 of /srv/http/epik/sites/all/modules/conditional_fields/conditional_fields.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

loze’s picture

Im getting this error also.

francoud’s picture

Me too right now. Happens when I defined 2 fields in a profile, and using dependencies to show these fields only in certain conditions. When these fields are not present and are not viewable by the user (due to "field_permissions" settings), I receive the error.

Seems that I've been able to solve:
- UNchecking "reset the dependent to its default values when the form is submitted if the dependency is not triggered." for all these fields
- CHECKing "Hide the dependent if the dependee is not viewable by the user and the dependency is not triggered"
- and also making these fields NOT viewable by the user (using field_permissions module)

Hope this help

ellek’s picture

I'm getting this error also. Unfortunately, francoud's suggestion did not work for me. Anyone else find an alternate workaround? Thank you.

kaizerking’s picture

I have observed D7 Has some problems with Php 5.4. issues like this have been observed with some other modules as well

Les Lim’s picture

Status: Active » Needs review
FileSize
636 bytes

I can't see any reason why the behavior there would be a dynamic variable name. Here's a patch, but the module author should probably weigh in to clarify what the intention was there.

A-snowboard’s picture

Hello,

the patch does not work for me. I still have the same error.

A-snowboard’s picture

Finally no need to patch.
You must choose the option "disable" and not invisible.

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #5 should fix the problem with the $behavior function not being called correctly.

k.skarlatos’s picture

patch #5 works for me too, thanks a lot!

danon1981’s picture

Patch #5 does it's job for me, thanks!!

operations’s picture

@Les Lim I agree with you about using dynamic variable here and confirm your patch worked for me.

peterpoe’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

This bug was fixed in this recent commit. Sorry for the lack of credit: I hadn't seen this issue before.

peterpoe’s picture

Status: Active » Fixed

Uh?

DamienMcKenna’s picture

I've requested the first comment be unpublished: https://drupal.org/node/2139179

peterpoe’s picture

funny pic though :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

super_romeo’s picture

Hi!
When I go to edit node I got error:
Fatal error: Call to undefined function 3() in conditional_fields.module on line 581

I have same things in my website: field_permissions and field_collection.

When I set in field_permissions "can edit" to TRUE - all is OK.

super_romeo’s picture

Status: Closed (fixed) » Active
k.skarlatos’s picture

FileSize
578 bytes

updated patch for latest dev version

FreekVR’s picture

Here's a patch for anyone running 3.0-alpha1

legolasbo’s picture

Status: Active » Reviewed & tested by the community

Patch #22 works like a charm for 3.0-alpha1

Status: Reviewed & tested by the community » Needs work
peterpoe’s picture

Status: Needs work » Fixed

This was fixed in commit 99c5e68

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.