{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"typo3 fal patch to enable image selection in fluidcontent elements","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/270 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"270\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p>! This patches are not needed anymore with TYPO3 7.6.8 and flux 7.4.0 !<\/p>\n<hr class=\"docutils\" \/>\n<ul class=\"simple\">\n<li>flux: field.inline.fal causing errors in 7.6 #1013 - <a class=\"reference external\" href=\"https:\/\/github.com\/FluidTYPO3\/flux\/issues\/1013\">https:\/\/github.com\/FluidTYPO3\/flux\/issues\/1013<\/a><\/li>\n<li>core patch also needs accompanying fluidcontent patch <a class=\"reference external\" href=\"https:\/\/github.com\/monosize\/fluidcontent\/commit\/3556fe61f996fc0eec7e02e91b9c3a50071073b3\">https:\/\/github.com\/monosize\/fluidcontent\/commit\/3556fe61f996fc0eec7e02e91b9c3a50071073b3<\/a><\/li>\n<li>works fine with TYPO3 7.6.8, fluidcontent 4.4.1 and flux 7.3.0<ul>\n<li>does not work anymore with flux 7.4.0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/270\/rev-raw\/2ea1ed73e59415a0d1a60fe4fbd6ad4b8fcdec2c\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/270#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <style type=\"text\/css\">\/**\n * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n * (http:\/\/qbnz.com\/highlighter\/ and http:\/\/geshi.org\/)\n *\/\n.diff .de1, .diff .de2 {font: normal normal 1em\/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}\n.diff  {font-family:monospace;}\n.diff .imp {font-weight: bold; color: red;}\n.diff li, .diff .li1 {color: #DDD;}\n.diff .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}\n.diff .kw1 {color: #aaaaaa; font-style: italic;}\n.diff .re0 {color: #440088;}\n.diff .re1 {color: #991111;}\n.diff .re2 {color: #00b000;}\n.diff .re3 {color: #888822;}\n.diff .re4 {color: #888822;}\n.diff .re5 {color: #0011dd;}\n.diff .re6 {color: #440088;}\n.diff .re7 {color: #991111;}\n.diff .re8 {color: #00b000;}\n.diff .re9 {color: #888822;}\n.diff span.xtra { display:block; }\n<\/style><div class=\"code\"><table class=\"diff\"><tbody><tr class=\"li1\"><td class=\"ln\"><pre class=\"de1\">1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n<\/pre><\/td><td class=\"de1\"><pre class=\"de1\">commit <span class=\"re0\">82027c3<\/span>d7df7ca<span class=\"re0\">7d9558<\/span>ae<span class=\"re0\">2d21<\/span>e16eeda1f82333\nAuthor: Andreas Wolf &lt;dev@a-w.io&gt;\nDate: &#160; Tue Nov <span class=\"nu0\">10<\/span> <span class=\"nu0\">10<\/span>:<span class=\"nu0\">37<\/span>:<span class=\"nu0\">17<\/span> <span class=\"nu0\">2015<\/span> +0100\n&#160;\n&#160; &#160; <span class=\"br0\">&#91;<\/span>BUGFIX<span class=\"br0\">&#93;<\/span> Flexform DS not properly resolved in IRRE AJAX\n&#160; &#160; \n&#160; &#160; If multiple data structures are defined for a flex field, they are\n&#160; &#160; listed in the 'ds' entry of the field\u2019s TCA config. In this case, the\n&#160; &#160; proper data structure needs to be resolved first before processing the\n&#160; &#160; inline request, the necessary steps for which are introduced by this\n&#160; &#160; patch.\n&#160; &#160; \n&#160; &#160; Resolves: #<span class=\"nu0\">71436<\/span>\n&#160; &#160; Releases: master\n&#160; &#160; Change-Id: Ie846ddd11efdf76b9249feb<span class=\"re0\">3a9<\/span>d<span class=\"re0\">8a67<\/span>b38de3983\n&#160;\ndiff --git typo3\/sysext\/backend\/Classes\/Controller\/FormInlineAjaxController.php typo3\/sysext\/backend\/Classes\/Controller\/FormInlineAjaxController.php\nindex <span class=\"nu0\">9336141<\/span>..4b2fe8b <span class=\"nu0\">100644<\/span>\n<span class=\"re3\">--- typo3\/sysext\/backend\/Classes\/Controller\/FormInlineAjaxController.php<\/span>\n<span class=\"re4\">+++ typo3\/sysext\/backend\/Classes\/Controller\/FormInlineAjaxController.php<\/span>\n<span class=\"re6\">@@ -<span class=\"nu0\">21<\/span>,<span class=\"nu0\">11<\/span> +<span class=\"nu0\">21<\/span>,<span class=\"nu0\">13<\/span> @@ use TYPO3\\CMS\\Backend\\Form\\FormDataGroup\\InlineParentRecord;<\/span>\n&#160;use TYPO3\\CMS\\Backend\\Form\\FormDataGroup\\TcaDatabaseRecord;\n&#160;use TYPO3\\CMS\\Backend\\Form\\InlineStackProcessor;\n&#160;use TYPO3\\CMS\\Backend\\Form\\NodeFactory;\n<span class=\"re8\">+use TYPO3\\CMS\\Backend\\Utility\\BackendUtility;<\/span>\n&#160;use TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication;\n&#160;use TYPO3\\CMS\\Core\\DataHandling\\DataHandler;\n&#160;use TYPO3\\CMS\\Core\\Utility\\GeneralUtility;\n&#160;use TYPO3\\CMS\\Core\\Utility\\MathUtility;\n&#160;\n<span class=\"re8\">+<\/span>\n&#160;\/**\n&#160; * Handle FormEngine inline ajax calls\n&#160; *\/\n<span class=\"re6\">@@ -62,10 +64,8 @@ class FormInlineAjaxController<\/span>\n&#160; &#160; &#160; &#160; &#160;if <span class=\"br0\">&#40;<\/span>MathUtility::canBeInterpretedAsInteger<span class=\"br0\">&#40;<\/span>$parent<span class=\"br0\">&#91;<\/span>'uid'<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160;$command = 'edit';\n&#160; &#160; &#160; &#160; &#160; &#160; &#160;$vanillaUid = <span class=\"br0\">&#40;<\/span>int<span class=\"br0\">&#41;<\/span>$parent<span class=\"br0\">&#91;<\/span>'uid'<span class=\"br0\">&#93;<\/span>;\n<span class=\"re7\">- &#160; &#160; &#160; &#160; &#160; &#160;$databaseRow = <span class=\"br0\">&#91;<\/span><\/span>\n<span class=\"re7\">- &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;\/\/ TcaInlineExpandCollapseState needs the record uid<\/span>\n<span class=\"re7\">- &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;'uid' =&gt; <span class=\"br0\">&#40;<\/span>int<span class=\"br0\">&#41;<\/span>$parent<span class=\"br0\">&#91;<\/span>'uid'<span class=\"br0\">&#93;<\/span>,<\/span>\n<span class=\"re7\">- &#160; &#160; &#160; &#160; &#160; &#160;<span class=\"br0\">&#93;<\/span>;<\/span>\n<span class=\"re8\">+ &#160; &#160; &#160; &#160; &#160; &#160;\/\/ we need the full record to e.g. fetch the proper data structure<\/span>\n<span class=\"re8\">+ &#160; &#160; &#160; &#160; &#160; &#160;$databaseRow = BackendUtility::getRecord<span class=\"br0\">&#40;<\/span>$parent<span class=\"br0\">&#91;<\/span>'table'<span class=\"br0\">&#93;<\/span>, $parent<span class=\"br0\">&#91;<\/span>'uid'<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#41;<\/span>;<\/span>\n&#160; &#160; &#160; &#160; &#160;<span class=\"br0\">&#125;<\/span> else <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160;$command = 'new';\n&#160; &#160; &#160; &#160; &#160; &#160; &#160;$databaseRow = <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#93;<\/span>;\n<span class=\"re6\">@@ -85,9 +85,12 @@ class FormInlineAjaxController<\/span>\n&#160; &#160; &#160; &#160; &#160;<span class=\"br0\">&#93;<\/span>;\n&#160; &#160; &#160; &#160; &#160;\/** @var TcaDatabaseRecord $formDataGroup *\/\n&#160; &#160; &#160; &#160; &#160;$formDataGroup = GeneralUtility::makeInstance<span class=\"br0\">&#40;<\/span>InlineParentRecord::class<span class=\"br0\">&#41;<\/span>;\n<span class=\"re8\">+<\/span>\n<span class=\"re8\">+<\/span>\n&#160; &#160; &#160; &#160; &#160;\/** @var FormDataCompiler $formDataCompiler *\/\n&#160; &#160; &#160; &#160; &#160;$formDataCompiler = GeneralUtility::makeInstance<span class=\"br0\">&#40;<\/span>FormDataCompiler::class, $formDataGroup<span class=\"br0\">&#41;<\/span>;\n&#160; &#160; &#160; &#160; &#160;$parentData = $formDataCompiler-&gt;compile<span class=\"br0\">&#40;<\/span>$formDataCompilerInputForParent<span class=\"br0\">&#41;<\/span>;\n<span class=\"re8\">+<\/span>\n&#160; &#160; &#160; &#160; &#160;$parentConfig = $parentData<span class=\"br0\">&#91;<\/span>'processedTca'<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span>'columns'<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span>$parentFieldName<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span>'config'<span class=\"br0\">&#93;<\/span>;\n&#160;\n&#160; &#160; &#160; &#160; &#160;\/\/ Child, a record from this table should be rendered\n&#160;<\/pre><\/td><\/tr><\/tbody><\/table><\/div>\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/270\/rev-raw\/2ea1ed73e59415a0d1a60fe4fbd6ad4b8fcdec2c\/typo-core-fal-patch.diff\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/270#typo-core-fal-patch.diff\">typo-core-fal-patch.diff<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
