[BUGFIX] Fix suggest wizard for new CE in flexforms 05/33505/3
authorMarkus Klein <klein.t3@reelworx.at>
Fri, 24 Oct 2014 14:34:59 +0000 (16:34 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Sun, 26 Oct 2014 18:59:30 +0000 (19:59 +0100)
commit86c7a58fff45142f6c6387f637bc4707a79840f0
treecc9ea6354e1aa3902a0291c39c7512f8f4d8eef8
parentbe671f76c8362be1ffd2b7356b66c073a4ac46e4
[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.

Resolves: #50549
Releases: master, 6.2, 6.1
Change-Id: Ic27125d0a901aee10461f88ea49c0f354cb43a54
Reviewed-on: http://review.typo3.org/33505
Reviewed-by: Steffen Müller <typo3@t3node.com>
Tested-by: Steffen Müller <typo3@t3node.com>
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