I noticed a bug in uuid_entities_features_export_render: the first argument of this function is $module_name. On line 106, there is the following code:
foreach (module_implements($hook) as $module_name) {

In some cases, this code actually replaces the main $module_name variable, causing error messages to be displayed. I will provide a patch to fix this issue.

CommentFileSizeAuthor
#1 1628456-module_name-1.patch832 bytesguillaumev
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guillaumev’s picture

Status: Active » Needs review
FileSize
832 bytes

Here is the patch.

matthand’s picture

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

This patch corrected an error I was receiving after importing a feature. Thanks guillaumev!

matthand’s picture

Priority: Normal » Major

This patch is a solid bug fix and is safe to apply. Can we get it on the docket to be pulled into the repository? Thank you!

skwashd’s picture

Status: Reviewed & tested by the community » Needs work

@guillaumev or @BullMoose are you able to provide test cases to verify the bug and the fix?

matthand’s picture

@skwashd Sorry, I currently have no time to build out test cases for such a simple bug fix. Have you reviewed the patch at all before asking for more info?

skwashd’s picture

@BullMouse, I did review it. Looks good to me. We try to get test coverage for all bug fixes.

matthand’s picture

I can describe my test case a bit now, possibly write a real test later.

  1. Using modules UUID, ECK, ECK Weight, Features, Entity API, Deploy and Entity UUID.
  2. Set up custom entity type and bundle using ECK.
  3. Set up custom entity records using ECK Add Entity.
  4. Set up deploy plan for custom entity records using views deploy.
  5. Export custom entities using Features.
  6. Set up matching config on new Drupal install, leaving out custom entities.
  7. Import custom entities using Features.
  8. Review warnings and notices related to bug.

Bug triggers following warnings and notices:

Warning: Invalid argument supplied for foreach() in drupal_schema_field_types() (line 7159 of /home/username/websites/website.dev/includes/common.inc).
Notice: Undefined variable: field_types in drupal_schema_field_types() (line 7162 of /home/username/websites/website.dev/includes/common.inc).
Warning: array_keys() expects parameter 1 to be array, null given in drupal_schema_fields_sql() (line 7179 of /home/username/websites/website.dev/includes/common.inc).

There's also a bug in Entity UUID that needs to be patched before attempting this workflow. But the warnings and notices are related to UUID and corrected by applying the patch from comment #1: https://www.drupal.org/files/1628456-module_name-1.patch .

Sorry for being so general. It's all I have time for. Thanks!