Sulu: Nested Blocks does not show sulu.block_preview

Created on 26 Nov 2020  路  2Comments  路  Source: sulu/sulu

| Q | A
| --- | ---
| Sulu Version | 2.1 / #0c7e121
| Browser Version | irrelevant

Actual Behavior

The defined block preview (via sulu.block_preview) is not visible when using nested blocks.

Screenshot 2020-11-26 at 11 33 48

Expected Behavior

The defined block preview should be visible.

Steps to Reproduce

Use this example page config to reproduce easily:

<?xml version="1.0" ?>
<template xmlns="http://schemas.sulu.io/template/template"
          xmlns:xi="http://www.w3.org/2001/XInclude"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">

    <key>testing</key>

    <view>pages/testing</view>
    <controller>App\Controller\Website\PageController::indexAction</controller>
    <cacheLifetime>604800</cacheLifetime>

    <meta>
        <title lang="en">testing</title>
    </meta>

    <properties>

        <section name="basicDetails">
            <meta>
                <title lang="en">Page Basics</title>
            </meta>

            <properties>

                <property name="title" type="text_line"
                          mandatory="true"
                >
                    <meta>
                        <title lang="en">Title</title>
                    </meta>
                    <params>
                        <param name="headline" value="true"/>
                    </params>

                    <tag name="sulu.rlp.part"/>
                </property>

                <property name="url" type="resource_locator"
                          mandatory="true"
                >
                    <meta>
                        <title lang="en">Resourcelocator</title>
                    </meta>

                    <tag name="sulu.rlp"/>
                </property>

            </properties>
        </section>

        <section name="contentDetails">
            <meta>
                <title lang="en">Page Content</title>
            </meta>

            <properties>

                <block name="block_content" default-type="block_text_default"
                >
                    <meta>
                        <title lang="en">Content modules</title>
                    </meta>
                    <types>

                        <type name="block_text_default">
                            <meta>
                                <title lang="en">Text Module</title>
                            </meta>

                            <properties>

                                <section name="contentDetails">
                                    <meta>
                                        <title lang="en">Base Settings</title>
                                    </meta>

                                    <properties>

                                        <property name="article_headline" type="text_line"
                                                  multilingual="true"
                                                  mandatory="false"
                                        >
                                            <meta>
                                                <title lang="en">Intro Title</title>

                                                <info_text lang="en">Intro Title for the text</info_text>
                                            </meta>

                                            <tag name="sulu.block_preview" priority="512"/>

                                        </property>

                                        <property name="article_subline" type="text_line"
                                                  multilingual="true"
                                                  mandatory="false"
                                        >
                                            <meta>
                                                <title lang="en">Intro Subtitle</title>

                                                <info_text lang="en">Intro Subtitle for the text</info_text>
                                            </meta>
                                        </property>

                                        <property name="article" type="text_editor"
                                                  multilingual="true"
                                                  mandatory="true">
                                            <meta>
                                                <title lang="en">Text</title>

                                                <info_text lang="en">Content via TextEditor</info_text>
                                            </meta>
                                        </property>

                                    </properties>
                                </section>

                            </properties>
                        </type>

                    </types>
                </block>
            </properties>
        </section>

    </properties>
</template>

Possible Solutions

Probably related to https://github.com/sulu/sulu/pull/5628

Bug

Most helpful comment

@Prokyonn yes you were right, i updated to latest commit but did not rebuild the admin. Sorry for that. Closing the issue 馃挴

All 2 comments

This works for me with your example on sulu 2.1 #0c7e121
image

Could it be that your admin build is not up to date?

@Prokyonn yes you were right, i updated to latest commit but did not rebuild the admin. Sorry for that. Closing the issue 馃挴

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mtnorthrop picture mtnorthrop  路  6Comments

Edvinas9 picture Edvinas9  路  6Comments

alexander-schranz picture alexander-schranz  路  4Comments

alexander-schranz picture alexander-schranz  路  4Comments

Quehnie picture Quehnie  路  9Comments