Sulu: Sections doesn't work inside blocks

Created on 3 Feb 2020  路  4Comments  路  Source: sulu/sulu

| Q | A
| --- | ---
| Sulu Version | 2.0.3, dev-master
| Browser Version | -

Actual Behavior

Section inside blocks currently crash on 2.0.3 on the frontend and on dev-master in the SchemaMetadata.

dev-master

Argument 1 passed to Sulu\Bundle\AdminBundle\Metadata\SchemaMetadata\SchemaMetadata::Sulu\Bundle\AdminBundle\Metadata\SchemaMetadata{closure}() must be an instance of Sulu\Bundle\AdminBundle\Metadata\SchemaMetadata\PropertyMetadata, array given

2.0.3

uncaught exception: Object

Properties not rendered.

Expected Behavior

Section should work also inside blocks. They are needed to control the grid better or structure the block content.

Steps to Reproduce

        <block name="mytestblocks" default-type="my-test-type">
            <types>
                <type name="my-test-type">
                    <properties>
                        <section name="section1">
                            <properties>
                                <property name="test1" type="text_line" colspan="4">
                                    <meta>
                                        <title>Test1</title>
                                    </meta>
                                </property>

                                <property name="test2" type="text_editor" colspan="4">
                                    <meta>
                                        <title>Test2</title>
                                    </meta>
                                </property>

                                <property name="test3" type="text_line" colspan="4">
                                    <meta>
                                        <title>Test3</title>
                                    </meta>
                                </property>
                            </properties>
                        </section>

                        <section name="section2">
                            <properties>
                                <property name="test4" type="text_line" colspan="4">
                                    <meta>
                                        <title>Test4</title>
                                    </meta>
                                </property>

                                <property name="test5" type="text_editor" colspan="4">
                                    <meta>
                                        <title>Test5</title>
                                    </meta>
                                </property>

                                <property name="test6" type="text_line" colspan="4">
                                    <meta>
                                        <title>Test6</title>
                                    </meta>
                                </property>
                            </properties>
                        </section>
                    </properties>
                </type>
            </types>
        </block>

Possible Solutions

If you have already ideas how to solve the issue, add them here.
(remove this section if not needed)

Bug

Most helpful comment

This would be really nice to have

It allows:

  • actual content config re-use for inside and outside of blocks
  • have visual structure based on sections inside block types (which can be just as big of content configs as outside of block usage)
  • it would be consistent with documentation (properties inside section inside properties)

All 4 comments

@alexander-schranz We decided to use the assignee when somebody really starts working on something. All of us have almost historic issues assigned, and we still don't feel responsible for them, therefore I would rather use the assignee option this way.

Can confirm the bug persists in 2.1.0 :/

This would be really nice to have

It allows:

  • actual content config re-use for inside and outside of blocks
  • have visual structure based on sections inside block types (which can be just as big of content configs as outside of block usage)
  • it would be consistent with documentation (properties inside section inside properties)

Fixed in #5618

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kfrohwein picture kfrohwein  路  7Comments

alexander-schranz picture alexander-schranz  路  4Comments

lightglitch picture lightglitch  路  11Comments

alexander-schranz picture alexander-schranz  路  3Comments

Edvinas9 picture Edvinas9  路  6Comments