Error message
Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords() (line 474 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords() (Line: 428)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage() (Line: 394)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple() (Line: 312)
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 262)
Drupal\Core\Entity\EntityStorageBase->load() (Line: 503)
Drupal\Core\Entity\EntityBase::load() (Line: 316)
Drupal\api\Entity\Project::getBySlug() (Line: 115)
Drupal\api\Controller\OutputController->getProject() (Line: 733)
Drupal\api\Controller\OutputController->detailPageTypeRoute()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 201)
Drupal\page_cache\StackMiddleware\PageCache->fetch() (Line: 138)
Drupal\page_cache\StackMiddleware\PageCache->lookup() (Line: 87)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
function ctools_context_create_node
It's important to remember that $conf is optional here, because contexts
are not always created from the UI.
1 string reference to 'ctools_context_create_node'
- node.inc in plugins/contexts/node.inc
- Plugin to provide a node context. A node context is a node wrapped in a
context object that can be utilized by anything that accepts contexts.
File
-
plugins/contexts/node.inc, line 37
Code
function ctools_context_create_node($empty, $data = NULL, $conf = FALSE) {
$context = new ctools_context('node');
$context->plugin = 'node';
if ($empty) {
return $context;
}
if ($conf) {
$nid = is_array($data) && isset($data['nid']) ? $data['nid'] : (is_object($data) ? $data->nid : 0);
if (module_exists('translation')) {
if ($translation = module_invoke('translation', 'node_nid', $nid, $GLOBALS['language']->language)) {
$nid = $translation;
$reload = TRUE;
}
}
if (is_array($data) || !empty($reload)) {
$data = node_load($nid);
}
}
if (!empty($data)) {
$context->data = $data;
$context->title = $data->title;
$context->argument = $data->nid;
$context->restrictions['type'] = array(
$data->type,
);
return $context;
}
}