TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692024-03-27T17:18:45ZTYPO3 Forge
Redmine TYPO3 Core - Bug #103494 (Under Review): Linkvalidator uses tstamp field directly without checkin...http://forge.typo3.org/issues/1034942024-03-27T17:18:45ZSybille Peterssypets@gmx.de
<p><strong>This should be merged before <a class="external" href="https://review.typo3.org/c/Packages/TYPO3.CMS/+/83612">https://review.typo3.org/c/Packages/TYPO3.CMS/+/83612</a></strong></p>
<p>TCA should be used to determine which field is relevant for tstamp (and if there is such a field) before using it for a DB query</p>
<p>$GLOBALS['TCA'][$table]['ctrl']['tstamp']</p>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<ol>
<li>Change configuration to mod.linkvalidator.searchFields.sys_redirect.target</li>
<li>check links (with a broken redirect target)</li>
<li>in the list of broken links, click pencil to edit redirect target field</li>
<li>close edit field</li>
</ol>
<p>Now, exception is thrown.</p> TYPO3 Core - Task #103477 (Under Review): Documentation for Link Validator searchFields says it i...http://forge.typo3.org/issues/1034772024-03-25T05:45:44ZSybille Peterssypets@gmx.de
<p>This is no longer true, Link Validator also checks fields if TCA is configured with "type" => "link".</p>
<blockquote>
<p>Currently, LinkValidator can only detect links for fields having at least one softref set in their TCA configuration.</p>
</blockquote>
<p><a class="external" href="https://docs.typo3.org/c/typo3/cms-linkvalidator/main/en-us/Configuration/Index.html#searchfields-key">https://docs.typo3.org/c/typo3/cms-linkvalidator/main/en-us/Configuration/Index.html#searchfields-key</a></p>
<p><strong>LinkAnalyzer.php:</strong></p>
<pre><code class="php syntaxhl" data-language="php"><span class="k">if</span> <span class="p">((</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">'type'</span><span class="p">]</span> <span class="o">??</span> <span class="s1">''</span><span class="p">)</span> <span class="o">===</span> <span class="s1">'link'</span> <span class="o">&&</span> <span class="k">empty</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">'softref'</span><span class="p">]))</span> <span class="p">{</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">'softref'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'typolink'</span><span class="p">;</span>
<span class="p">}</span>
</code></pre>
<p>patch can be backported up to v12.</p> TYPO3 Core - Bug #103476 (Under Review): Disrepancy of returned link type in LinktypeInternal::fe...http://forge.typo3.org/issues/1034762024-03-23T16:22:43ZSybille Peterssypets@gmx.de
<p>Currently, when calling fetchType for various link types differs if you change the order of the link types.</p>
<p>Also, InternalLinktype always returns "db" link type if the "db" link type is set by the softref parser even if it has no business doing so.</p>
<p>These link types are mutually exclusive:</p>
<p>- "db" => InternalLinktype<br />- "file" => FileLinktype<br />- "record" => RecordLinktype (introduced in patch via issue <a class="issue tracker-2 status-8 priority-3 priority-lowest" title="Feature: Make it possible to check custom record links with linkvalidator (Under Review)" href="http://forge.typo3.org/issues/103403">#103403</a>)</p>
<p>However, the softref parsers returns "db" for all of these.</p>
<p>Fixing this may avoid problems further down the line.</p>
<a name="Test-protocol-by-debugging-the-link-types"></a>
<h2 >Test protocol (by debugging the link types)<a href="#Test-protocol-by-debugging-the-link-types" class="wiki-anchor">¶</a></h2>
<p>file link: t3://file?uid=<uid><br />-------------------------------------</p>
<p>$softRefEntry<br />- value['type'] = 'db'<br />- value['recordRef'] = 'sys_file:94'<br />- value['tokenValue'] = 'file:94'</p>
<p>- result of fetchType: (order: db, file)<br /> - if class=InternatlLinktype => AbstactLinktype::fetchType: 'db'<br /> - if class=FileLinktype => FileLinkType::fetchType: 'file'</p>
<p>- after changing order: file,db<br /> - if class=FileLinktype => FileLinkType::fetchType: 'file'<br /> sets $value['type'] to 'file'<br /> - if class=InternatlLinktype => AbstactLinktype::fetchType: 'file'</p>
<p>!!!! discrepancy !!! effective type depends on order of evaluation!</p>
<blockquote><blockquote>
<p>if "file" type is not in "linktypes", file links will be checked with InteralLinktype</p>
</blockquote></blockquote>
BUT if "file" type is in "linktypes, file links will be checked with FileLinktype
<p>The result is in most cases still ok, because InternalLinktype refuses to check file links, but it is messy, makes troubleshooting difficult and may cause problems in some scenarios.</p> TYPO3 Core - Feature #103403 (Under Review): Make it possible to check custom record links with l...http://forge.typo3.org/issues/1034032024-03-15T09:45:42ZSybille Peterssypets@gmx.de
<p><strong>Currently, there is a known problem that RECORD link checking is not possible via the typolink_tag softref parser, see <a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: Linkvalidator doesn't check record/custom links within RTEs at all (New)" href="http://forge.typo3.org/issues/102468">#102468</a>. Because of this, when fixing this issue, one must currently test the record link checking using urls which are not wrapped in an a tag. This can be done for example, by using tt_content.header_link.</strong></p>
<p>e.g. "t3://record?identifier=tx_news&uid=99999"</p>
<p>as described in <a class="external" href="https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/BestPractice/Linkhandler/Index.html#linkhandler">https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/BestPractice/Linkhandler/Index.html#linkhandler</a></p>
<p>Currently, InternalLinktype::checkLink is called for these types of links, but then it always evaluates to "true" if the target table is not "tt_content" or "pages":</p>
<pre><code class="php syntaxhl" data-language="php"><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nb">in_array</span><span class="p">(</span><span class="nv">$table</span><span class="p">,</span> <span class="p">[</span><span class="s1">'pages'</span><span class="p">,</span> <span class="s1">'tt_content'</span><span class="p">],</span> <span class="kc">true</span><span class="p">))</span> <span class="p">{</span>
<span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
<span class="p">}</span>
</code></pre>
<p><a class="external" href="https://github.com/TYPO3/typo3/blob/5c95229af666e4ce39dd5a22baecd3390d649c49/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php#L85">https://github.com/TYPO3/typo3/blob/5c95229af666e4ce39dd5a22baecd3390d649c49/typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php#L85</a></p>
<p>Ideally, the InternalLinktype could handle custom records for other tables as well, e.g. tx_news_domain_model_news.</p> TYPO3 Core - Feature #103090 (Under Review): Add possibility to configure a language label for cu...http://forge.typo3.org/issues/1030902024-02-09T11:44:27ZSybille Peterssypets@gmx.de
<p>If you configure additional link types, the label which is display, will always be the link type (as used as identifier) because core LinkvalidatorController uses:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="s1">'label'</span> <span class="o">=></span> <span class="nv">$this</span><span class="o">-></span><span class="nf">getLanguageService</span><span class="p">()</span><span class="o">-></span><span class="nf">sL</span><span class="p">(</span><span class="s1">'LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:hooks.'</span> <span class="mf">.</span> <span class="nv">$type</span><span class="p">)</span> <span class="o">?:</span> <span class="nv">$type</span><span class="p">,</span>
</code></pre>
<p>We could add another function to the LinktypeInterface to pass the language string.</p> TYPO3 Core - Feature #101935 (New): Better handling of curl error codes in linkvalidatorhttp://forge.typo3.org/issues/1019352023-09-17T14:38:56ZSybille Peterssypets@gmx.de
<p>Unfortunately, one curl error codes may be used for several different problems, e.g.</p>
<p>1. Certificate does not have matching target host name<br />2. Missing intermediate certificate - incomplete certificate chain</p>
<p>The text which is displayed by command line curl / or using Guzzle with libcurl does contain a different text in this case, but the error code is still the same (60 for the examples above).</p>
<p>A number of error codes were localized and the internal linkvalidator text is displayed, not the full error message supplied by curl.</p>
<a name="Solution"></a>
<h2 >Solution<a href="#Solution" class="wiki-anchor">¶</a></h2>
<p>(preliminary ideas)</p>
<ul>
<li>We should find a way to make this configurable, so that the full curl error message will be displayed</li>
<li>show both (e.g. show shorter, localized message by default and show full message as detail view</li>
</ul>
<a name="Info"></a>
<h2 >Info<a href="#Info" class="wiki-anchor">¶</a></h2>
<ul>
<li>curl error codes: <a class="external" href="https://curl.se/libcurl/c/libcurl-errors.html">https://curl.se/libcurl/c/libcurl-errors.html</a></li>
<li>curl source code: <a class="external" href="https://github.com/curl/curl">https://github.com/curl/curl</a></li>
</ul>
<a name="Examples"></a>
<h2 >Examples<a href="#Examples" class="wiki-anchor">¶</a></h2>
<pre>
curl -LI "https://www.rea.ru"
curl: (60) SSL certificate problem: unable to get local issuer certificate
</pre>
<pre>
curl -I https://t3coredev13
curl: (60) SSL: no alternative certificate subject name matches target host name 't3coredev13'
</pre> TYPO3 Core - Feature #101077 (New): Improve administrative handling of "Anonymize IP Adresses"http://forge.typo3.org/issues/1010772023-06-15T05:24:09ZSybille Peterssypets@gmx.de
<ul>
<li>currently it is only possible to select 1 table in the task (but more can be configured in ext_localconf.php)</li>
<li>the task is a scheduler task which means you have to create a scheduler task first, you can't just run it from the console (which means extra work and you can't (easily) store the configuration in a Git repo)</li>
</ul>
<a name="Sugestions"></a>
<h2 >Sugestions<a href="#Sugestions" class="wiki-anchor">¶</a></h2>
<ul>
<li>make a Symfony command out of it</li>
<li>make it possible to run it with "all configured tables" which would use all tables in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][self::class]['options']</li>
</ul>
<p>In the "Table garbage collection" task there is a checkbox "Clean all available tables"</p>
<a name="Side-note"></a>
<h2 >Side note<a href="#Side-note" class="wiki-anchor">¶</a></h2>
<p>It is unclear to me whether all current scheduler tasks will be migrated to Symfony commands in the future.</p> TYPO3 Core - Feature #100195 (New): Make Shortcut Target [shortcut] a required field for pages.do...http://forge.typo3.org/issues/1001952023-03-17T09:00:15ZSybille Peterssypets@gmx.de
<p>is a bit difficult to solve:</p>
<p>!!! If shortcut_mode != 0, the shortcut is not necessary. So we can't just make it a required field in this case.<br />!!! If we add a displayCond (see below) and make it reuqired, we can't switch from shortcut_mode = 0 to shortcut_mode != 0 and empty 'shortcut' (because due to the displayCond the form would be saved and this is prevented by the required)</p>
<p>1. shortcut should only be displayed if shortcut_mode=0<br />2. if displayed, shortcut should be required<br />3. ?? if a translation, empty shortcut seems to be ok as well (though other fields behave differently)</p>
<p>Thus, the following code cannot be used:</p>
<p>Configuration/TCA/Overrides/pages.php:</p>
<pre>
// condition: show shortcut if shortcut_mode = 0
$GLOBALS['TCA']['pages']['columns']['shortcut']['displayCond'] = 'FIELD:shortcut_mode:=:0';
// override type "shortcut": make it a a required field
$GLOBALS['TCA']['pages']['types'][(string)\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_SHORTCUT]['columnsOverrides'] =
[
'shortcut' => [
'config' => [
'eval' => 'required',
],
],
];
</pre> TYPO3 Core - Bug #100148 (Under Review): layout SystemEmail should not show URL if URL is not sethttp://forge.typo3.org/issues/1001482023-03-12T11:08:48ZSybille Peterssypets@gmx.de
<p>If a system email is sent via cli (command line) an awkward string is displayed in the footer.</p>
<p>Example:</p>
<blockquote>
<p>This email was sent by TYPO3 test site from URL: - Please contact</p>
</blockquote>
<p>Should be:</p>
<blockquote>
<p>This email was sent by TYPO3 test site - Please contact</p>
</blockquote>
<p>If the URL is set, this looks like this:</p>
<blockquote>
<p>This email was sent by TYPO3 test site from URL: <a class="external" href="https://t3coredev">https://t3coredev</a> - Please contact</p>
</blockquote> TYPO3 Core - Story #97528 (New): Add check for references and safe way to delete files in FAL to ...http://forge.typo3.org/issues/975282022-05-02T09:25:10ZSybille Peterssypets@gmx.de
<p>Status: In progress, I can split this up into individual patches.</p>
<hr />
<p>Add public functionality to</p>
<ul>
<li>check if there are references to a file / within a folder (see also FileList::makeRef, ExtendedFileUtility::func_delete and ExtendedFileUtility::folderHasFilesInUse)</li>
<li>return the references to a file</li>
<li>"safely" delete a file / folder (checking for references)</li>
</ul>
<p>If possible, use this functionality instead of having duplicate code or move the functionality to the public API and then use the function there:</p>
<ul>
<li>FileList::makeRef: count number of references</li>
<li>ExtendedFileUtility::func_delete: checking for references</li>
<li>ExtendedFileUtility::transformFileReferenceToRecordReference</li>
</ul>
<p>Add phpdoc / documentation note pointing out that a check for references is not performed when deleting a file in</p>
<ul>
<li>AbstractFile::delete() and Folder::delete()</li>
<li>ResourceStorage::deleteFile() + deleteFolder()</li>
<li>documentation: <a class="external" href="https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html#deleting-a-file">https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html#deleting-a-file</a></li>
</ul>
<p>Add phpdoc / documentation note that this function only handles references within the sys_file_references table. TYPO3 - when performing functionality which concern references (including soft references) typically uses sys_refindex in combination with sys_file_references (which will also consider the soft references) - depending on where this functionality is used, we might want to check for both. In any case, it might make sense to point this out here:</p>
<ul>
<li>FileRepository::findByRelation</li>
<li>documentation: <a class="external" href="https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html#getting-referenced-files">https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Fal/UsingFal/ExamplesFileFolder.html#getting-referenced-files</a></li>
</ul>
<p>A similar note in phpdoc does exist in LocalDriver::deleteFile:</p>
<blockquote>
<ul>
<li>This does not check if the file is</li>
<li>still used or if it is a bad idea to delete it for some other reason</li>
<li>this has to be taken care of in the upper layers (e.g. the Storage)!</li>
</ul>
</blockquote>
<hr />
<p>In TYPO3, there is functionality to delete files, but the function ExtendedFileUtility::func_delete() which does it safely by checking the references has the problem that it is "internal" and not public and also it sends flash messages (which might be a problem if called from CLI command).</p>
<p>The functionality which is public and usable does not check for references (as it is used as lowlevel functionality). AFAIK there is not public API which safely handles the deletion.</p>
<p>Also, there is no phpdoc that points out that it does not (except in the lower level driver functions).</p>
<p>AFAIK, there is no publicly available function which checks for references. The checking for references is done directly in the the code (e.g. in ExtendedFileUtility::func_delete.</p>
<p>So effectively, you have to handle this yourself - which might result in it being done incorrectly and adds lots of internal TYPO3 functionality to code, making it less maintainable. Also, it is a bit complicated to handle sys_refindex and sys_file_references, see also ExtendedFileUtility::func_delete - so that would be really helpful to have some public API functions.</p> TYPO3 Core - Task #96110 (New): Clarify usage of custom linkhandler functionality in redirects mo...http://forge.typo3.org/issues/961102021-11-27T19:14:54ZSybille Peterssypets@gmx.de
<p>Currently we documented only links to page, file, URL or path in target of redirects: <a class="external" href="https://docs.typo3.org/c/typo3/cms-redirects/master/en-us/Usage/Index.html#confval-Target">https://docs.typo3.org/c/typo3/cms-redirects/master/en-us/Usage/Index.html#confval-Target</a></p>
<p>We should also address custom links to records (linkhandler).</p>
<p>This seems to work in general (the target is resolved), e.g. for t3://record?identifier=tx_news&uid=1. But there are some problems / thinks to clarify and document.</p>
<p>todos:</p>
<ul>
<li>clarify which URIs are supported (telephone, email does not make sense though, but links to records, e.g. news possibly)</li>
<li>how to configure, e.g. link browser configured by page TSconfig, FE configured by TypoScript, this is usually bound to a page or set globally</li>
<li>update documentation</li>
<li>icon for target not displayed - (should be checked if this works)</li>
</ul>
<p><img src="http://forge.typo3.org/attachments/download/36589/link_target.png" alt="" loading="lazy" /></p>
<p>see also <a class="external" href="https://docs.typo3.org/p/georgringer/news/master/en-us/Tutorials/Integration/Linkhandler/Index.html">https://docs.typo3.org/p/georgringer/news/master/en-us/Tutorials/Integration/Linkhandler/Index.html</a></p>
<p>Should be researched further ...</p> TYPO3 Core - Task #90503 (Accepted): SEO documentation: site configurationhttp://forge.typo3.org/issues/905032020-02-23T08:46:39ZSybille Peterssypets@gmx.de
<p>I would use the same terms as in the "Site Configuration" module.</p>
<p>Example:</p>
<p>In the section <a href="https://docs.typo3.org/c/typo3/cms-seo/master/en-us/Configuration/Index.html#domains" class="external">Domains</a> (in TypoScript settings) there is a warning:</p>
<blockquote>
<p>Please ensure, that you have configured your sites so that they all have an entry point. This is used for generating the canonical tags, for example.</p>
</blockquote>
<blockquote>
<p>Warning</p>
</blockquote>
<blockquote>
<p>Please be aware that for SEO purposes it is best practise to use a fully qualified domain (for example: <a class="external" href="https://www.example.com">https://www.example.com</a>). Therefor we don’t support the SEO enhancements in TYPO3 without a full domain. It might work, but it is not officially supported.</p>
</blockquote>
<p>"use a fully qualified domain" where? I guess it is meant in the site configuration tab "General" "Entry Point" from the context, but the screenshot above does not use a FQDN, just /.</p>
<p>So I would</p>
<ol>
<li>update the screenshot to use a domain</li>
<li>use the same terms in the text as in the configuration (and screenshot), e.g.:</li>
</ol>
<ul>
<li>"General > Entry Point" (instead of "Domains")</li>
<li>"Languages" instead of "Language" </li>
<li>"Error Handling" instead of "Error pages"</li>
</ul>
<p>"it is best practise to use a fully qualified domain for the :guilable:`Entry Point`</p>