Problem/Motivation
When creating a page with a "Full Page Variant" I get the following fatal error:
Recoverable fatal error: Argument 1 passed to Drupal\system\Plugin\Block\SystemMainBlock::setMainContent() must be of the type array, null given, called in core/modules/block/src/Plugin/DisplayVariant/FullPageVariant.php on line 111 and defined in Drupal\system\Plugin\Block\SystemMainBlock->setMainContent() (line 34 of core/modules/system/src/Plugin/Block/SystemMainBlock.php).
Drupal\system\Plugin\Block\SystemMainBlock->setMainContent(NULL)
Drupal\block\Plugin\DisplayVariant\FullPageVariant->build()
Drupal\page_manager\Entity\PageViewBuilder->view(Object, 'full', NULL)
Drupal\Core\Entity\Controller\EntityViewController->view(Object, 'full', NULL)
call_user_func_array(Array, Array)
Drupal\Core\Controller\HtmlPageController->getContentResult(Object, '\Drupal\Core\Entity\Controller\EntityViewController::view')
Drupal\Core\Controller\HtmlPageController->content(Object, '\Drupal\Core\Entity\Controller\EntityViewController::view')
call_user_func_array(Array, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
The code was introduced in: https://www.drupal.org/node/2363025
Steps to Reproduce
- Go to http://localhost/d8/admin/structure/page_manager and add a new page with any path
- Add new display variant of type "Full Page".
- Visit page and see fatal error.
Proposed resolution
?
Remaining tasks
Find out what the actual problem is.
User interface changes
n/a
API changes
n/a
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2371841-fullpage-2.patch | 1.55 KB | tim.plunkett |
| #1 | 2371841-fullpage-1-PASS.patch | 1.44 KB | tim.plunkett |
| #1 | 2371841-fullpage-1-FAIL.patch | 917 bytes | tim.plunkett |
Comments
Comment #1
tim.plunkettNice find. This is easily reproduced in page_manager, but is actually a core bug.
Comment #2
tim.plunkettNow with a docblock on the test.
Comment #3
benjy commentedEasy fix, thanks.
Comment #5
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 57b2e4f and pushed to 8.0.x. Thanks!