TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692022-07-08T08:57:25ZTYPO3 Forge
Redmine TYPO3 Core - Task #97873 (Closed): Named handlers in HTTP stackhttp://forge.typo3.org/issues/978732022-07-08T08:57:25ZMathias Brodalambrodala@pagemachine.de
<p>Since <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Bug: RequestFactory respects Guzzle Middleware/Handler configuration from TYPO3_CONF_VARS (Closed)" href="http://forge.typo3.org/issues/88871">#88871</a> one can add custom middlewares/handlers to the handler stack used by Guzzle within TYPO3 via <code>$GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler']</code>.</p>
<p>These are pushed onto the handler stack without name. Chances are high that a name is available in the <code>$GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler']</code> array so this should be pushed together with the middleware/handler.</p>
<p>Benefit: easier debugging.</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 #86917 (Closed): Missing support for options in "Execute console commands" sched...http://forge.typo3.org/issues/869172018-11-13T14:44:14ZMathias Brodalambrodala@pagemachine.de
<p>The <strong>Execute console commands</strong> scheduler task added in <a class="issue tracker-2 status-5 priority-5 priority-high3 closed" title="Feature: Symfony CLI executable via scheduler task (Closed)" href="http://forge.typo3.org/issues/79462">#79462</a> only supports command arguments. Command options (aka "flags") are currently not supported.</p>
<p>These should be supported and rendered as checkboxes to provide a full replacement for the legacy Extbase CommandController task.</p> TYPO3 Core - Bug #84973 (Closed): Cannot delete invalid Scheduler taskhttp://forge.typo3.org/issues/849732018-05-11T17:39:24ZMathias Brodalambrodala@pagemachine.de
<p>When trying to delete an invalid Scheduler task (e.g. due to the related code being removed) an error occurs:</p>
<pre>
Fatal error: TYPO3\CMS\Scheduler\Scheduler::isValidTaskObject(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;<Task>&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /.../typo3/sysext/scheduler/Classes/Scheduler.php on line 449
</pre> 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 #83176 (Closed): Cannot move page to the end of the treehttp://forge.typo3.org/issues/831762017-11-30T15:05:48ZMathias Brodalambrodala@pagemachine.de
<p>With the new page tree pages cannot be moved to the end anymore, only between other pages.</p> TYPO3 Core - Feature #83175 (New): Add option to disable "Move page" prompthttp://forge.typo3.org/issues/831752017-11-30T15:04:43ZMathias Brodalambrodala@pagemachine.de
<p>The new page tree shows a modal prompt when a page was moved to ask for Move, Copy or Cancel.</p>
<p>Since this slows down editing workflows considerably there should be an option to disable this and default to move and copy when pressing the Ctrl key during drag-and-drop.</p>
<p>Cancelling everything via the Esc key during drag would be the icing on the cake. ;-)</p> TYPO3 Core - Feature #82019 (New): Accept array instead of CSV in TCAhttp://forge.typo3.org/issues/820192017-08-01T14:14:26ZMathias Brodalambrodala@pagemachine.de
<p>There are various locations in TCA which require a CSV string of values, e.g. <code>ctrl/searchFields</code> or <code>types/N/showitem</code>.</p>
<p>To make it easer to handle this e.g. in Git one can use a multi-line string or the <code>implode()</code> function to convert an array of strings back to an CSV string.</p>
<p>Arrays of strings should be supported natively here to streamline TCA config.</p> TYPO3 Core - Bug #81709 (Closed): Multiple INCLUDE_TYPOSCRIPT extensions with spaces not workinghttp://forge.typo3.org/issues/817092017-06-27T12:18:53ZMathias Brodalambrodala@pagemachine.de
<p>The following TypoScript snippet won't include files with anything but the first file extension:</p>
<pre>
<INCLUDE_TYPOSCRIPT: source="DIR: ./Library" extensions="ts, setupts, tx">
</pre>
<p>The reason is the space after the comma which in the end lets <code>TypoScriptParser::includeDirectory()</code> (more specifically <code>GeneralUtility::getFilesInDir()</code> handle them as "<code>ts</code>", "<code> setupts</code>" and "<code> tx</code>" (mind the leading space).</p>
<p>This should probably cleaned up with <code>GeneralUtility::trimExplode()</code>.</p> TYPO3 Core - Bug #80436 (Closed): Linkhandler record browsing not working with CKEditorhttp://forge.typo3.org/issues/804362017-03-24T18:01:00ZMathias Brodalambrodala@pagemachine.de
<p>Apparently the linkhandler record browsing introduced with <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Integrate linkhandler into core (Closed)" href="http://forge.typo3.org/issues/79626">#79626</a> is not working with CKEditor.</p>
<p>Internally CKEditor always passes <code>tt_content</code> as table in <code>BrowseLinksController::getUrlParameters</code> which in turn prevents record listing due to a check in <code>AbstractDatabaseRecordList::generateList()</code> which disallows tables aside from <code>$this->table</code> filled from <code>$_GET['table']</code>.</p> TYPO3 Core - Task #77708 (Closed): Follow semverhttp://forge.typo3.org/issues/777082016-08-31T10:35:39ZMathias Brodalambrodala@pagemachine.de
<p>The TYPO3 development/release cycle could be changed to follow <a href="http://semver.org/" class="external">semver</a></p>
<p>This would mean reliable release versions with 100% guarantee of no breaking changes in patch and minor releases. Currently breaking changes also go into minor releases up until the next LTS.</p> TYPO3 Core - Bug #66834 (Closed): Numeric suffix (0) added to unique fields in workspace recordshttp://forge.typo3.org/issues/668342015-05-07T14:21:17ZMathias Brodalambrodala@pagemachine.de
<p>Upon saving a record outside of the LIVE workspace all fields marked as <code>'eval' => 'unique'</code> have <code>0</code> appended to their value. This suffix can be removed just fine afterwards thus only affects the first creation of a new record version.</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 - Feature #61066 (Rejected): Configuration per application contexthttp://forge.typo3.org/issues/610662014-08-19T15:00:14ZMathias Brodalambrodala@pagemachine.de
<p>TYPO3 Flow allows for different configuration per application context (even subcontexts). The same should be supported in CMS, too.</p> TYPO3 Core - Bug #60771 (Closed): Email addresses not validated against RFC 6531http://forge.typo3.org/issues/607712014-08-04T16:55:08ZMathias Brodalambrodala@pagemachine.de
<p>The validation in <code>GeneralUtility::validEmail</code> does not comply with <a href="http://tools.ietf.org/html/rfc6531" title="SMTP Extension for Internationalized Email" class="external">RFC 6531</a>.</p>
<p>Since PHP's <code>filter_var</code> + <code>FILTER_VALIDATE_EMAIL</code> doesn't either, we need to convert the user/local part to Punycode, too.</p>