TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692022-04-29T16:44:01ZTYPO3 Forge
Redmine 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 #96054 (Closed): Command "language:update" does not log error on missing transla...http://forge.typo3.org/issues/960542021-11-23T09:53:47ZMathias Brodalambrodala@pagemachine.de
<p>The CLI command <code>language:update</code> invokes <code>LanguagePackService::languagePackDownload()</code> for each active extension. Here a HTTP request is performed on the translation server which can fail with an exception on 404.</p>
<p>The <code>RequestFactory::request()</code> call here should be adjusted to include <a href="https://docs.guzzlephp.org/en/stable/request-options.html#http-errors" class="external"><code>['http_errors' => false]</code></a> to have Guzzle return the 404 response instead of throwing an exception. This would allow for logging this as a regular warning.</p> TYPO3 Core - Bug #96053 (Closed): Command "language:update" succeeds on missing translations but ...http://forge.typo3.org/issues/960532021-11-23T09:50:25ZMathias Brodalambrodala@pagemachine.de
<p>The CLI command <code>language:update</code> is supposed to always fail if translations could not be fetched for an extension. But the behavior is different if <code>--no-progress</code> (or <code>--verbose</code>) is passed.</p>
<p>To reproduce:</p>
<ol>
<li>Install any extension without translations on the TYPO3 translation server (private or public), e.g. <code>container</code></li>
<li>Run <code>language:update</code>: succeeds</li>
<li>Run <code>language:update --no-progress</code>: fails</li>
<li>Run <code>language:update --verbose</code>: fails</li>
</ol>
<p>(Notice that the order of <code>language:update</code> invocations doesn't matter here.)</p> TYPO3 Core - Bug #95868 (Closed): Invalid example for RenderFormValueViewHelperhttp://forge.typo3.org/issues/958682021-11-04T10:35:43ZMathias Brodalambrodala@pagemachine.de
<p>With <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add option to get a single processed form value (Closed)" href="http://forge.typo3.org/issues/84713">#84713</a> the <code>RenderFormValueViewHelper</code> has been introduced.</p>
<p>The related changelog entry refers to <code>{page.rootForm.elements.*}</code> which does not exist. This must be <code>{form.formDefinition.elements.*}</code> instead.</p> TYPO3 Core - Bug #94922 (Closed): Missing HTTP status 308 for redirectshttp://forge.typo3.org/issues/949222021-08-18T10:48:59ZMathias Brodalambrodala@pagemachine.de
<p>TYPO3 redirects do not offer the HTTP status code <code>308 Permanent Redirect</code> as counterpart to the <code>307 Temporary Redirect</code> by default. This is essential to provide a modern equivalent to the legacy <code>302 Found</code> status code.</p>
<p>Thus <code>308 Permanent Redirect</code> should be added as status code for redirects.</p> TYPO3 Core - Bug #94816 (Closed): Missing "View" button on pages with doktype > 200http://forge.typo3.org/issues/948162021-08-11T13:17:38ZMathias Brodalambrodala@pagemachine.de
<p>When editing a content element on a page with <code>doktype</code> > 200 the view button will not render this page in the frontend.</p> TYPO3 Core - Bug #94815 (Closed): Cannot link to pages with doktype > 200http://forge.typo3.org/issues/948152021-08-11T13:16:54ZMathias Brodalambrodala@pagemachine.de
<p>Pages with <code>doktype</code> > 200 will be muted in the page tree, just as Sysfolders. Thus you cannot set links to pages with <code>doktype</code> > 200 or content elements on these pages.</p> TYPO3 Core - Bug #94814 (Closed): Cannot use page with doktype > 200 as shortcut targethttp://forge.typo3.org/issues/948142021-08-11T13:16:20ZMathias Brodalambrodala@pagemachine.de
<p>A shortcut to a page with a <code>doktype</code> > 200 does not work in Shortcut Mode <strong>First subpage of selected/current page</strong>.</p>
<p>Subpages of the current page with a @doktypeq > 200 will not be considered and thus not called in the frontend, even if they clearly are the first subpage of the shortcut.</p> TYPO3 Core - Bug #93679 (Closed): Cropping to 0 (zero) pixels height/width breaks page/content ed...http://forge.typo3.org/issues/936792021-03-08T14:49:53ZMathias Brodalambrodala@pagemachine.de
<p>It is possible to store an image cropping configuration of 0 (zero) pixels in width or height. For this an editor simply needs to reduce the cropping frame to 0 in width or height. After saving an error shows up:</p>
<blockquote>
<p>Width and height of the image must be greater than zero</p>
</blockquote>
<p>(See <a class="external" href="https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/core/Classes/Imaging/ImageDimension.php#L76">https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/core/Classes/Imaging/ImageDimension.php#L76</a>)</p>
<p>Unless the <code>crop</code> field of the affected <code>sys_file_reference</code> record is cleared/fixed manually in the database, viewing the page in the <em>Page</em> module or editing the affected record in the <em>List</em> module is impossible due to this error.</p>
<p>A few options to fix this:</p>
<ol>
<li>Require a minimum of 1x1 Pixel for cropping</li>
<li>Display error and disable <em>Accept</em> in the <em>Image manipulation</em> wizard</li>
<li>Handle a width/height of 0 Pixel more gratuitously in <code>ImageDimension</code>.</li>
</ol> 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 #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 #79277 (Rejected): Main typo3.org repository check shown in Composer modehttp://forge.typo3.org/issues/792772017-01-11T15:41:17ZMathias Brodalambrodala@pagemachine.de
<p>The check against an outdated typo3.org extension repository is shown in Composer mode which doesn't make sense. It should be skipped in Composer mode.</p> TYPO3 Core - Bug #69790 (Rejected): Page tree hidden after going back from syslog linkhttp://forge.typo3.org/issues/697902015-09-14T15:38:46ZMathias Brodalambrodala@pagemachine.de
<p>The system information menu in the header of the backend shows a link to the Log module in case there are errors. Upon clicking this link, the page tree component is hidden since it's not used in the Log module.</p>
<p>If you go back via the browser back button afterwards, the page tree stays hidden.</p>
<p>The page tree should be displayed again instead.</p> TYPO3 Core - Bug #52888 (Rejected): FIRST_INSTALL file is ignoredhttp://forge.typo3.org/issues/528882013-10-16T13:40:24ZMathias Brodalambrodala@pagemachine.de
<p>The <code>FIRST_INSTALL</code> file which may be used to have the TYPO3 installer automatically create the <code>ENABLE_INSTALL_TOOL</code> file is completely ignored in the new installer. In fact, a file search yields nothing.</p>