diff --git a/core/modules/book/book.routing.yml b/core/modules/book/book.routing.yml index 69ba077..bf6f170 100644 --- a/core/modules/book/book.routing.yml +++ b/core/modules/book/book.routing.yml @@ -22,7 +22,7 @@ book_settings: book_export: pattern: '/book/export/{type}/{node}' defaults: - _content: '\Drupal\book\Controller\BookController::bookExport' + _controller: '\Drupal\book\Controller\BookController::bookExport' options: _access_mode: 'ALL' requirements: diff --git a/core/modules/book/lib/Drupal/book/Controller/BookController.php b/core/modules/book/lib/Drupal/book/Controller/BookController.php index 63ab802..ecede91 100644 --- a/core/modules/book/lib/Drupal/book/Controller/BookController.php +++ b/core/modules/book/lib/Drupal/book/Controller/BookController.php @@ -13,6 +13,7 @@ use Drupal\node\NodeInterface; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -142,7 +143,7 @@ public function bookExport($type, NodeInterface $node) { throw new NotFoundHttpException(); } - return $this->bookExport->{$method}($node); + return new Response(drupal_render($this->bookExport->{$method}($node))); } }