Details
-
Bug
-
Resolution: Fixed
-
High
-
3.2.4, 3.3.1
-
None
Description
Steps to reproduce:
- Clean installation of Ibexa DXP.
- Create 2 or 3 Contents under main Ibexa Platform Content.
- Create the following pagelayout.html.twig file under themes/standard, example:
<!doctype html> <html lang="{{ app.request.locale|replace({'_': '-'}) }}"> <head> <link rel="icon" type="image/x-icon" href="{{ asset('bundles/ezplatformadminui/img/favicon.ico') }}" /> <meta charset="utf-8"> {% if content is defined and title is not defined %} {% set title = ez_content_name( content ) %} {% endif %} <title>{{ title|default( 'Home' ) }}</title> <meta name="generator" content="eZ Platform"/> {% block stylesheets %} {{ encore_entry_link_tags('app_styles') }} {% endblock %} </head> <body> {% block content %} {% endblock %} {{ render_esi(controller("App\\Controller\\DefaultController::index")) }} {% block javascripts %} {{ encore_entry_script_tags('app_js') }} {% endblock %} </body> </html>
Include it in ezplatform.yaml file:
site: languages: [eng-GB] pagelayout: themes/standard/pagelayout.html.twig
- Edit routes.yaml file:
index: path: / controller: App\Controller\DefaultController::index
- Create DefaultController in src/Controller folder:
<?php namespace App\Controller; use eZ\Publish\API\Repository\ContentService; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; class DefaultController extends AbstractController { private $contentService; public function __construct(ContentService $contentService) { $this->contentService = $contentService; } public function index(): Response { $content = $this->contentService->loadContent(42); return $this->render('index.html.twig', ['content' => $content]); } }
- Create index.html.twig and place it under templates folder. Insert the following code (Ids of Content should be taken out of newly created Content in step 2):
{{ render(controller('ez_content:viewAction', {contentId: 56, viewType: 'line', params:{ css_class:'category-capital' } } )) }} {{ render(controller('ez_content:viewAction', {contentId: 42, viewType: 'line', params:{ css_class:'category-primary' } } )) }} {{ render(controller('ez_content:viewAction', {contentId: 52, viewType: 'line', params:{ css_class:'category-secondary' } } )) }}
- Observe Network tab for example in Chrome browser when going to any Content's page - specifically watch Response headers.
Result:
Tags related to 3 Contents rendered by ez_content:viewAction don't appear in xkey header.
Expected result:
Tags related to 3 Contents rendered by ez_content:viewAction appear in xkey header.
Note:
This issue doesn't occur on v2.5.
Seems like the problem occurs when we are trying to render root Content (ID = 52). It deletes tags of previously rendered Content (so 2 previously defined + own tags).