<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>typo3 fal patch to enable image selection in fluidcontent elements</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/270 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="270"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;p&gt;! This patches are not needed anymore with TYPO3 7.6.8 and flux 7.4.0 !&lt;/p&gt;
&lt;hr class="docutils" /&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;flux: field.inline.fal causing errors in 7.6 #1013 - &lt;a class="reference external" href="https://github.com/FluidTYPO3/flux/issues/1013"&gt;https://github.com/FluidTYPO3/flux/issues/1013&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;core patch also needs accompanying fluidcontent patch &lt;a class="reference external" href="https://github.com/monosize/fluidcontent/commit/3556fe61f996fc0eec7e02e91b9c3a50071073b3"&gt;https://github.com/monosize/fluidcontent/commit/3556fe61f996fc0eec7e02e91b9c3a50071073b3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;works fine with TYPO3 7.6.8, fluidcontent 4.4.1 and flux 7.3.0&lt;ul&gt;
&lt;li&gt;does not work anymore with flux 7.4.0&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/270/rev-raw/2ea1ed73e59415a0d1a60fe4fbd6ad4b8fcdec2c/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/270#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;style type="text/css"&gt;/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.diff .de1, .diff .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.diff  {font-family:monospace;}
.diff .imp {font-weight: bold; color: red;}
.diff li, .diff .li1 {color: #DDD;}
.diff .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.diff .kw1 {color: #aaaaaa; font-style: italic;}
.diff .re0 {color: #440088;}
.diff .re1 {color: #991111;}
.diff .re2 {color: #00b000;}
.diff .re3 {color: #888822;}
.diff .re4 {color: #888822;}
.diff .re5 {color: #0011dd;}
.diff .re6 {color: #440088;}
.diff .re7 {color: #991111;}
.diff .re8 {color: #00b000;}
.diff .re9 {color: #888822;}
.diff span.xtra { display:block; }
&lt;/style&gt;&lt;div class="code"&gt;&lt;table class="diff"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;commit &lt;span class="re0"&gt;82027c3&lt;/span&gt;d7df7ca&lt;span class="re0"&gt;7d9558&lt;/span&gt;ae&lt;span class="re0"&gt;2d21&lt;/span&gt;e16eeda1f82333
Author: Andreas Wolf &amp;lt;dev@a-w.io&amp;gt;
Date: &amp;#160; Tue Nov &lt;span class="nu0"&gt;10&lt;/span&gt; &lt;span class="nu0"&gt;10&lt;/span&gt;:&lt;span class="nu0"&gt;37&lt;/span&gt;:&lt;span class="nu0"&gt;17&lt;/span&gt; &lt;span class="nu0"&gt;2015&lt;/span&gt; +0100
&amp;#160;
&amp;#160; &amp;#160; &lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;BUGFIX&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt; Flexform DS not properly resolved in IRRE AJAX
&amp;#160; &amp;#160; 
&amp;#160; &amp;#160; If multiple data structures are defined for a flex field, they are
&amp;#160; &amp;#160; listed in the 'ds' entry of the field’s TCA config. In this case, the
&amp;#160; &amp;#160; proper data structure needs to be resolved first before processing the
&amp;#160; &amp;#160; inline request, the necessary steps for which are introduced by this
&amp;#160; &amp;#160; patch.
&amp;#160; &amp;#160; 
&amp;#160; &amp;#160; Resolves: #&lt;span class="nu0"&gt;71436&lt;/span&gt;
&amp;#160; &amp;#160; Releases: master
&amp;#160; &amp;#160; Change-Id: Ie846ddd11efdf76b9249feb&lt;span class="re0"&gt;3a9&lt;/span&gt;d&lt;span class="re0"&gt;8a67&lt;/span&gt;b38de3983
&amp;#160;
diff --git typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
index &lt;span class="nu0"&gt;9336141&lt;/span&gt;..4b2fe8b &lt;span class="nu0"&gt;100644&lt;/span&gt;
&lt;span class="re3"&gt;--- typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php&lt;/span&gt;
&lt;span class="re4"&gt;+++ typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php&lt;/span&gt;
&lt;span class="re6"&gt;@@ -&lt;span class="nu0"&gt;21&lt;/span&gt;,&lt;span class="nu0"&gt;11&lt;/span&gt; +&lt;span class="nu0"&gt;21&lt;/span&gt;,&lt;span class="nu0"&gt;13&lt;/span&gt; @@ use TYPO3\CMS\Backend\Form\FormDataGroup\InlineParentRecord;&lt;/span&gt;
&amp;#160;use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
&amp;#160;use TYPO3\CMS\Backend\Form\InlineStackProcessor;
&amp;#160;use TYPO3\CMS\Backend\Form\NodeFactory;
&lt;span class="re8"&gt;+use TYPO3\CMS\Backend\Utility\BackendUtility;&lt;/span&gt;
&amp;#160;use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
&amp;#160;use TYPO3\CMS\Core\DataHandling\DataHandler;
&amp;#160;use TYPO3\CMS\Core\Utility\GeneralUtility;
&amp;#160;use TYPO3\CMS\Core\Utility\MathUtility;
&amp;#160;
&lt;span class="re8"&gt;+&lt;/span&gt;
&amp;#160;/**
&amp;#160; * Handle FormEngine inline ajax calls
&amp;#160; */
&lt;span class="re6"&gt;@@ -62,10 +64,8 @@ class FormInlineAjaxController&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;if &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;MathUtility::canBeInterpretedAsInteger&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;$parent&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'uid'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$command = 'edit';
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$vanillaUid = &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;int&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;$parent&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'uid'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;
&lt;span class="re7"&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$databaseRow = &lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;/span&gt;
&lt;span class="re7"&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;// TcaInlineExpandCollapseState needs the record uid&lt;/span&gt;
&lt;span class="re7"&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;'uid' =&amp;gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;int&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;$parent&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'uid'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;
&lt;span class="re7"&gt;- &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;&lt;/span&gt;
&lt;span class="re8"&gt;+ &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;// we need the full record to e.g. fetch the proper data structure&lt;/span&gt;
&lt;span class="re8"&gt;+ &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$databaseRow = BackendUtility::getRecord&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;$parent&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'table'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;, $parent&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'uid'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; else &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$command = 'new';
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$databaseRow = &lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;
&lt;span class="re6"&gt;@@ -85,9 +85,12 @@ class FormInlineAjaxController&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;/** @var TcaDatabaseRecord $formDataGroup */
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$formDataGroup = GeneralUtility::makeInstance&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;InlineParentRecord::class&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;
&lt;span class="re8"&gt;+&lt;/span&gt;
&lt;span class="re8"&gt;+&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;/** @var FormDataCompiler $formDataCompiler */
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$formDataCompiler = GeneralUtility::makeInstance&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;FormDataCompiler::class, $formDataGroup&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$parentData = $formDataCompiler-&amp;gt;compile&lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;$formDataCompilerInputForParent&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt;;
&lt;span class="re8"&gt;+&lt;/span&gt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;$parentConfig = $parentData&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'processedTca'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'columns'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;$parentFieldName&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;&lt;span class="br0"&gt;&amp;#91;&lt;/span&gt;'config'&lt;span class="br0"&gt;&amp;#93;&lt;/span&gt;;
&amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;// Child, a record from this table should be rendered
&amp;#160;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/270/rev-raw/2ea1ed73e59415a0d1a60fe4fbd6ad4b8fcdec2c/typo-core-fal-patch.diff" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/270#typo-core-fal-patch.diff"&gt;typo-core-fal-patch.diff&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
