diff --git a/delegator/plugins/tasks/page.inc b/delegator/plugins/tasks/page.inc index d40f030d7a652009a77670d6501d49a938c32c3c..774d18c4899370d10bd364a0a835b708e9538e39 100644 --- a/delegator/plugins/tasks/page.inc +++ b/delegator/plugins/tasks/page.inc @@ -306,15 +306,17 @@ function delegator_page_execute($subtask_id) { $names = delegator_page_get_named_arguments($page->path); $bits = explode('/', $page->path); - foreach ($page->arguments as $name => $argument) { - // Optional arguments must be converted to contexts too, if they exist. - if ($bits[$names[$name]][0] == '!' && isset($args[$count])) { - $argument['keyword'] = $name; - ctools_include('context'); - $context = ctools_context_get_context_from_argument($argument, $args[$count]); - $contexts[$context->id] = $context; + if ($page->arguments) { + foreach ($page->arguments as $name => $argument) { + // Optional arguments must be converted to contexts too, if they exist. + if ($bits[$names[$name]][0] == '!' && isset($args[$count])) { + $argument['keyword'] = $name; + ctools_include('context'); + $context = ctools_context_get_context_from_argument($argument, $args[$count]); + $contexts[$context->id] = $context; + } + $count++; } - $count++; } if ($function = ctools_plugin_get_function($task, 'page callback')) { diff --git a/includes/content.inc b/includes/content.inc index 0f2d85e1ab9f76b20bc6d25632bb1f788316ca1c..6a4f47e0495c601b5d3d44c3095c485f9a9cd0aa 100644 --- a/includes/content.inc +++ b/includes/content.inc @@ -282,7 +282,7 @@ function ctools_content_render($type, $subtype, $conf, $keywords = array(), $arg if (!empty($content->title)) { // Perform substitutions - if (!empty($keywords) || !empty($contexts)) { + if (!empty($keywords) || !empty($context)) { $content->title = ctools_context_keyword_substitute($content->title, $keywords, $context); } diff --git a/plugins/content_types/block/block.inc b/plugins/content_types/block/block.inc index 92af4fe99dc7423decc6f3880e11ba4ddbd52092..e44c4ccea7198d187db0731a69cd95aed733fcc3 100644 --- a/plugins/content_types/block/block.inc +++ b/plugins/content_types/block/block.inc @@ -66,10 +66,14 @@ function ctools_block_content_type_content_types() { function ctools_block_content_type_render($subtype, $conf) { list($module, $delta) = _ctools_block_get_module_delta($subtype, $conf); $block = (object) module_invoke($module, 'block', 'view', $delta); + if (empty($block)) { return; } + $block->module = $module; + $block->delta = $delta; + if (isset($block->subject)) { $block->title = $block->subject; } diff --git a/views_content/plugins/content_types/views.inc b/views_content/plugins/content_types/views.inc index 6da2c32865ab2d24fe34c6ec6f86f2fe1656f75e..40cfb9edcd7bb7b239458737c06ffb43e24ecc95 100644 --- a/views_content/plugins/content_types/views.inc +++ b/views_content/plugins/content_types/views.inc @@ -59,7 +59,7 @@ function views_content_views_content_type_content_types($plugin) { $views = views_get_all_views(); foreach ($views as $view) { - if (!empty($view->disabled)) { + if (empty($view->disabled)) { $types[$view->name] = _views_content_views_content_type($view); } }