When I use drush to enable a module, I get the following errors:

Illegal string offset 'bundle' conditional_fields.features.inc:108 [warning]
Illegal string offset 'entity' conditional_fields.features.inc:122 [warning]
Illegal string offset 'bundle' conditional_fields.features.inc:122 [warning]
Illegal string offset 'dependee' conditional_fields.features.inc:123 [warning]
Illegal string offset 'dependent' conditional_fields.features.inc:124 [warning]
Illegal string offset 'options' conditional_fields.features.inc:125 [warning]
PHP Fatal error: Unsupported operand types in /conditional_fields/conditional_fields.module on line 1384

fieldable_panels_pane

array_key_exists() expects parameter 2 to be array, string given [warning]
conditional_fields.features.inc:102

fieldable_panels_pane

Illegal string offset 'entity' conditional_fields.features.inc:108 [warning]

I put in the following code to see what did not have a '$field':

//sng
if(!array_key_exists('entity',$field))
{
print_r('<pre>');
print_r($field);
print_r('</pre>');
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru created an issue. See original summary.

SocialNicheGuru’s picture

SocialNicheGuru’s picture

Issue summary: View changes
SocialNicheGuru’s picture

Title: fieldable_panels_pane breaks conditional_fields » Commit 187a138 breaks conditional_fields
Project: Fieldable Panels Panes (FPP) » Conditional Fields
Version: 7.x-1.10 » 7.x-3.x-dev

After looking further it is not fieldable_panel_panes.

Instead this commit breaks conditional fields: https://www.drupal.org/commitlog/commit/4894/187a1386916dc1d5f1539ec65a7...

I can create a feature just fine with the dev version with the commit.
But when I enable the feature with conditional fields on a new install I get the following:

Do you really want to continue? (y/n): y
Illegal string offset 'entity' conditional_fields.features.inc:98 [warning]
Illegal string offset 'bundle' conditional_fields.features.inc:98 [warning]
Illegal string offset 'entity' conditional_fields.features.inc:112 [warning]
Illegal string offset 'bundle' conditional_fields.features.inc:112 [warning]
Illegal string offset 'dependee' conditional_fields.features.inc:113 [warning]
Illegal string offset 'dependent' conditional_fields.features.inc:114 [warning]
Illegal string offset 'options' conditional_fields.features.inc:115 [warning]

the line foreach($item as $field) { returns $field as a string not an array.

SocialNicheGuru’s picture

Mschudders’s picture

Hello,

Does anyone have an update about this ?

I am having this issue aswel.

Investigating now.

Mschudders’s picture

Dear

I have resolved the fatal error, features reverting etc works properly, however there are still a lot of notices.

patch attached.

Mschudders’s picture

Status: Active » Needs review
fizk’s picture

You need to re-export your features, because this commit changed the export format.

Attaching a patch to better explain this error when it happens.

fizk’s picture

SocialNicheGuru’s picture

Status: Needs review » Needs work

Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function Exception() in modules/all/conditional_fields/conditional_fields.module, line 1394

i think the patch should be 'throw new Exception'
http://php.net/manual/en/language.exceptions.php

delacosta456’s picture

hi @ SocialNicheGuru

I am facing this issue too ..
i applied the patch 10 but still encountering the error message in drush ..

Please have you found a solution ?

thanks

SocialNicheGuru’s picture

I had to totally redo all my conditional fields

pavel.zheldak’s picture

There were a problem with patch #10 as there should be "throw new Exception" as it was mentioned in #11. Uploading fixed version.

pavel.zheldak’s picture

pavel.zheldak’s picture