Hi,

I've got the following issue and trying to figure out where this would be fixed.

Steps to Reproduce:

  • Using webforms create a node.
  • In Form Settings > Advance Settings > Tick Available as Block
  • Go to structure > page inside /node/%node create a variant.
  • In content add a page by browsing to "Miscellaneous" and choosing your webform.
  • Then using features export the page in the page manager settings

You'll get something like this:

    $pane = new stdClass();
    $pane->pid = 'new-a4859ce2-3d30-41df-ba77-21cd531a5629';
    $pane->panel = 'center';
    $pane->type = 'block';
    $pane->subtype = 'webform-client-block-2';
    $pane->shown = TRUE;
    $pane->access = array();
    $pane->configuration = array(
      'override_title' => 0,
      'override_title_text' => '',
    );
    $pane->cache = array();
    $pane->style = array(
      'settings' => NULL,
    );
    $pane->css = array();
    $pane->extras = array();
    $pane->position = 1;
    $pane->locks = array();
    $pane->uuid = 'a4859ce2-3d30-41df-ba77-21cd531a5629';
    $display->content['new-a4859ce2-3d30-41df-ba77-21cd531a5629'] = $pane;
    $display->panels['center'][1] = 'new-a4859ce2-3d30-41df-ba77-21cd531a5629';

When you then load this on a new site the $pane->subtype field is used and the string exploded to return the NID (in this case it comes back with 2). This will not work as that NID has changed. This needs to work off the UUID of the node.

Any help would be great.

Comments

jweowu’s picture

Nodes don't have UUIDs.

Jaggi’s picture

Sorry the assumption was you were using the UUID module which does add the UUID field to a node.

jweowu’s picture

No, there's no dependency on the UUID module.

If that module is present (and if there's no better option) then panels (ctools, really) will use it for UUID generation and validation instead of loading its own functions; but it's not a requirement.

Jaggi’s picture

Well it is present but seems panels isn't using it for validation. The issue remains in that when using features in this specific case it fails unless you reimport then edit it and update the node it points to.

jweowu’s picture

I'm pretty sure that Panels has nothing to do with the problem.

I strongly suspect you'll find that when you create a webform block, it names it exactly as you're seeing in the export, using the node ID (and not unsurprisingly so).

You'll probably have an entry in your block table with that as the delta (or maybe split between the module and delta columns).

All panels is doing is using that data verbatim (which it needs to do).

Arguably this is an issue for Webform and/or Features to figure out. You may or may not be able to convince them that it is a problem that needs fixing -- after all, a fix would entail special behaviour when the UUID module is installed & enabled, without breaking things when it isn't -- but I suspect that's your best avenue.

(They might be interested in a patch if you wanted to tackle the problem yourself, though.)