With ubercart, you can have attributes for a product, that give you a set of options. You can also give each option an alternate SKU. When this module is enabled, when trying to add an alternate SKU you get a "A node is not allowed to embed in itself" error, and can't add the alternate SKU.

I ran into this problem making subscriptions for OpenPublish. I would imagine this would have happened to people before, but found nothing doing some Google searches.

The way I solved it was disabling this module. And re-enabling it when I was finished.

Comments

SeanJA’s picture

Maybe a bit late, but in my test environment I have changed node_embed_form_alter to this instead:

<?php

/**
 * Implement hook_form_alter()
 * add a validation handler to nodes with node_embed.
 *
 */
function node_embed_form_alter(&$form, $form_state, $form_id) {
  //make sure it is a node form before adding the validation
  // no point in validating the searchform and whatnot against node_embed_validate
  if(strpos($form_id, '_node_form') !== false){
    $form['#validate'][] = 'node_embed_validate';
  }
}
?>

Not sure what else node_embed_validate should run against, but this seems to make sense?

avr’s picture

The solution from #1 worked as expected. Thanks @SeanJA!

mrharolda’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

As of 22 September 2014, we no longer support the Drupal 6 version of Node Embed due to the small install base (< 15%) and more importantly: general lack of time.

If you would like to help and maintain the 6.x branch until Drupal 8 is released, please apply for co-maintainership!