TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692024-02-26T11:56:46ZTYPO3 Forge
Redmine TYPO3 Core - Bug #103202 (Resolved): TODO comments in FileInterface::setContents() cut offhttp://forge.typo3.org/issues/1032022024-02-26T11:56:46ZMathias Brodalambrodala@pagemachine.de
<p>Currently <code>FileInterface::setContents()</code> looks like this:</p>
<pre><code class="php syntaxhl" data-language="php"> <span class="cd">/**
* Replace the current file contents with the given string.
*
* @TODO : Consider to remove this function from the interface, as its
* @TODO : At the same time, it could be considered whether to make the whole
* @return $this
*/</span>
<span class="k">public</span> <span class="k">function</span> <span class="n">setContents</span><span class="p">(</span><span class="kt">string</span> <span class="nv">$contents</span><span class="p">):</span> <span class="kt">self</span><span class="p">;</span>
</code></pre>
<p>The TODO comments are cut off since the dreaded <code>[TASK] Move and Namespace (sic!) classes</code> commit. (<a class="issue tracker-4 status-5 priority-4 priority-default closed child" title="Task: Namespace switch core main patch (Closed)" href="http://forge.typo3.org/issues/40096">#40096</a>)</p>
<p>These should be restored for the time being.</p> TYPO3 Core - Bug #103057 (Resolved): Text as page ID silently convertedhttp://forge.typo3.org/issues/1030572024-02-06T08:02:50ZMathias Brodalambrodala@pagemachine.de
<p>Given you do a request like <code>/index.php?id=foobar</code>, thus a text instead of a number as <code>id</code> then you will see the start page of your site.</p>
<p>Also number-like texts like <code>/index.php?id=2step</code> will try to use the number part of the <code>id</code>, in this case <code>/index.php?id=2</code>.</p>
<p>In all of these cases the frontend should throw a 404 instead.</p>
<p>Especially since there is no more support for page aliases since <a class="issue tracker-4 status-5 priority-4 priority-default closed child" title="Task: Remove pages.alias database field (Closed)" href="http://forge.typo3.org/issues/87356">#87356</a></p> TYPO3 Core - Bug #102083 (Resolved): Validation triggered for fields in fieldsets disabled by var...http://forge.typo3.org/issues/1020832023-10-04T10:03:41ZMathias Brodalambrodala@pagemachine.de
<p>Given fields are placed in a fieldset and that fieldset is disabled using variants. Also given that these fields have validators.</p>
<p>Now if one tries to submit the form, it is displayed again without explanation. Inspection of the validation results shows that the validators of the fields have been triggered and couldn't validate the input of the fields. These fields could not be filled by the user since they are disabled together with their fieldset.</p>
<p>Validators of fields within disabled fieldsets should be ignored.</p> TYPO3 Core - Bug #97522 (Closed): Word "new" in command "description" breaks DIhttp://forge.typo3.org/issues/975222022-04-29T16:44:01ZMathias Brodalambrodala@pagemachine.de
<p>Given a command definition like this ...</p>
<pre><code class="yaml syntaxhl" data-language="yaml"><span class="na">services</span><span class="pi">:</span>
<span class="na">_defaults</span><span class="pi">:</span>
<span class="na">autowire</span><span class="pi">:</span> <span class="kc">true</span>
<span class="na">autoconfigure</span><span class="pi">:</span> <span class="kc">true</span>
<span class="na">public</span><span class="pi">:</span> <span class="kc">false</span>
<span class="na">Acme\Foo\</span><span class="pi">:</span>
<span class="na">resource</span><span class="pi">:</span> <span class="s1">'</span><span class="s">../Classes/*'</span>
<span class="na">Acme\Foo\Command\BarCommand</span><span class="pi">:</span>
<span class="na">tags</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">console.command</span>
<span class="na">command</span><span class="pi">:</span> <span class="s">example:bar</span>
<span class="na">description</span><span class="pi">:</span> <span class="s">Build a new bar</span>
<span class="na">schedulable</span><span class="pi">:</span> <span class="kc">false</span>
<span class="na">Acme\Foo\Command\QuxCommand</span><span class="pi">:</span>
<span class="na">tags</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">console.command</span>
<span class="na">command</span><span class="pi">:</span> <span class="s">example:qux</span>
<span class="na">description</span><span class="pi">:</span> <span class="s">Do something</span>
<span class="na">schedulable</span><span class="pi">:</span> <span class="kc">false</span>
</code></pre>
<p>... you get an error like this:</p>
<pre>
[ ParseError ]
syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting '('
Exception trace:
#0 ()
var/cache/code/di/DependencyInjectionContainer_<hash>.php:<line>
...
</pre>
<p>The generated service in the DI cache file:</p>
<pre><code class="php syntaxhl" data-language="php"> <span class="cd">/**
* Gets the public 'Acme\Foo\Command\BarCommand' shared autowired service.
*
* @return \Acme\Foo\Command\BarCommand
*/</span>
<span class="k">protected</span> <span class="k">function</span> <span class="n">getBarCommandService</span><span class="p">()</span>
<span class="p">{</span>
<span class="nv">$this</span><span class="o">-></span><span class="n">services</span><span class="p">[</span><span class="s1">'Acme\\Foo\\Command\\BarCommand'</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$instance</span> <span class="o">=</span> <span class="nc">\TYPO3\CMS\Core\Utility\GeneralUtility</span><span class="o">::</span><span class="nf">makeInstanceForDi</span><span class="p">(</span><span class="nc">\Acme\Foo\Command\BarCommand</span><span class="o">::</span><span class="n">class</span><span class="p">,</span> <span class="nc">\TYPO3\CMS\Core\Utility\GeneralUtility</span><span class="o">::</span><span class="nf">makeInstanceForDi</span><span class="p">(</span><span class="nc">\Acme\Foo\Security\BarDependency</span><span class="o">::</span><span class="n">class</span><span class="p">));</span>
<span class="nv">$instance</span><span class="o">-></span><span class="nf">setName</span><span class="p">(</span><span class="s1">'example:bar'</span><span class="p">);</span>
<span class="nv">$instance</span><span class="o">-></span><span class="nf">setDescription</span><span class="p">(</span><span class="s1">'Build a \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi(bar'</span><span class="p">);</span>
<span class="k">return</span> <span class="nv">$instance</span><span class="p">;</span>
<span class="p">}</span>
<span class="cd">/**
* Gets the public 'Acme\Foo\Command\QuxCommand' shared autowired service.
*
* @return \Acme\Foo\Command\QuxCommand
*/</span>
<span class="k">protected</span> <span class="k">function</span> <span class="n">getQuxCommandService</span><span class="p">::</span><span class="kt">class</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1"># ...</span>
<span class="p">}</span>
</code></pre>
<p>This is very likely caused by the rather simple replacement here:</p>
<p><a class="external" href="https://github.com/TYPO3/typo3/blob/6f7514f51634fd98a4d4def818c3f16e28aff538/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php#L166">https://github.com/TYPO3/typo3/blob/6f7514f51634fd98a4d4def818c3f16e28aff538/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php#L166</a></p>
<pre><code class="php syntaxhl" data-language="php"><span class="nv">$code</span> <span class="o">=</span> <span class="nb">preg_replace</span><span class="p">(</span><span class="s1">'/new ([^\(\s]+)\(/'</span><span class="p">,</span> <span class="s1">'\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\1::class, '</span><span class="p">,</span> <span class="nv">$code</span><span class="p">);</span>
</code></pre> TYPO3 Core - Bug #96929 (Closed): TCA / TCA overrides with variable leakshttp://forge.typo3.org/issues/969292022-02-16T15:38:05ZMathias Brodalambrodala@pagemachine.de
<p>All TCA and TCA overrides files are included without any scoping. This means that variables defined in these files can leak into the following files.</p>
<p>Also all variables defined in <code>ExtensionManagementUtility::buildBaseTcaFromSingleFiles()</code> exist in TCA and TCA override files and could even be manipulated.</p>
<p>See <a class="external" href="https://github.com/TYPO3/typo3/blob/35f7bbb381514efd483b9bfe1570229fc454dd8f/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L1477">https://github.com/TYPO3/typo3/blob/35f7bbb381514efd483b9bfe1570229fc454dd8f/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L1477</a></p>
<p>Possible solution: wrap the <code>require</code> calls for TCA / TCA override files with a closure.</p> TYPO3 Core - Bug #92969 (Closed): Sudo mode password prompt triggers "Password change" in passwor...http://forge.typo3.org/issues/929692020-12-01T14:23:23ZMathias Brodalambrodala@pagemachine.de
<p>Not sure about other password managers but the name/ID <code>confirmationPassword</code> used for the password field introduced in <a class="issue tracker-4 status-8 priority-4 priority-default" title="Task: Introduce Sudo Mode for Install Tool (Under Review)" href="http://forge.typo3.org/issues/92836">#92836</a> triggers a "Password change" workflow in the Enpass password manager.</p>
<p>To avoid usability issues like these the field should be renamed and <code>autocomplete</code> should be considered.</p> TYPO3 Core - Bug #85320 (Rejected): Translation arguments not inserted into default valuehttp://forge.typo3.org/issues/853202018-06-20T16:37:57ZMathias Brodalambrodala@pagemachine.de
<p>Given is a form with a default value for a form element label which includes placeholders like <code>%s</code> and <a href="https://docs.typo3.org/typo3cms/extensions/form/Concepts/FrontendRendering/Index.html#form-element-translation-arguments-are-supported" class="external">translation arguments via TypoScript</a>.</p>
<p>When viewing the page with the form in English then the translation arguments are not inserted into the form element label. Instead the default value for the label is shown including placeholders.</p> TYPO3 Core - Bug #84469 (Closed): State of "Show hidden content elements" not storedhttp://forge.typo3.org/issues/844692018-03-18T13:09:36ZMathias Brodalambrodala@pagemachine.de
<p>The checkbox <em>Show hidden content elements</em> shown in the page module if there are hidden elements does not store its state. When re-opening the same page, the checkbox is checked again even after unchecking. This works properly in TYPO3v8.</p> TYPO3 Core - Bug #83246 (Rejected): TCA "check" eval "maximumRecordsChecked*" not implemented any...http://forge.typo3.org/issues/832462017-12-07T10:56:21ZMathias Brodalambrodala@pagemachine.de
<p>The two <code>eval</code> options <code>maximumRecordsChecked</code> and <code>maximumRecordsCheckedInPid</code> mentioned in the <a href="https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Check.html#eval" class="external">docs for TCA type <code>check</code></a> are not implemented anymore. This might have been dropped with the FormEngine refactor.</p> TYPO3 Core - Bug #83177 (Closed): State not immediately updated after enabling/disabling pagehttp://forge.typo3.org/issues/831772017-11-30T15:07:58ZMathias Brodalambrodala@pagemachine.de
<p>When enabling/disabling pages, the new page tree quickly refreshes but no change is visible. Only explicitly refreshing the tree or TYPO3 backend makes the change visible.</p> TYPO3 Core - Bug #76374 (Closed): Select trees not rendered on inline recordshttp://forge.typo3.org/issues/763742016-05-30T12:50:16ZMathias Brodalambrodala@pagemachine.de
<p>Since the change in <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: Flexform select rendermode tree doesn't respect collapsed nodes (Closed)" href="http://forge.typo3.org/issues/75519">#75519</a> the tree rendering of TCA <code>select</code> is broken for records managed <code>inline</code>.</p>
<p>The change was determined via Git bisecting between TYPO3 6.2.21 and 6.2.22.</p>
<p>See the attached test extension for an example. It adds a single <code>inline</code> relation field to the <code>sys_category</code> table which uses a tree for its <code>parent</code> field. Try to add a relation and see that the tree of the <code>parent</code> field is missing.</p> TYPO3 Core - Bug #67244 (Closed): Undocumented flushing page cache by table and record tagshttp://forge.typo3.org/issues/672442015-06-02T16:25:44ZMathias Brodalambrodala@pagemachine.de
<p>Since <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Provide flushing cache by table and record tags (Closed)" href="http://forge.typo3.org/issues/46617">#46617</a> it is possible to flush page caches by changing records of custom tables simply by registering additional page cache tags like <code>tx_mytable</code> and <code>tx_mytable_42</code> through the <code>TypoScriptFrontendController</code>.</p>
<p>This feature should be documented for reasons stated in the commit message:</p>
<p><cite>As suggested in the wiki it is helpful to tag caches with a combination of<br />table and record uid to get the cache deleted when the specific record was<br />edited. But rather that each extension provides its own implementation it<br />would be better to store this simple function into the core.</cite></p> TYPO3 Core - Bug #61144 (Closed): Trailing comma in arrays causes exceptionhttp://forge.typo3.org/issues/611442014-08-22T14:36:05ZMathias Brodalambrodala@pagemachine.de
<p>Given the following viewhelper invocation:</p>
<pre>
<f:render partial="Foo" arguments="{
foo: 1,
bar: 2,
}"/>
</pre>
<p>Fluid throws an exception like this due to the trailing comma:</p>
<blockquote>
<p>#1237900529: The argument "arguments" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper"</p>
</blockquote>
<p>While the array above may not be valid in JSON, it is fully valid in JavaScript. Given the fact that the only other piece of software that chokes on this is the Internet Explorer (at least ancient versions) I'd opt for allowing this.</p> TYPO3 Core - Bug #61090 (Closed): Static access to Enumeration constantshttp://forge.typo3.org/issues/610902014-08-20T09:28:28ZMathias Brodalambrodala@pagemachine.de
<p>To get all available constants for a <code>TYPO3\CMS\Core\Type\Enumeration</code>, one has to create an instance and call the <code>getConstants()</code> method. This is weird for various purposes:</p>
<ol>
<li>You have to rely on a <code>__default</code> being defined or have to pick an arbitrary value to create the instance</li>
<li>The enumeration constants are stored statically anyways so one should not need an instance to get them.</li>
</ol>
<p>Compare the current state:</p>
<pre>
$myEnum = new MyEnum(MyEnum::VALID_VALUE);
print_r($myEnum->getConstants());
</pre>
<p>With the desired state:</p>
<pre>
print_r(MyEnum::getConstants());
</pre>
<p>With PHP 5.3 the <a href="http://php.net/get_called_class" class="external">get_called_class()</a> function was introduced which can be used here. In fact it is already used in <code>Enumeration::cast()</code> and it is beyond me why not here.</p>
<p>To fix this, the <code>getConstants()</code> method can be made static which fortunately <a href="http://php.net/manual/en/language.oop5.static.php" class="external">does not break instance invocation</a>:</p>
<blockquote>
<p>A property declared as static cannot be accessed with an instantiated class object (though a static method can).</p>
</blockquote>
<p>Thus the first example above will continue to work.</p> TYPO3 Core - Bug #56812 (New): TCA fields without positioning added to last tab, not "Extended" tabhttp://forge.typo3.org/issues/568122014-03-12T12:59:26ZMathias Brodalambrodala@pagemachine.de
<p>TCA fields added via <code>ExtensionManagementUtility::addToAllTCAtypes</code> are appended to the <code>showitem</code> list of all types if no explicit positioning (e.g. <code>after:title</code>) has been requested.</p>
<p>By default this appends the fields to the "Extended" tab which is present by default and ready to receive all fields which are simply appended.</p>
<p>However, if one adds a new tab via <code>--div--</code> without explicit positioning with some fields, all unrelated fields without explicit positioning are now appended to this tab instead. The resulting <code>showitem</code> portion which makes the issue clear:</p>
<blockquote>
<p>--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended, --div--;LLL:EXT:myext/locallang_db.xml:mytab, tx_myext_myfield;;;;1-1-1, unrelated_field</p>
</blockquote>
<p>The new tab with the field <code>tx_myext_myfield</code> was simply appended to the <code>showitem</code> list, thus preventing the "Extended" tab from being the last. The <code>unrelated_field</code> is now placed in the new tab.</p>
<p>A temporary fix is to set a explicit position for the newly added tab; this ensures that the tab and its fields are not simply appended and leaves the "Extended" tab on the last position.</p>
<p>The real fix however would involve explicitely placing all fields without explicit positioning in the "Extended" tab. This way arbitrary tabs could be appended without unrelated fields showing up in them.</p>
<p>This issue affects all TYPO3 CMS versions.</p>