Skip to content

BUG: [2.1] saving a new page without add content block ends in exception #94

@crydotsnake

Description

@crydotsnake

Description
Currently when you want to add a new page, and try too save without adding content to it, it ends in an exception:

An error occurred during rendering the "show_in_shop" hook in the "sylius_admin.page.create.content.header.title_block.actions" hookable. An exception has been thrown during the rendering of a template ("Doctrine\Common\Collections\ArrayCollection::get(): Argument #1 ($key) must be of type string|int, null given, called in /var/www/html/vendor/sylius/resource-bundle/src/Component/src/Model/TranslatableTrait.php on line 72") in @MonsieurBizSyliusCmsPagePlugin/admin/page/update/content/header/title_block/actions/show_in_shop.html.twig at line 46 in @MonsieurBizSyliusCmsPagePlugin/admin/page/update/content/header/title_block/actions/show_in_shop.html.twig at line 46

Since the field Page content => Content is required, I would assume that it should show me a hint that its required. Basically the same behavior when you leave the title or slug field empty.

Versions
Sylius: 2.7.1
SyliusCmsPagePlugin: 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions