Closed dmolineus closed 4 years ago
Dieses Verhalten verursacht leider bei Verwendung des Grids in einem Formular den Totalabsturz des Formulars.
Internal Server Error Was ist das Problem?
Type error: Return value of ContaoBootstrap\Grid\Component\FormField\AbstractRelatedFormField::getIterator() must be an instance of ContaoBootstrap\Grid\GridIterator or null, none returned
Man kann das Formular auch nicht korrigieren, nur das Formular löschen hilft. Fehlermeldung aus var/logs
[2017-10-19 22:24:09] app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Return value of ContaoBootstrap\Grid\Component\FormField\AbstractRelatedFormField::getIterator() must be an instance of ContaoBootstrap\Grid\GridIterator or null, none returned at /kunden/450720_04758/webseiten/entwicklung/contao4/vendor/contao-bootstrap/grid/src/Component/FormField/AbstractRelatedFormField.php:51)"}
Your described issue is fixed with https://github.com/contao-bootstrap/grid/commit/a014f64e9b332b92de88366037e5b4b112063cc6
I have a similar problem now with beta2. After setting up a grid as module and filling it with items, the page goes blank and this error is thrown:
[2017-10-25 12:26:06] app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 2 passed to ContaoBootstrap\\Grid\\GridProvider::getIterator() must be of the type integer or null, string given, called in /var/www/vhosts/xxx/httpdocs/xxx/vendor/contao-bootstrap/grid/src/Component/Module/GridModule.php on line 103 at /var/www/vhosts/xxx/httpdocs/xxx/vendor/contao-bootstrap/grid/src/GridProvider.php:86)"} []
any idea?
@all Could you please open new issues and not reporting to an enhancement issue if any bug occurs. Thanks. @reluem fixed in 52081b4c09d260e0d44f2ada97dff85d47e15dc0. Will be shipped with the next release.
Will be solved in upcoming 2.2.0 with ommit 30c5a0869087bd60ced6ff33888a6d20cd03bb8f.
After duplicating a grid element the parent information is lost. This behaviour is wanted as it's not clear where the elements got inserted. There should be a button to autodetect previous parent element automatically.