Selection Rules in Task Handlers not working
| Project: | Panels |
| Version: | 6.x-3.0-beta1 |
| Component: | Display rendering |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Don't really understand the how in Panels,
but if you want to take over three different types of nodes: profile, gallery, personal gallery
Shouldn't the task handler allow you to create three different panel pages in lay-out and etc.
Just by setting the selection criteria of each to a specific node type?
Doing so, the panel with the most weight, which is always sorted by alphabet (no matter how I arrange it),
dominates parts of the other panels. In fact, the other panels loose their views, and their title.
In my case, Profile gets overwritten by the title for Gallery. It even uses the placeholders for the taxonomy terms only related when viewing the Gallery. The entire left pane is empty, no avatar or other user stuff pushed in panels from views blocks or panes. The only thing left from the real profile page, is the display of the node itself.
I really don't have the skill to perform this level of debug. Unfortunately I already lost the weekend with this upgrade, and I really need to get this website moving forward. Why does panels3 look way more tempting to work with than its predecessor.
;-)
thx

#1
It sounds like you are doing the right thing and something is not working right. Sorry about that, I did warn that I think there are some nasty bugs left in here.
Can you export all 3 of your task handlers and paste them here? That might give me some insight into what's wrong here.
#2
I think it goes wrong while saving under certain conditions.
I restarted everything, emptying each cache table I could lay my hands on, deleting each task handler.
Everything worked like it should. Thus it may look like having something to do with the upgrade from panels2.
However I restarted some panels from scratch before, and that didn't work. In any case, it's probably best to recreate all panels from scratch after upgrading. I guess now this to be the reason and the rules selection appears to do its job properly.
This said,
There stills seems to be a problem, and I believe it be while saving a panel. While correcting some bits here and there, the last added page went grazy, loading stuff from the first panel created (weight=0). This was right after I added the extra css, I used in panels2. Since the same css applies to profile and its pictures, I just copied and went on to the next.
I deleted the latter, recreated from scratch and now it all works fine.
Another strange thing I stumbled upon, was the combination with module custom breadcrumbs. Since this module didn't work under panels2, I used little php snippets to set the breadcrumb per panel page. When recreating the gallery page, it started using the custom breadcrumb. Thinking panels3 could work alongside the other, I tried the same with the profile page, but no go.
In the end, moving the pane with the php snippet from the bottom to the top, did make it work.
Sorry for the long, lasting description... I just can't pinpoint a single problem here, but guessing the way a panel gets saved may explain some of the occurences.
As requested (these do work, for now)
Profile task handler
$handler = new stdClass;
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'node_view_panel_context';
$handler->task = 'node_view';
$handler->subtask = '';
$handler->handler = 'panel_context';
$handler->weight = 0;
$handler->conf = array(
'autogenerate_title' => TRUE,
'title' => 'Panel: Node being viewed can be type "Profiel"',
'no_blocks' => 0,
'css_id' => '',
'css' => 'div.field-field-avatar, div.admin-links ul.links, h1.title {
display:none;
}
div.view-display-id-panel_pane_1 .views-field-field-avatar-fid, div.view-display-id-panel_pane_1 .view-empty, #albumlist .view-content{
text-align:center;
}
div #content-content {
clear:left;
}
#profielfoto div.content {
border:none;
}
#profielfotofoot div.content {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #d6ddb9;
}
#albumlist .views-field-field-user-pics-fid,
#albumlist .views-field-field-gallerijpics-fid {
float:left;
}
#albumlist .views-field-field-gallerijpics-fid {
margin: 2px 0px 2px;
}
#albumlist h2.title
{
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #d6ddb9;
display:block;
clear:both;
}
#albumlist h2.title a
{
display:block;
clear:both;
}
div.view-mijn-fotoalbums div.view-content{
display:block;
width:250px;
margin:4px auto;
}',
'css_cache_file' => '',
'contexts' => array(),
'relationships' => array(
'0' => array(
'context' => 'argument_nid_1',
'name' => 'user_from_node',
'id' => 2,
'identifier' => 'Node author 2',
'keyword' => 'user',
),
),
'access' => array(
'plugins' => array(
'0' => array(
'name' => 'node_type',
'settings' => array(
'type' => array(
'profile' => 'profile',
),
),
'context' => 'argument_nid_1',
),
),
'logic' => 'and',
),
);
$display = new panels_display;
$display->layout = 'twocol_stacked';
$display->layout_settings = array();
$display->panel_settings = array();
$display->cache = array();
$display->title = '%user';
$display->hide_title = FALSE;
$display->content = array();
$display->panels = array();
$pane = new stdClass;
$pane->pid = 'new-1';
$pane->panel = 'bottom';
$pane->type = 'custom';
$pane->subtype = 'custom';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'title' => '',
'body' => '
<?php
$node=node_load(arg(1));
$myuid=$node->uid;
$node=content_profile_load(profile, $myuid);
// $profileid=$node->nid;
$auth = user_load($myuid);
$breadcrumb[] = l(Home, null);
$breadcrumb[] .= l(Gebruikerslijst, profiel);
$breadcrumb[] .= l($auth->name, $node->path);
drupal_set_breadcrumb($breadcrumb);
?>
'format' => '3',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-1'] = $pane;
$display->panels['bottom'][0] = 'new-1';
$pane = new stdClass;
$pane->pid = 'new-2';
$pane->panel = 'left';
$pane->type = 'views';
$pane->subtype = 'Avatar';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '10',
'pager_id' => '1',
'use_pager' => 0,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'panel_pane_1',
'context' => array(
'0' => 'argument_nid_1.nid',
),
'override_title' => 1,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-2'] = $pane;
$display->panels['left'][0] = 'new-2';
$pane = new stdClass;
$pane->pid = 'new-3';
$pane->panel = 'left';
$pane->type = 'views';
$pane->subtype = 'mijn_profielfotos';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '10',
'pager_id' => '1',
'use_pager' => 0,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'block_1',
'context' => array(
'0' => 'argument_nid_1.uid',
),
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'profielfoto',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 1;
$display->content['new-3'] = $pane;
$display->panels['left'][1] = 'new-3';
$pane = new stdClass;
$pane->pid = 'new-4';
$pane->panel = 'left';
$pane->type = 'views';
$pane->subtype = 'mijn_fotoalbums';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '10',
'pager_id' => '1',
'use_pager' => 0,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 1,
'args' => '',
'url' => '',
'display' => 'block_1',
'context' => array(
'0' => 'argument_nid_1.uid',
),
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'albumlist',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 2;
$display->content['new-4'] = $pane;
$display->panels['left'][2] = 'new-4';
$pane = new stdClass;
$pane->pid = 'new-5';
$pane->panel = 'right';
$pane->type = 'node_content';
$pane->subtype = 'node_content';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'links' => 0,
'page' => 0,
'no_extras' => 0,
'override_title' => 0,
'override_title_text' => '',
'teaser' => 0,
'identifier' => '',
'link' => 0,
'leave_node_title' => 0,
'context' => 'argument_nid_1',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-5'] = $pane;
$display->panels['right'][0] = 'new-5';
$handler->conf['display'] = $display;
gallery handler
$handler = new stdClass;
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'node_view_panel_context_2';
$handler->task = 'node_view';
$handler->subtask = '';
$handler->handler = 'panel_context';
$handler->weight = 1;
$handler->conf = array(
'autogenerate_title' => TRUE,
'title' => 'Panel: Node being viewed can be type "Fotogallerij"',
'no_blocks' => 0,
'css_id' => '',
'css' => 'div.admin-links ul.links { display:none; }
#gallerij_info h2.title { display:none; }
#gallerij_info fieldset { margin-top: 0px; }
#gallerij_view tbody { border:none; }',
'css_cache_file' => '',
'contexts' => array(),
'relationships' => array(
'0' => array(
'context' => 'argument_nid_1',
'name' => 'term_from_node',
'id' => 2,
'identifier' => 'Term from node 2',
'keyword' => 'schooljaar',
'relationship_settings' => array(
'vid' => '4',
),
),
'1' => array(
'context' => 'argument_nid_1',
'name' => 'term_from_node',
'id' => 4,
'identifier' => 'Term from node 4',
'keyword' => 'klas',
'relationship_settings' => array(
'vid' => '5',
),
),
),
'access' => array(
'plugins' => array(
'0' => array(
'name' => 'node_type',
'settings' => array(
'type' => array(
'fotogallerij' => 'fotogallerij',
),
),
'context' => 'argument_nid_1',
),
),
'logic' => 'and',
),
);
$display = new panels_display;
$display->layout = 'twocol_stacked';
$display->layout_settings = array();
$display->panel_settings = array();
$display->cache = array();
$display->title = '%node (%klas %schooljaar)';
$display->hide_title = FALSE;
$display->content = array();
$display->panels = array();
$pane = new stdClass;
$pane->pid = 'new-1';
$pane->panel = 'left';
$pane->type = 'views';
$pane->subtype = 'fotogallerij';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '12',
'pager_id' => '1',
'use_pager' => 1,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'panel_pane_1',
'context' => array(
'0' => 'argument_nid_1.nid',
),
'override_title' => 1,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'gallerij_view',
'css_class' => '',
);
$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_content';
$pane->subtype = 'node_content';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'links' => 0,
'page' => 1,
'no_extras' => 0,
'override_title' => 1,
'override_title_text' => '',
'teaser' => 0,
'identifier' => '',
'link' => 0,
'leave_node_title' => 0,
'context' => 'argument_nid_1',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'gallerij_info',
'css_class' => '',
);
$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 = 'custom';
$pane->subtype = 'custom';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'title' => '',
'body' => '
<?php
$node=node_load(arg(1));
$breadcrumb[] = l(Home, null);
$breadcrumb[] .= l(Albums, albums);
$termid1 = check_plain($node->field_schooljaar[0][value]);
$term1 = $node->taxonomy[$termid1];
$breadcrumb[] .= l($term1->name, albums/.$term1->name./all);
$termid2 = check_plain($node->field_klas[0][value]);
$term2 = $node->taxonomy[$termid2];
$breadcrumb[] .= l($term2->name, albums/.$term1->name./.$term2->name);
$breadcrumb[] .= l($node->title, $node->path);
drupal_set_breadcrumb($breadcrumb);
?>
'format' => '3',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-3'] = $pane;
$display->panels['top'][0] = 'new-3';
$handler->conf['display'] = $display;
profile pics handler
$handler = new stdClass;
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'node_view_panel_context_3';
$handler->task = 'node_view';
$handler->subtask = '';
$handler->handler = 'panel_context';
$handler->weight = 2;
$handler->conf = array(
'autogenerate_title' => TRUE,
'title' => 'Panel: Node being viewed can be type "Profiel Foto's"',
'no_blocks' => 0,
'css_id' => '',
'css' => 'div.field-field-avatar, div.admin-links ul.links, h1.title {
display:none;
}
div.view-display-id-panel_pane_1 .views-field-field-avatar-fid, div.view-display-id-panel_pane_1 .view-empty {
text-align:center;
}
div #content-content {
clear:left;
}
#profielfoto div.content {
border:none;
}
#profielfotofoot div.content {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #d6ddb9;
}',
'css_cache_file' => '',
'contexts' => array(),
'relationships' => array(),
'access' => array(
'plugins' => array(
'0' => array(
'name' => 'node_type',
'settings' => array(
'type' => array(
'profilepics' => 'profilepics',
),
),
'context' => 'argument_nid_1',
),
),
'logic' => 'and',
),
);
$display = new panels_display;
$display->layout = 'onecol';
$display->layout_settings = array();
$display->panel_settings = array();
$display->cache = array();
$display->title = '';
$display->hide_title = FALSE;
$display->content = array();
$display->panels = array();
$pane = new stdClass;
$pane->pid = 'new-1';
$pane->panel = 'middle';
$pane->type = 'views';
$pane->subtype = 'Avatar';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '10',
'pager_id' => '1',
'use_pager' => 0,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'panel_pane_1',
'context' => array(
'0' => 'argument_nid_1.uid',
),
'override_title' => 1,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$display->content['new-1'] = $pane;
$display->panels['middle'][0] = 'new-1';
$pane = new stdClass;
$pane->pid = 'new-2';
$pane->panel = 'middle';
$pane->type = 'views';
$pane->subtype = 'mijn_profielfotos';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'nodes_per_page' => '10',
'pager_id' => '1',
'use_pager' => 0,
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'block_1',
'context' => array(
'0' => 'argument_nid_1.uid',
),
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'profielfoto',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 1;
$display->content['new-2'] = $pane;
$display->panels['middle'][1] = 'new-2';
$pane = new stdClass;
$pane->pid = 'new-3';
$pane->panel = 'middle';
$pane->type = 'custom';
$pane->subtype = 'custom';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'title' => '',
'body' => '
<?php
$node=node_load(arg(1));
$myuid=$node->uid;
$mynode=content_profile_load(profile, $myuid);
// $profileid=$node->nid;
$auth = user_load($myuid);
$content = <br/><a href="\';
$content .= base_path().$mynode->path;
$content .= \'"><h3>Bekijk mijn profiel!</h3></a>;
$content .= <br/><a href="\';
$content .= base_path().\'profiel/albums/\'.$myuid;
$content .= \'"><h3>Bekijk al mijn fotoalbums.</h3></a>;
echo $content;
$breadcrumb[] = l(Home, null);
$breadcrumb[] .= l(Gebruikerslijst, profiel);
$breadcrumb[] .= l($auth->name, $mynode->path);
$breadcrumb[] .= l(ucfirst($auth->name). in beeld,$node->path);
drupal_set_breadcrumb($breadcrumb);
?>
'format' => '3',
);
$pane->cache = array();
$pane->style = array();
$pane->css = array(
'css_id' => 'profielfotofoot',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 2;
$display->content['new-3'] = $pane;
$display->panels['middle'][2] = 'new-3';
$handler->conf['display'] = $display;
#3
How can I delete a Task handler ? It doesn't work in the 3.0 beta 1 version ? Nothing happen when I try to delete one.
#4
tommytom, you may have to do it directly via the DB.. i don't remember the table off hand but i remember not being able to find it in "panels" tables but under delegator or something else, maybe ctools.
#5
Thanks, I deleted the handler in the DB
#6
Hmm. I've tried reproducing some of these problems but I haven't managed it yet. Something quirky going on, clearly.
#7
Hi there Tommytom
can you tell me which table is it in the db to delete the task handler?
I have created an unfinished "user view" task handler and now it won't let me do any operations at all, no editing, no export and no delete...
many thanks
#8
Is this the same as http://drupal.org/node/455870 -- I bet it is, and the reason this is failing is that something is broken in the panel after upgrade. The work around seems to be export, delete and reimport.
#9
This is not the same as #455870: Visibility Rules not Saved after upgrade from 6.x-3.0-beta1; re-import required
Also, tommytom's #3 is unrelated, so please stop responding to him in this issue. He had a problem and was taking over other issues trying to get a response.
THe original poster seems to have resolved the issues. I'm not sure where things were actually broken. Upgrade fun. :/
#10
Automatically closed -- issue fixed for 2 weeks with no activity.