Problem/Motivation

There are a number of patches being used by distributions, such as WetKit.

Proposed resolution

Combine the following issues.

#1719414: UUID Features triggers WSOD when creating/recreating features
#1812876: Exported nodes are referred to term [tid] instead of [uuid]?
#2017221: Incompatible with Title module
#2052387: Undefined property: stdClass::$nid in DrupalDefaultEntityController->load()

User interface changes

Add ability to uncheck specific bundles from UUID Features config screen.
On a site with many nodes, one should be able to work around the WSOD on the Features page.

Additional code changes

Terms will no be exported correctly, using UUID instead of tid.
The call to entity_uuid_load changed to not reset.
Cloning node before unsetting properties so that the NID is available on hook_uuid_node_features_export_render_alter()

Original report by @joseph.olstad

Appled these patches to dec 4 dev build to solve uuid hangs on too many nodes

https://drupal.org/comment/7583827#comment-7583827 https://drupal.org/files/uuid_features-1719414-13.patch

- http://drupal.org/files/uuid_features-node_ref_term_uuid-1812876-7.patch
- http://drupal.org/files/uuid_features-incompatible_title_module-2017221-...
- http://drupal.org/files/uuid_features-2052387-clone-export.patch

and then added these three lines of code to fix an issue I noticed when exporting nodes with UUID

case "node":
$export_bundle = $export->type;
break;

and created a patch rollup

Comments

joseph.olstad’s picture

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Issue summary: View changes
StatusFileSize
new11.96 KB

fix patch, added case for "node"

joseph.olstad’s picture

Category: Bug report » Feature request
Priority: Normal » Major

This patch allows you to filter content types to be included in the uuid_filter prior to the "features" module trying to swallow all content types. Without this patch you'll get the WSOD if you have say a 10000 or 100000 or more nodes on one content type.

With this patch you can safely generate a uuid feature including content from selected content types that have a moderate amount of nodes.

There was a previously reported 'drush cc' issue which I could not reproduce. I have not seen any issues with this rollup patch.

joseph.olstad’s picture

Basically in a nutshell: this patch allows the user to select desired node bundles (content types) to include in the feature and "prevent specific node bundles from destroying Features admin screens."
(as the user-interface of Features cannot handle unlimited checkboxes for large (tens of thousands) amounts of items)

I highly recommend this patch.

spotzero’s picture

Status: Needs review » Needs work

This patch throws tons of php notices when exporting beans. (1 per bean on the site).

This is because is undoes changes made in #2072943: Features UI displays optional Bean titles rather than required delta.

The changes that undo the changes were not in any of the three source patches, nor in the code snippet you added, so this was introduced when you did the roll-up.

You should develop your patch against the latest development version of the module to avoid regression issues like this.

Other than that issue, the patch is function and works as described.

saltednut’s picture

#6 is correct. Please reroll the patch for the latest HEAD of uuid_features

In general, its not a good idea to close other issues and try to create a meta-issue in this way to force stuff in.

Please try to solve the problem granularly - when making a meta issue such as this, it is crucial that you link back to the issues you are combining.

You can do this by making the issue related, but also you should be linking back to them using brackets like this [#issuenumber] - this way we can see which issues have been affected.

I'm having a very hard time understanding the main post of this issue because you link to both issues and patches from various places.

I'm also not at all convinced there aren't a good number of regressions here given the concerns listed in #6

joseph.olstad’s picture

Hi Spotzero and Brantwynn , actually this patch was applied to head.
There was an issue that snuck in due to conflict in #1719414: UUID Features triggers WSOD when creating/recreating features patch.
refactored it in patch 11, see comment #11

joseph.olstad’s picture

The problem is that the patch from June here: #1719414: UUID Features triggers WSOD when creating/recreating features
didn't apply on the latest dev build, so that's why I created this new patch (works on dev 4 build).

As for the regression issue, see comment #11

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new11.97 KB

Ok Spotzero, I looked at your patch and refactored the changes into this one.

Because of the great number of changes I think it's easier to work from the latest dev branch and use this patch that works on it.

The other patches are stale, that's why I did this.

joseph.olstad’s picture

Thanks Spotzero for assistance.
This patch applies the changes from #2072943: Features UI displays optional Bean titles rather than required delta refactored into this one

since beans always have 'delta' values but do not always have 'title' values, use 'delta' in the dbselect .

joseph.olstad’s picture

StatusFileSize
new11.58 KB

remove drush make time/datestamp from .info

joseph.olstad’s picture

Special thanks to the great work of the people HERE (jgraham, happysnowmantech, steve.elkins, brantwynn )as well as Spotzero and others that designed and contributed to this patch.

Summary howto

for others who want to test this #2149949: Multiple Patches need to be committed to UUID Features and have been rolled into one.

test scenario:

  • 138000 nodes on 'content type C'
  • 60 nodes on 'content type G'

This patch adds the following functionality

  • allows you to select /unselect node bundles before hitting the features screen.
  • effectively allows you to select what you want to include in your feature without overloading the features admin screen.

Howto

  1. Selection form is found in: "Configuration" -> "Content Authoring" -> "UUID Features Integration" aka admin/config/content/uuid_features.
  2. After selections go to the Features "create" form.
  3. Create feature selecting nodes of 'content type G' with uuid's

Expected results:

  • before patch: crash, WSOD , CANNOT exclude 'content type C'
  • after patch: exclude node bundles except desired 'content type G', everything works
saltednut’s picture

Title: solve uuid hangs on too many nodes - multiple patch rollup on dec 4 dev build » Multiple Patches need to be committed to UUID Features and have been rolled into one.
Issue summary: View changes
saltednut’s picture

Issue summary: View changes
saltednut’s picture

+++ b/includes/uuid_bean.features.inc
@@ -98,6 +103,9 @@ function uuid_bean_features_export_render($module, $data) {
+    // Enable file exports.
+    uuid_features_file_field_export($export, 'bean');
+

@@ -156,6 +164,8 @@ function uuid_bean_features_rebuild($module) {
+        // Import the file fields on the bean.
+        uuid_features_file_field_import($bean, 'bean');

Unfortunately this breaks existing configs. I am going to remove this bit as we'll need to chase the bean ability to deal with these fields in a followup. ie: we should first check for this existing before running the code. I am seeing beans exported in Demo Framework fail on import because they don't have file fields attached and were not built when uuid_features_file_field_export($export, 'bean'); was in place.

saltednut’s picture

Assigned: joseph.olstad » Unassigned
Status: Needs review » Fixed
Issue tags: +demo_framework

Ok, I've committed this beast, all except for what is mentioned in #17, as I'd like to chase that in a followup here: #2151511: Enable file exports in uuid_bean

Given that there were multiple authors of code, I did my best to mention everyone by name but I only mentioned this node in the commit.

http://drupalcode.org/project/uuid_features.git/commit/40f1a49

joseph.olstad’s picture

Hi brantwynn, thanks for reviewing committing the patch.

Moving to new issue.

jayson’s picture

I did some tests of this new patch and found two potential problems:

1. I'm getting errors about undefined indexes on both these pages:
> UUID Features Integrations configuration page (/admin/config/content/uuid_features)
> Create new feature page (/admin/structure/features/create)

2. The "UUID Features Integration" configuration page displays some select options that have blank values. The two content type related ones have to do with "Deploy Content Migrated" and "Deploy Content Simple". The taxonomy related one has to do with Tags. I was able to track them down to the WetKit Deployment feature (/admin/structure/features/wetkit_deployment) which is currently disabled on this website. That might explain why the options checkboxes appear with no label. However, perhaps this is a bug as the options should not be there at all.

See 2 attached screenshots.

jayson’s picture

Adding two screenshots as referenced in comment #20 (https://drupal.org/comment/8256105#comment-8256105).

jayson’s picture

StatusFileSize
new151.36 KB

Corrected one of the screenshots, uploaded the same one twice accidentally.

joseph.olstad’s picture

Ok thanks Jayson, a patch is ready. I'm taking your feedback and copying it to a new issue #2153157: undefined_index_when_processing_orphanned_bundles

diff --git a/uuid_features.module b/uuid_features.module
index c42f4ef..4f7738b 100644
--- a/uuid_features.module
+++ b/uuid_features.module
@@ -132,7 +132,9 @@ function uuid_features_settings($form, &$form_state) {

   foreach ($entity_info as $type => $info) {
     foreach($info['bundles'] as $bundle => $bundle_info) {
-      $bundles[$type][$bundle] = $bundle_info['label'];
+      if (isset($bundle_info['label'])) {
+        $bundles[$type][$bundle] = $bundle_info['label'];
+      }
     }
     if (isset($info['uuid features']) && $info['uuid features'] === TRUE) {
       $form['entity']['uuid_features_entity_' . $type] = array(
saltednut’s picture

Status: Fixed » Closed (fixed)

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