http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692019-03-02T15:37:08ZTYPO3 ForgeTYPO3 Core - Bug #87650: Slug TCA type - Wrong date format initialhttp://forge.typo3.org/issues/87650?journal_id=3958682019-03-02T15:37:08ZGuido Schmechel
<ul></ul><p>I can confirm the problem.</p>
<p>Just a little background:<br />If we save a entry first, the DataHandler jumps into the function "checkValueForSlug" and generates the slug:<br /><pre><code class="php syntaxhl" data-language="php"><span class="nv">$value</span> <span class="o">=</span> <span class="nv">$helper</span><span class="o">-></span><span class="nf">generate</span><span class="p">(</span><span class="nv">$fullRecord</span><span class="p">,</span> <span class="nv">$realPid</span><span class="p">);</span>
</code></pre></p>
<p>The content of the $fullRecord variable is the given datetime from the database. Mentioned in the "2018-11-14t000000z" format.</p>
<p>If we use the suggest button. The route slug/suggest is called: sysext/backend/Classes/Controller/FormSlugAjaxController.php->suggestAction() Here we using the transformed $data with TCA Config<br />which are included in the HTTP Request.</p>
<pre><code class="php syntaxhl" data-language="php"><span class="nv">$values</span> <span class="o">=</span> <span class="nv">$queryParameters</span><span class="p">[</span><span class="s1">'values'</span><span class="p">];</span>
</code></pre>
<p>Now we have the "correct" datetime format.</p>
<p>The question is: What is the correct place to process the data with TCA config?</p>
<p>The same problem would have to occur with other fields that are further processed by TCA. For example, select fields with a foreign table. Since you would only get the uid and not, for example a title.</p>