[BUGFIX] Fix suggest wizard for new CE in flexforms 70/33570/2
authorMarkus Klein <klein.t3@reelworx.at>
Fri, 24 Oct 2014 14:34:59 +0000 (16:34 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 27 Oct 2014 19:53:09 +0000 (20:53 +0100)
commit2ce44f2789a29f00a5b112d6fe87415057312c6c
treeea5ae4acd0c86fb02588d5e50190a7b9959af403
parent02c85f5cf00c47d02a52ee21e652ddcd7afedbd4
[BUGFIX] Fix suggest wizard for new CE in flexforms

When having a suggest wizard inside a flexform on a
new content element edit form, we have the problem that
we can't load the wizard's config in the AJAX request due
to missing record information. We don't know what flexform
definition to load, as we don't know what ctype is requested.

Two possible solutions exist:
 - Generate the blank record again in the AJAX request, which
   means we have to copy lots of code from the DataPreProcessor.
   Moreover we would still need to pass the defVal GET parameter
   of the EditDocumentController to the AJAX request handler
   somehow, since we need that information in the DataPreProcessor
   to generate the correct dummy record.
 - Push the record to the AJAX request as serialized array

I chose the second implementation.

Change-Id: If7f8abe66554a3164bbfe98ad396fdf8448f5569
Resolves: #50549
Releases: master, 6.2, 6.1
Reviewed-on: http://review.typo3.org/33570
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tceforms_suggest.js