I've randomly seen this happen when updating existing features with taxonomy terms and menus.

Something happens in the feature build that causes the first item to be repeated with a nested array key of "parents", and then continually rebuilds the item over and over in a more deeply nested array until the recursion depth error is hit. Locks up the feature to where it no longer can be viewed or recreated.

See the sample code below generated by Features:

  $terms[] = array(
    'name' => 'Site Feedback & Comments',
    'description' => '',
    'format' => NULL,
    'weight' => 5,
    'uuid' => '935512a0-0d75-4d59-a6a7-5dedd2aab5cd',
    'vocabulary_machine_name' => 'forums',
    'name_field' => array(
      'und' => array(
        0 => array(
          'value' => 'Site Feedback & Comments',
          'format' => NULL,
        ),
      ),
    ),
    'parents' => array(
      0 => array(
        'tid' => 799,
        'vid' => 14,
        'name' => 'Site Feedback & Comments',
        'description' => '',
        'format' => NULL,
        'weight' => 5,
        'uuid' => '935512a0-0d75-4d59-a6a7-5dedd2aab5cd',
        'vocabulary_machine_name' => 'forums',
        'name_field' => array(
          'und' => array(
            0 => array(
              'value' => 'Site Feedback & Comments',
              'format' => NULL,
              'safe_value' => 'Site Feedback & Comments',
            ),
          ),
        ),
        'name_original' => 'Site Feedback & Comments',
        '_drafty_revision_requested' => 'FIELD_LOAD_CURRENT',
        'parents' => array(
          0 => array(
            'tid' => 799,
            'vid' => 14,
            'name' => 'Site Feedback & Comments',
            'description' => '',
            'format' => NULL,
            'weight' => 5,
            'uuid' => '935512a0-0d75-4d59-a6a7-5dedd2aab5cd',
            ....

And this goes on and on and on... each layer nested more deeply.

If I then edit the features code and remove all the bad nested arrays created by Features, I'm able to view and edit the feature through the UI again with no problem. Also if I re-save at this point, everything is fine with the code generated by Features.

Comments

ron_s created an issue. See original summary.

sgdev’s picture

Project: Features » UUID Features Integration
Version: 7.x-2.x-dev » 7.x-1.x-dev

Moving this to UUID Features because I believe the issue is in there. We're seeing this come up more frequently.

sgdev’s picture

I should also note this error is occurring when we have made no changes to Terms settings in the Feature.

UUID Features is rebuilding the array included in the generated features.uuid_term.inc file even though nothing has been modified.

sgdev’s picture

Title: Recursion depth reached in features_var_export » Using entity_uuid_load with reset = FALSE causes recursion depth failure
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new3.78 KB

I found the problem.

The module has many calls to entity_uuid_load. Some of them have $reset = TRUE, and others do not. uuid_terms is one of them with $reset = FALSE . Having $reset = FALSE is causing a recursion depth error.

I've reviewed the entire module and created a patch that updates each location where entity_uuid_load is set with $reset = FALSE to ensure $reset = TRUE. Now it is consistent throughout.

Please review, this is a rather serious issue. Thanks.

Status: Needs review » Needs work

The last submitted patch, 4: uuid_features-entity_uuid_load_reset_true-2999481-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

sgdev’s picture

StatusFileSize
new5.3 KB

Ah frustrating... it's not going to accept my patch without cleaning up pre-existing coding standards issues. Here is a new version that takes care of those too.

sgdev’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
sgdev’s picture

Status: Needs work » Needs review
StatusFileSize
new5.59 KB

Ok, trying one last time. Another coding standard issue that has nothing to do with this patch. See attached.

Status: Needs review » Needs work
sgdev’s picture

Status: Needs work » Needs review

This patch is fine but it keeps failing testing. Setting to needs review.

Someone needs to create a comprehensive patch that fixes all UUID Features coding standards problems so these tests stop failing. Feel free to use patch #4 if the coding standards are fixed separately.

  • das-peter committed e671a5c on 7.x-1.x authored by ron_s
    Issue #2999481 by ron_s: Using entity_uuid_load with reset = FALSE...
das-peter’s picture

Status: Needs review » Fixed

Thanks for the patch! Comitted & pushed.

Status: Fixed » Closed (fixed)

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