TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692023-11-06T22:02:53ZTYPO3 Forge
Redmine TYPO3 Core - Task #102330 (Closed): Select current value in ValuePicker if mode is "replace"http://forge.typo3.org/issues/1023302023-11-06T22:02:53ZSascha Egerer
<p>There is a "valuePicker" in TCA where predefined values can be added to a field. <br />There are different modes (<a class="external" href="https://docs.typo3.org/m/typo3/reference-tca/10.4/en-us/ColumnsConfig/Type/inputDefault.html#valuepicker">https://docs.typo3.org/m/typo3/reference-tca/10.4/en-us/ColumnsConfig/Type/inputDefault.html#valuepicker</a>) where one of the mode is "blank" which means the value in the field is replaced by the selection.<br />In this case it would be helpful if the value picker has the item selected that has the same value as the current field value.<br />This helps a lot if the real value is not a human readable value but the label in the value picker is.</p> TYPO3 Core - Feature #99320 (Closed): Use database native common table expression to fetch page treehttp://forge.typo3.org/issues/993202022-12-08T18:22:54ZSascha Egerer
<p>As far is i can see all database engines supported by TYPO3 do support common table expressions.<br />These expressions can be used to fetch recursive data form the database like we have in our page tree.</p>
<p>I've implemented this in one of our projects (TYPO3 10 and now 11) a year ago and it runs pretty good.<br />With this query we can reduce the number of queries in the backend a lot. In my case it was 25.000 (!) queries which is now... around 3 queries. We had huge performance issues due to the infrastructure setup and a backend page load took 2 minutes after the project was moved to this hoster. So i had a look and implemented the CTE for this function and the page load took only 10 seconds after this change. So this could be a huge performance boost at some places.</p>
<p>My TYPO3 11 patch as reference (without permClause support...)<br /><pre>
# Use a Common Table Expressions to fetch the recursive page tree instead
# of executing a new query for each page.
# This happens often in backend views like if you edit a recipe page.
# Before this change there are around 25.000 Sql calls from this method
# which is reduced to a few with this query. There could also be a runtime
# cache added but this may introduces other problems.
--- Classes/Database/QueryGenerator.php 2021-04-13 09:16:54.000000000 +0200
+++ Classes/Database/QueryGenerator.php 2021-05-11 10:49:28.000000000 +0200
@@ -1575,44 +1575,27 @@
public function getTreeList($id, $depth, $begin = 0, $permClause = '')
{
$depth = (int)$depth;
- $begin = (int)$begin;
$id = (int)$id;
- if ($id < 0) {
- $id = abs($id);
- }
- if ($begin === 0) {
- $theList = $id;
- } else {
- $theList = '';
- }
- if ($id && $depth > 0) {
+
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
- $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
- $queryBuilder->select('uid')
- ->from('pages')
- ->where(
- $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, Connection::PARAM_INT)),
- $queryBuilder->expr()->eq('sys_language_uid', 0)
+ // Use common table expression to fetch the page tree
+ $pages = $queryBuilder->getConcreteQueryBuilder()->getConnection()->fetchAllAssociative(
+ 'WITH RECURSIVE cte AS (
+ SELECT uid, pid, deleted, 1 AS level
+ FROM pages
+ WHERE uid = ' . $id . ' AND deleted = 0 AND sys_language_uid = 0
+
+ UNION ALL
+ SELECT p.uid, p.pid, p.deleted, c.level + 1
+ FROM cte c
+ JOIN pages p ON p.pid = c.uid
+ WHERE p.deleted = 0 AND sys_language_uid = 0 AND c.level < ' . $depth . '
)
- ->orderBy('uid');
- if ($permClause !== '') {
- $queryBuilder->andWhere(QueryHelper::stripLogicalOperatorPrefix($permClause));
- }
- $statement = $queryBuilder->execute();
- while ($row = $statement->fetchAssociative()) {
- if ($begin <= 0) {
- $theList .= ',' . $row['uid'];
- }
- if ($depth > 1) {
- $theSubList = $this->getTreeList($row['uid'], $depth - 1, $begin - 1, $permClause);
- if (!empty($theList) && !empty($theSubList) && ($theSubList[0] !== ',')) {
- $theList .= ',';
- }
- $theList .= $theSubList;
- }
- }
- }
- return $theList;
+ SELECT uid,pid,deleted,level
+ FROM cte
+ ORDER BY level;'
+ );
+ return implode(',', array_column($pages, 'uid'));
}
/**
</pre></p> TYPO3 Core - Bug #98653 (Closed): InMemoryLogWriter does not interpolate messageshttp://forge.typo3.org/issues/986532022-10-18T21:43:28ZSascha Egerer
<p>The InMemoryLogWriter, used in the admin panel, does not interpolate log messages so it does still contain unreplaced placeholders.</p>
<p>Current State:<br /><code>TYPO3.CMS.Frontend.Authentication.FrontendUserAuthentication {count} usergroup records found</code></p>
<p>Expected: <br /><code>TYPO3.CMS.Frontend.Authentication.FrontendUserAuthentication 1 usergroup records found</code></p> TYPO3 Core - Bug #98146 (New): TYPO3\CMS\Extbase\Persistence\ObjectStorage::key() should be compa...http://forge.typo3.org/issues/981462022-08-15T12:28:57ZSascha Egerer
<p><code>TYPO3\CMS\Extbase\Persistence\ObjectStorage</code> does implement the <code>\Iterator</code> Interface.<br />The method <code>\Iterator::key()</code> must return an integer but <code>ObjectStorage::key()</code> does return a string.</p>
<p>IMO this will be a breaking change even if It'll not be used by many users.</p> TYPO3 Core - Bug #98118 (Closed): Social images are not cropped anymore to their expected ratiohttp://forge.typo3.org/issues/981182022-08-10T12:47:37ZSascha Egerer
<p>Before <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: social images are slightly cropped in EXT:seo (Closed)" href="http://forge.typo3.org/issues/97248">#97248</a> images have been cropped to 1.91:1 ratio. This is not the case anymore. Images do now have a totally wrong ratio if the original file is not in the expected ratio.</p>
<p>So before this change an image with 200x200 has been cropped to 200x104. Now it is just rendered as 200x200.<br />The same if the image is 2000x800. Before this change it was cropped to 1522x800 and now it's just rendered as 2000x800</p>
<a name="What-have-I-done"></a>
<h3 >What have I done<a href="#What-have-I-done" class="wiki-anchor">¶</a></h3>
<ul>
<li>Login and edit a page property</li>
<li>Add an Image with a 200x200 resolution to "Social Media" Tab as OpenGraph Image or Twitter Card Image</li>
<li>Save page properties</li>
<li>Load Frontend View</li>
</ul>
<a name="What-I-expected"></a>
<h3 >What I expected<a href="#What-I-expected" class="wiki-anchor">¶</a></h3>
<ul>
<li>the image is added to the og:image and og:image:url tag </li>
<li>ratio of that image is 1.91:1</li>
<li>Image is cropped to 200x104 resolution</li>
<li>Image Path contains compressed folder</li>
</ul>
<a name="What-happened"></a>
<h3 >What happened<a href="#What-happened" class="wiki-anchor">¶</a></h3>
<ul>
<li>Image Resolution is still 200x200</li>
<li>Image ratio is 1:1</li>
<li>Filepath is path to original file</li>
</ul>
<a name="Acceptance-Test"></a>
<h2 >Acceptance Test<a href="#Acceptance-Test" class="wiki-anchor">¶</a></h2>
<ul>
<li>Use one of Example files as Open Graph Image or Twitter Card Image in page properties</li>
<li>Original file 200x200 cropped to 200x104</li>
<li>Original file 2000x800 cropped to 1522x800</li>
<li>og:image and og:image:url tag contains something like "../fileadmin/_processed_/.." in file path</li>
</ul> TYPO3 Core - Bug #97964 (Closed): External page links in HMENU do not respect config.extTarget an...http://forge.typo3.org/issues/979642022-07-17T20:58:48ZSascha Egerer
<p>Since <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Inconsistent handling of pages.target when linking (Closed)" href="http://forge.typo3.org/issues/96470">#96470</a> / <a class="changeset" title="[BUGFIX] Use "pages.target" properly for Pages with External URL The database field "pages.targe..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/361bb8c3ca8fdaf5caf818b55d4783ed6dfc3bac">361bb8c3ca8fdaf5caf818b55d4783ed6dfc3bac</a> the settings config.extTarget is not applied anymore to HMENU links.</p>
<a name="Test-Plan"></a>
<h2 >Test Plan:<a href="#Test-Plan" class="wiki-anchor">¶</a></h2>
<p>1. Create a menu<br />2. Create a page of type external link that is rendered in the menu<br />3. Do not set anything in the <code>pages.target</code> field<br />4. Configure the TypoScript option <code>config.extTarget = _blank</code></p>
<a name="Current-behavior"></a>
<h2 >Current behavior:<a href="#Current-behavior" class="wiki-anchor">¶</a></h2>
<p>Link is generated without a target attribute</p>
<a name="Expected-behavior-and-also-behavior-in-TYPO3-10"></a>
<h2 >Expected behavior and also behavior in TYPO3 10:<a href="#Expected-behavior-and-also-behavior-in-TYPO3-10" class="wiki-anchor">¶</a></h2>
<p>Link is generated with <code>target="_blank"</code></p> TYPO3 Core - Bug #97646 (Closed): Extbase property mapper does not work with uninitialized proper...http://forge.typo3.org/issues/976462022-05-17T09:23:47ZSascha Egerer
<p>Extbase does not map properties that are not initialized.<br />Since PHP 7.4 it is possible to have uninitialized properties which is not the same as nullable properties.</p>
<p>The PHP method `get_object_vars($object)` does only return initialized properties.<br />The PHP method `get_class_vars(get_class($object))` returns the properties of the class.</p>
<p>So as soon as a property is typed but not initialized it will not be returned by get_object_vars(). This breaks the extbase mapper.</p>
<p>See <a class="external" href="https://3v4l.org/QvVnT">https://3v4l.org/QvVnT</a></p> TYPO3 Core - Bug #96922 (New): FAL file DuplicationBehavior::REPLACE is using public file pathhttp://forge.typo3.org/issues/969222022-02-16T10:28:48ZSascha Egerer
<p>When a file is uploaded with an existing name there are different behaviors to choose from.<br />One is the DuplicationBehavior::REPLACE which should replace the existing file.</p>
<p>Currently the "public path" of the file is used to get the file on the storage which does not make sense and fails, if the public path is returning something else then it is on the storage.</p>
<p>See <a class="external" href="https://github.com/TYPO3/typo3/blob/bc15ad4b24a3c76087a2aa1172d44cb84fe0569c/typo3/sysext/core/Classes/Resource/ResourceStorage.php#L2068">https://github.com/TYPO3/typo3/blob/bc15ad4b24a3c76087a2aa1172d44cb84fe0569c/typo3/sysext/core/Classes/Resource/ResourceStorage.php#L2068</a></p>
<p>The public path must not be used to do file operations on the storage but only to provide a path for the public (web) usage.</p> TYPO3 Core - Bug #92956 (Closed): Wrong context passed to processPlaceholders in YAML processImportshttp://forge.typo3.org/issues/929562020-11-30T13:10:30ZSascha Egerer
<p>The `YamlFileLoader::processPlaceholders()` method called in `YamlFileLoader::processImports()` receives a wrong set of data as reference array. So it is not possible to access placeholders that are already defined but only call new placeholder methods.</p> TYPO3 Core - Bug #90908 (Closed): Zeros are not treated as empty values in `.ifEmpty`http://forge.typo3.org/issues/909082020-03-31T13:18:18ZSascha Egerer
<p>In TYPO3 9.5.15 the functionality of stdWrap ifEmpty has been changed. <a class="changeset" title="[BUGFIX] Fix check for "ifEmpty" relevance The ContentObjectRenderer checks whether it is releva..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/137b381561cfd51edddf9b398427dbce35086dba">137b381561cfd51edddf9b398427dbce35086dba</a><br />Before this change a value of `0` was evaluated to false but now it is true.</p>
<p>IMO this change should be reverted as it is a breaking change.</p> TYPO3 Core - Bug #88587 (Closed): Use late static binding return type for Enumeration::cast http://forge.typo3.org/issues/885872019-06-18T16:37:53ZSascha Egerer
<p><code>TYPO3\CMS\Core\Type\Enumeration</code> should use a late static binding return type <code>static</code> instead of <code>self</code> at it returns an instance of the child class.</p> TYPO3 Core - Bug #87914 (Closed): Remove deprecated options / values from YouTube Rendererhttp://forge.typo3.org/issues/879142019-03-14T17:39:06ZSascha Egerer
<p>The YouTube Render does use YouTube API Arguments that do not exist anymore.</p>
<p><a class="external" href="https://developers.google.com/youtube/player_parameters#Revision_History">https://developers.google.com/youtube/player_parameters#Revision_History</a></p>
<ul>
<li><code>showinfo</code> can be removed as it does not exist anymore</li>
<li><code>controls</code> the value <code>2</code> can be removed as it is deprecated and has no effect</li>
</ul> TYPO3 Core - Bug #87913 (Closed): Remove playlist parameter from YouTube URL if it should play in...http://forge.typo3.org/issues/879132019-03-14T17:05:58ZSascha Egerer
<p>In <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: "loop" parameter require "playlist" parameter for embedded Youtube videos & Allow configuration f... (Closed)" href="http://forge.typo3.org/issues/78053">#78053</a> a change was introduced in the YouTubeRenderer to always add a playlist if the "loop" option is set.<br />The reason was, that the playlist parameter was required by YouTube but this is not true actually. It was only required for the deprecated AS3 Flash player.</p>
<p>See <a class="external" href="https://developers.google.com/youtube/player_parameters#loop">https://developers.google.com/youtube/player_parameters#loop</a><br /><pre>
Note: This parameter has limited support in the AS3 player and in IFrame embeds, which could load either the AS3 or HTML5 player. Currently, the loop parameter only works in the AS3 player when used in conjunction with the playlist parameter. To loop a single video, set the loop parameter value to 1 and set the playlist parameter value to the same video ID already specified in the Player API URL:
</pre></p>
<p>The playlist param must not be set automatically as it does add a playlist to the video which contains the same video 2 times and does not really look good.</p>
<p>With playlist<br /><img src="http://forge.typo3.org/attachments/download/34186/withPlaylist.png" alt="" loading="lazy" /><br /><img src="http://forge.typo3.org/attachments/download/34188/playlist.png" alt="" loading="lazy" /></p>
<p>without playlist<br /><img src="http://forge.typo3.org/attachments/download/34187/withoutPlaylist.png" alt="" loading="lazy" /></p> TYPO3 Core - Bug #87911 (Closed): (YouTube|Vimeo)Renderer renders broken tag if additionalAttribu...http://forge.typo3.org/issues/879112019-03-14T12:55:54ZSascha Egerer
<p>Since the commit <a class="changeset" title="[SECURITY] Properly escape videoId for YouTube/Vimeo Resolves: #83184 Releases: master, 8.7, 7.6..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/a32a9a746f807b14571139f0cb7caa00b8d037a5">a32a9a746f807b14571139f0cb7caa00b8d037a5</a> the Youtube and Vimeo Renderes are broken if the attribute additionalAttributes is given.</p>
<p>Test Case: <br /><pre><code class="html syntaxhl" data-language="html"><span class="nt"><f:media</span> <span class="na">file=</span><span class="s">"{video}"</span> <span class="na">additionalConfig=</span><span class="s">"{loop: 0}"</span> <span class="na">additionalAttributes=</span><span class="s">"{poster: ''}"</span> <span class="nt">/></span>
</code></pre></p>
<p>Current result:<br /><pre><code class="html syntaxhl" data-language="html"><span class="nt"><iframe</span> <span class="na">src=</span><span class="s">"https://www.youtube-nocookie.com/embed/XXX?autohide=1&amp;controls=2&amp;enablejsapi=1&amp;origin=https%3A%2F%2FXXX&amp;showinfo=0"</span> <span class="na">allowfullscreen</span> <span class="err">0="</span><span class="na">poster=</span><span class="s">&quot;&quot;"</span> <span class="na">allow=</span><span class="s">"fullscreen"</span><span class="nt">></iframe></span></code></pre></p>
<p>Expected and previous result:<br /><pre><code class="html syntaxhl" data-language="html"><span class="nt"><iframe</span> <span class="na">src=</span><span class="s">"https://www.youtube-nocookie.com/embed/XXX?autohide=1&amp;controls=2&amp;enablejsapi=1&amp;origin=https%3A%2F%2FXXX&amp;showinfo=0"</span> <span class="na">allowfullscreen</span> <span class="na">poster=</span><span class="s">""</span> <span class="na">allow=</span><span class="s">"fullscreen"</span><span class="nt">></iframe></span></code></pre></p> TYPO3 Core - Bug #86795 (Closed): Execute scheduler tasks orderd by next execution timehttp://forge.typo3.org/issues/867952018-10-30T10:51:34ZSascha Egerer
<p>The scheduler tasks should be executed where the order does respect the next execution time.<br />So if you have 2 tasks and both are overdue the next exection time of the tasks should be respected.<br />That means for example task 1 is scheduled for 00:02 ad task 2 is scheduled for 00:01 then the task 2 should be executed before task 1 is executed.</p>