I'm building an event site. A view is displaying the schedule with speakers. Those speakers name are appearing as link which will at clicking will trigger a modal frame in which my custome page will be displayed.

Basically I have a content type speaker and at http://mysite/node/nid/modal my custom page is displayed.

Speaker = { Title for the name, Body for the Bio, Position in company, company name }

Everything works. (Good) but not the preview.

Here is the exported code of the custom page.

$page = new stdClass;
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
$page->api_version = 1;
$page->name = 'speaker_in_modal';
$page->task = 'page';
$page->admin_title = 'Speaker in modal frame';
$page->admin_description = '';
$page->path = 'node/%node/modal';
$page->access = array();
$page->menu = array();
$page->arguments = array(
  'node' => array(
    'id' => 1,
    'identifier' => 'Node: ID',
    'name' => 'nid',
    'settings' => array(),
  ),
);
$page->conf = array();
$page->default_handlers = array();
$handler = new stdClass;
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'page_speaker_in_modal_panel_context';
$handler->task = 'page';
$handler->subtask = 'speaker_in_modal';
$handler->handler = 'panel_context';
$handler->weight = 0;
$handler->conf = array(
  'title' => 'Layout for Speaker ID card in modal',
  'no_blocks' => 1,
  'pipeline' => 'standard',
  'css_id' => '',
  'css' => '',
  'contexts' => array(),
  'relationships' => array(),
  'access' => array(
    'plugins' => array(
      0 => array(
        'name' => 'node_type',
        'settings' => array(
          'type' => array(
            'speaker' => 'speaker',
          ),
        ),
        'context' => 'argument_nid_1',
        'not' => FALSE,
      ),
    ),
    'logic' => 'and',
  ),
);
$display = new panels_display;
$display->layout = 'twocol_stacked';
$display->layout_settings = array();
$display->panel_settings = array(
  'style_settings' => array(
    'default' => NULL,
    'top' => NULL,
    'left' => NULL,
    'right' => NULL,
    'bottom' => NULL,
  ),
);
$display->cache = array();
$display->title = '';
$display->content = array();
$display->panels = array();
  $pane = new stdClass;
  $pane->pid = 'new-1';
  $pane->panel = 'left';
  $pane->type = 'content_field';
  $pane->subtype = 'field_photo';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'label' => 'normal',
    'formatter' => '256width_default',
    'context' => 'argument_nid_1',
    'override_title' => 0,
    'override_title_text' => '',
  );
  $pane->cache = array();
  $pane->style = array(
    'settings' => NULL,
  );
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 0;
  $display->content['new-1'] = $pane;
  $display->panels['left'][0] = 'new-1';
  $pane = new stdClass;
  $pane->pid = 'new-2';
  $pane->panel = 'right';
  $pane->type = 'node_body';
  $pane->subtype = 'node_body';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'context' => 'argument_nid_1',
    'override_title' => 1,
    'override_title_text' => 'Bio',
  );
  $pane->cache = array();
  $pane->style = array(
    'settings' => NULL,
  );
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 0;
  $display->content['new-2'] = $pane;
  $display->panels['right'][0] = 'new-2';
  $pane = new stdClass;
  $pane->pid = 'new-3';
  $pane->panel = 'top';
  $pane->type = 'node_title';
  $pane->subtype = 'node_title';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'link' => 0,
    'context' => 'argument_nid_1',
    'override_title' => 0,
    'override_title_text' => '',
  );
  $pane->cache = array();
  $pane->style = array(
    'settings' => NULL,
    'style' => 'skinr',
  );
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 0;
  $display->content['new-3'] = $pane;
  $display->panels['top'][0] = 'new-3';
  $pane = new stdClass;
  $pane->pid = 'new-4';
  $pane->panel = 'top';
  $pane->type = 'content_field';
  $pane->subtype = 'field_organization';
  $pane->shown = TRUE;
  $pane->access = array();
  $pane->configuration = array(
    'label' => 'normal',
    'formatter' => 'default',
    'context' => 'argument_nid_1',
    'override_title' => 0,
    'override_title_text' => '',
  );
  $pane->cache = array();
  $pane->style = array(
    'settings' => NULL,
    'style' => 'default',
  );
  $pane->css = array();
  $pane->extras = array();
  $pane->position = 1;
  $display->content['new-4'] = $pane;
  $display->panels['top'][1] = 'new-4';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = 'new-3';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;

Please if you need precisions, reply, I will answer.

Comments

El Bandito’s picture

Hi

Seeing this as well with 6.x-3.9. The node template is working properly but the preview page from within the Panels admin page ( /admin/build/pages/nojs/operation/node_view/handlers/node_view_panel_context/preview ) is empty. Not critical butcertainly confusing for a Panels newbie.

Cheers

El B

Letharion’s picture

Assigned: Unassigned » merlinofchaos

@merlinofchaos
How is the node_view intended to work here? I notice that a custom content pane, that has static content, works fine in preview, while node specific data doesn't show up. I'm guessing the reason for this is that we don't have a node context in preview, unlike a "real" rendering. I never use preview, so I haven't noticed this before, but shouldn't the preview have a Views-like text-field for inputting context-data?

merlinofchaos’s picture

It is, indeed, supposed to have a widget for this. Previews have been kind of broken for awhile actually, and I have never quite gotten to figure out WTF I did to break them.

Silicon.Valet’s picture

As part of an active project, we've attempted to repair preview functionality. The most clear issue found was that the context form was missing for the entity system.

See issue with patch here https://www.drupal.org/node/2319515

Related patch https://www.drupal.org/node/2319517 allows you to specify theme.

damienmckenna’s picture

The issues that Silicon.Valet referenced include patches for D7, someone would have to backport the fixes for D6.

japerry’s picture

Status: Active » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)