sulu / SuluHeadlessBundle

Bundle that provides controllers and services for using Sulu as headless content management system
MIT License
47 stars 25 forks source link

Smart content properties mapping should not fail with not exist property #53

Closed alexander-schranz closed 3 years ago

alexander-schranz commented 4 years ago

Not all templates have the same properties but sometimes you need to load a property in smart content which could maybe not exist in all. Currently the headless bundle fail if a property is configured in pages smart content which does not exist in all templates e.g.:

<property name="pages" type="smart_content">
    <params name="properties" type="collection">
          <param name="name" value="name" />
    </params>
</property>

Failing line:

https://github.com/sulu/SuluHeadlessBundle/blob/1bea2a10d52a1b062311fabb067dee71a422bb91/Content/StructureResolver.php#L123

niklasnatter commented 3 years ago

Fixed by #95