Details
-
Bug
-
Resolution: Invalid
-
High
-
1.5.1
-
None
Description
When we try to add another content field to the landing page content type the following error occurs:
[2016-09-22 14:17:27] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\BadRequestHttpException: "Argument 'custom' is invalid: is not set" at /var/www/html/ezenterprise150_demo/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ExceptionListener.php line 55 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException(code: 0): Argument 'custom' is invalid: is not set at /var/www/html/ezenterprise150_demo/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ExceptionListener.php:55, eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException(code: 0): Argument 'custom' is invalid: is not set at /var/www/html/ezenterprise150_demo/vendor/ezsystems/landing-page-fieldtype-bundle/src/Registry/BlockTypeRegistry.php:54)"} [] [2016-09-22 14:17:27] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: __clone method called on non-object" at /var/www/html/ezenterprise150_demo/vendor/ezsystems/platform-ui-bundle/Controller/ExceptionController.php line 25 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: __clone method called on non-object at /var/www/html/ezenterprise150_demo/vendor/ezsystems/platform-ui-bundle/Controller/ExceptionController.php:25)"} []
For now we don't have a clue on what caused the issue, but we have a quick way to make it happen.
Steps to reproduce:
1. Start from an eZ Studio 1.5.0 or 1.5.1 with demo data, on dev mode
2. Access your database, and in the ezcontentobject_attribute table edit the data_text of the latest version of the ezlandingpage attribute
3. Insert the following XML content:
<?xml version="1.0" encoding="UTF-8"?><page title="About us" layout="default"><zones><zone id="0" name="default"><blocks><block id="b-a40e3746-db45-e504-9462-11b34c4cd29d" type="embed" view="default" name="Frequently asked questions" ttl="0"><attributes><attribute name="contentId">95</attribute></attributes></block><block id="b-0080f6e1-0be2-d68f-2bd0-3b4413a71fd6" type="embed" view="default" name="Press releases" ttl="0"><attributes><attribute name="contentId">105</attribute></attributes></block><block id="b-69b4eeb4-91fd-65b4-608f-b0442975b8b8" type="embed" view="default" name="Shortcuts" ttl="0"><attributes><attribute name="contentId">102</attribute></attributes></block><block id="b-d6692157-c6e3-ca66-7580-7cfba11d83e0" type="embed" view="default" name="Documents" ttl="0"><attributes><attribute name="contentId">97</attribute></attributes></block><block id="b-13736db5-d672-066a-c3f6-dd2bcf2b373a" type="embed" view="default" name="Articles" ttl="0"><attributes><attribute name="contentId">96</attribute></attributes></block><block id="b-9fa7dc69-97ac-3456-8838-e15c6b821d01" type="embed" view="default" name="Live stream" ttl="0"><attributes><attribute name="contentId">103</attribute></attributes></block><block id="b-48152657-e959-d589-6b7f-119474805817" type="custom" view="default" name="Custom Block" ttl="0"><attributes><attribute name="youtube_link">Provide link</attribute></attributes></block></blocks></zone></zones></page>
3. Edit your Landing Page content type
4. Add another field type (for instance: text block)
5. Click "Ok"
You will get the errors specified above on your dev.log