Skip to content

[BusinessTemplate] Error when creating a new BusinessTemplate #986

@paulandrieux

Description

@paulandrieux

Description

When I create a new BusinessTemplate, I have this error:

request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'INSERT INTO vic_view (bodyId, bodyClass, position, lft, lvl, rgt, root, undeletable, cssHash, cssUpToDate, roles, created_at, updated_at, parent_id, template_id, author_id, layout, backendName, query, orderBy, business_entity_id, seo_id, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, null, 0, 0, 0, 0, 0, 0, null, 0, null, "2017-08-29 09:28:09", "2017-08-29 09:28:09", 101, 7, null, null, "Page formation", null, null, "training", null, "businesstemplate"]:  SQLSTATE[HY000]: General error: 1364 Field 'widget_map' doesn't have a default value" at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'INSERT INTO vic_view (bodyId, bodyClass, position, lft, lvl, rgt, root, undeletable, cssHash, cssUpToDate, roles, created_at, updated_at, parent_id, template_id, author_id, layout, backendName, query, orderBy, business_entity_id, seo_id, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, null, 0, 0, 0, 0, 0, 0, null, 0, null, \"2017-08-29 09:28:09\", \"2017-08-29 09:28:09\", 101, 7, null, null, \"Page formation\", null, null, \"training\", null, \"businesstemplate\"]:\n\nSQLSTATE[HY000]: General error: 1364 Field 'widget_map' doesn't have a default value at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\\DBAL\\Driver\\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'widget_map' doesn't have a default value at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'widget_map' doesn't have a default value at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"} {"@git":"b212790a885f9e78fa480bf11166cc241e0f83ca\n","app":"troopers.agency","env":"","request_uri":"/fr/victoire-dcms/business-templatetraining/create"}

It try to persist a view without any value in the deprecated widget_map column, but this value is required

Resolution Ideas

We need to kick this deprecated column, or define a default value as an empty serialized array.

Related to

Bundle -- -- --
Analytics Page
Blog Query
BusinessEntity Seo
BusinessPage Sitemap
Core Template
Criteria Twig
Filter User
Form ViewReference
I18n Widget
Media WidgetMap
UI

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions