I get the following error message if UUID Node isn't installed

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'n.uuid' in 'field list': SELECT n.nid, n.title, n.type, n.uuid FROM {node} n ORDER BY n.type, n.title ASC; Array ( ) in uuid_node_features_export_options() (line 17 of /Users/ben/Projects/savethechildren/d7/trunk/sites/all/modules/contrib/uuid_features/includes/uuid_node.features.inc).

Comments

benedictsteele’s picture

Status: Active » Needs review
StatusFileSize
new2.25 KB

I've created a patch that only adds the components if those modules exist.


function uuid_features_features_api() {
  $components = array();
  if (module_exists('uuid_node')) {
    $components['uuid_node'] = array(
    	'name' => t('Content'),
    	'features_source' => TRUE,
    	'default_hook' => 'uuid_features_default_content',
    	'default_file' => FEATURES_DEFAULTS_INCLUDED,
    	'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_node.features.inc',
  	);
  }
  if (module_exists('uuid_taxonomy')) {
	  $components['uuid_vocabulary'] = array(
	    'name' => t('Vocabulary'),
	    'default_hook' => 'uuid_features_default_vocabularies',
	    'default_file' => FEATURES_DEFAULTS_INCLUDED,
	    'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_vocabulary.features.inc',
	  );
	  $components['uuid_term'] = array(
	    'name' => t('Taxonomy Term'),
	    'default_hook' => 'uuid_features_default_terms',
	    'default_file' => FEATURES_DEFAULTS_INCLUDED,
	    'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_term.features.inc',
	  );
  }
  // Depends on http://drupal.org/node/808690
  if (function_exists('uuid_file_insert')) {
    $components['uuid_file'] = array(
      'name' => t('File'),
      'default_hook' => 'uuid_features_default_files',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_file.features.inc',
    );
  }
robloach’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.48 KB

Yup! Except you have some tab characters in there, so I fixed that :-) .

robloach’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

Prasad Shir’s picture

Status: Closed (fixed) » Needs work

It seems that this patch is no longer needed & possibly needs to be reversed if we are using UUID 7.x-1.0-alpha2.

UUID alpha 2 release does not contain sub-modules for UIUD Nodes & UUID Taxonomy, instead UUID now takes generic entity approach.

imiksu’s picture

Tagging.

recidive’s picture

Applying the following patch reversed seem to make the module work again:

http://drupalcode.org/project/uuid_features.git/patch/97ce08a

patch -p1 -R < patch.patch

wulff’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.16 KB

I have attached a patch for those of you using drush make.

Removing the calls to module_exists() seems to do the trick.

wroxbox’s picture

After applying the patch #8 (in the dev branch of the module) I can see those component options in feature creation, but clicking any of content_uuid: I get AJAX message (500) saying:
PHP Fatal error: Call to undefined function uuid_node_find() in uuid_features/includes/uuid_node.features.inc on line 40
referer: http://localhost/admin/structure/features/create

drupalninja99’s picture

Same error

drupalninja99’s picture

Applied #5 from here: http://drupal.org/node/1267532

robloach’s picture

Status: Reviewed & tested by the community » Needs work

Looks like this still needs some fixings. Hmmm.

bradjones1’s picture

Priority: Normal » Major
Status: Needs work » Reviewed & tested by the community

The patch mentioned in #11 was a separate issue and was committed at http://drupal.org/node/1267532#comment-5358816, but doesn't address the problem presented here. The patch in #8 got the components appearing for me in the build feature tool.

I'm marking this RTBC and upping the priority as right now it appears this module isn't usable as advertised without the patch. Thoughts?

duaelfr’s picture

Priority: Major » Critical
Status: Reviewed & tested by the community » Needs work

Just removing calls to module_exists is not sufficient because UUID has been deeply refactored.
Some used functions like uuid_taxonomy_term_find just disappeared so we have to provide a better patch.

As this module is not usable at all with the recommended release of UUID we can consider this bug Critical.
I will provide a new patch very soon.

duaelfr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.02 KB

Here is a complete patch including #8 (thanks)

duaelfr’s picture

StatusFileSize
new2.72 KB

This cancels and replaces the previous patch.
I missplaced the uuid_taxonomy_term_find function.

Please review.