Every time when i'm trying to revert\rebuild a feature with node on a fresh and clean drupal i got an error
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /var/www/staging/inuits-eu/includes/entity.inc).

Why it happen:
During revert\rebiuld the uuid_features module tries to get a nid of the each node by uuid from DB, then do node_load.
If there is no such node in the DB (e.g.: clean installationthe) MySQL query will return FALSE, and it will become as $nid value.

/* uuid_features/inclides/uuid_node.features.inc, line 127 */
      // Find the matching UUID, with a fresh cache.
      $nid = uuid_node_find($node->uuid);
      $existing = node_load($nid, NULL, TRUE);

The $nid should be string or integer, but not bool.

Here is the patch, which will fix the problem.

Comments

toleillo’s picture

Hi,
In version 7.x-1.0-alpha1 uuid_node module and uuid_node_find function not exists. Maybe you should review your module version and change this field in this issue.

Read this issue could help you: http://drupal.org/node/1267532

Oleksandr.Masovets’s picture

@toleillo
Please, notice that current issue is related to the uuid_node component of the uuid_features module, but not to the uuid_node module.

You can find the uuid_node.features.inc file in the includes folder of the uuid_features module.

schultetwin’s picture

I'm experiencing a related issue in the uuid_node_features_export_render() function. Patch attached.

Jeffrey C.’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev

Status: Needs review » Needs work

The last submitted patch, 0001-Fixing-bug-in-UUID-that-causes-array_flip-warning.patch, failed testing.

saltednut’s picture

I've seen this error (or something similar) but it was when the directory permissions for sites/default/files were not set correctly.

Sorry - this was using taxonomy terms and related to the file attachment patch. Nothing to see here...

spgd01’s picture

Any more work with this? I am getting:

"Warning: array_flip(): Can only flip STRING and INTEGER values!"