Closed (fixed)
Project:
Custom Breadcrumbs
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2011 at 01:24 UTC
Updated:
29 Mar 2013 at 02:05 UTC
I used the Panels module to create a node template variant. I then created a custom breadcrumb to display with that variant. It displays just as I want it to.
But Drupal gives me this warning message when it uses the variant to show a node: Missing argument 7 for custom_breadcrumbs_panels_ctools_render_alter() in /Library/WebServer/Documents/drupal612/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module on line 104.
I looked at line 104 of custom_breadcrumbs_panels.module but I don't know PHP well enough to understand the code.
Here it is:
function custom_breadcrumbs_panels_ctools_render_alter($info, $page, $args, $contexts, $task, $subtask, $handler) {
// Don't really do anything with the panel. This is just a pretense to insert a breadcrumb.
static $module_weights = array();
if ($page) {
global $language;
$languages = array('language' => $language->language, 'all' => '');
// Check to see if the panel ID matches any custom_breadcrumb panel_id.
// First, try to find a match on panels variant id.
$id = $handler->name;
$breadcrumbs = custom_breadcrumbs_load_breadcrumbs('custom_breadcrumbs_panels', NULL, array('panel_id' => $id), $languages);
// If nothing matched, try matching on panels page id.
if (empty($breadcrumbs)) {
$id = $handler->task;
$breadcrumbs = custom_breadcrumbs_load_breadcrumbs('custom_breadcrumbs_panels', NULL, array('panel_id' => $id), $languages);
}
if (!empty($breadcrumbs)) {
if ($breadcrumb = custom_breadcrumbs_select_breadcrumb($breadcrumbs, array('panel' => $info))) {
$objs = array('panel' => $info);
foreach ($contexts as $context) {
if ($context->type == 'node') {
$objs['node'] = $context->data;
}
}
custom_breadcrumbs_set_breadcrumb($breadcrumb, $objs);
// Stop after a match has been found.
return;
}
}
}
Would someone please explain it to me? How can I make the warning disappear?
Comments
Comment #1
tangofan commentedI switched to 6.x-2.0-rc1 and the warning message no longer appears. But I don't know if that means that I should close this issue.
Comment #2
tangofan commented