I'm getting this error:

Notice: Undefined index: dependencies in features_export_components_json() (line 634 of features.admin.inc)

When I create a new feature and attempt to update the files on disk directly.

Comments

alberto56’s picture

StatusFileSize
new54.22 KB

See enclosed the backtrace.

mpotter’s picture

Status: Active » Postponed (maintainer needs more info)

Looks like a problem with a specific type of component in your export. You'll need to give a more detailed step-by-step procedure for reproducing this.

derrekc’s picture

I have encountered this warning as well when creating a Feature consisting of node content types.

kenorb’s picture

Version: 7.x-2.0-beta1 » 7.x-2.0-rc1
Status: Postponed (maintainer needs more info) » Active

Backtrace:

URL: /admin/structure/features/create
Notice: Undefined index: dependencies in features_export_components_json() (line 720 of features/features.admin.inc). =>
... (Array, 4 elements)
 3: features_export_components_json() (Array, 2 elements)
file (String, 49 characters ) sites/all/modules/features/features.admin.inc:720
args (Array, 1 element)
0 (String, 1 characters ) *
 2: call_user_func_array() (Array, 1 element)
args (Array, 2 elements)
0 (String, 31 characters ) features_export_components_json | (Callback) features_export_components_json();
1 (Array, 1 element)
0 (String, 1 characters ) *
 1: menu_execute_active_handler() (Array, 2 elements)
 0: main() (Array, 2 elements)

So it happens when creating a new Feature by actually going to /admin/structure/features/create

mpotter’s picture

Status: Active » Postponed (maintainer needs more info)

What I need to know is exactly what components you are trying to add to your new feature. The traceback above doesn't tell me anything except that there was a problem exporting whatever you selected to add to your feature. It doesn't tell me what you tried to export.

Yaron Tal’s picture

StatusFileSize
new517 bytes

I had the same problem when trying to create a feature and not selecting any dependencies.
If I select a dependency first, and then select a view the view module will automatically be added to the feature dependencies and no notice is shown.
If I select the view first no dependencies are added and the following notice is shown after a refresh:

Notice: Undefined index: dependencies in features_export_components_json() (line 720 of /.../features/features.admin.inc).

I attached a small patch that fixed the problem for me.

Yaron Tal’s picture

Status: Postponed (maintainer needs more info) » Needs review

Status: Needs review » Needs work

The last submitted patch, features-undefined-index-1945314-6.patch, failed testing.

Yaron Tal’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Status: Needs work » Needs review

Looks like a bug in the image module, or features implementation of that module, unrelated to the patch.
Trying 7.x-2.x-dev as the patch was also created on that version and patches on that version in other issues seem to validate.

Yaron Tal’s picture

Yaron Tal’s picture

StatusFileSize
new517 bytes

On the dev version.

mpotter’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new521 bytes

Here is a version with proper white-space added for Drupal coding standards.

mpotter’s picture

Status: Reviewed & tested by the community » Fixed

Passing tests, so committed to 93ff6cd.

Status: Fixed » Closed (fixed)

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