Actions
Bug #102256
closedSuggest wizard does not work for new elements
Start date:
2023-10-25
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:
Description
When an element (e.g. a content element) is new (i.e. not yet saved, does not have a uid), the suggest wizard fails with the following JavaScript error:
Uncaught (in promise) TypeError: can't convert null to object flattenObject https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/input-transformer.js?bust=1698147028:13 flattenObject https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/input-transformer.js?bust=1698147028:13 flattenObject https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/input-transformer.js?bust=1698147028:13 toFormData https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/input-transformer.js?bust=1698147028:13 byHeader https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/input-transformer.js?bust=1698147028:13 post https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/ajax/ajax-request.js?bust=1698147028:31 registerEvents https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine-suggest.js?bust=1698147028:52 n https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/event/debounce-event.js?bust=1698147028:13 setTimeout handler*debounce/< https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/event/debounce-event.js?bust=1698147028:13 bindTo https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/event/regular-event.js?bust=1698147028:13 registerEvents https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine-suggest.js?bust=1698147028:68 FormEngineSuggest https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine-suggest.js?bust=1698147028:32 promise callback*FormEngineSuggest https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine-suggest.js?bust=1698147028:32 registerSuggest https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine/element/group-element.js?bust=1698147028:13 GroupElement https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine/element/group-element.js?bust=1698147028:13 promise callback*GroupElement https://t3starterpackage.ddev.site/_assets/081fa96a07de1dccb64a8a83e1567439/JavaScript/form-engine/element/group-element.js?bust=1698147028:13 t https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 executeJavaScriptModuleInstruction https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 executeJavaScriptModuleInstruction https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 promise callback*executeJavaScriptModuleInstruction https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 javaScriptModuleInstruction https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 invoke https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 processItems https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 processItems https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-processor.js?bust=1698147028:13 <anonymous> https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-handler.js?1698141040:13 promise callback* https://t3starterpackage.ddev.site/_assets/1ee1d3e909b58d32e30dcea666dd3224/JavaScript/java-script-item-handler.js?1698141040:13 input-transformer.js:13:641
This is related to change https://review.typo3.org/c/Packages/TYPO3.CMS/+/80759 which changed the way the uid
parameter is handled. If it is not a number, null
is sent. This makes the flattenObject
of the InputTransformer
JS class crash, because it does not expect null
. Sending 0
instead solves the issue, but I'm not sure whether this is correct or not.
Actions