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 - Task #101934 (Closed): Cleanup code for ContentObjectRenderer::listNum and add testshttp://forge.typo3.org/issues/1019342023-09-17T12:18:16ZSybille Peterssypets@gmx.de
<p>- Add unit tests for function ContentObjectRenderer::listNum.<br />- Improve code by renaming function argument ($char => $delimeter)<br />- Make sure arguments are always passed as strings (and not null)<br /> (as declared in PHPDoc)<br />- Improve clarity of description in PHPDoc</p>
<p>In the future typehints can be added for function arguments and<br />return type.</p> TYPO3 Core - Task #101716 (Closed): Improve changelog Breaking-100229-ConvertJSConfirmationToBitS...http://forge.typo3.org/issues/1017162023-08-20T08:45:00ZSybille Peterssypets@gmx.de
<p><a class="external" href="https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.0/Breaking-100229-ConvertJSConfirmationToBitSet.html">https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.0/Breaking-100229-ConvertJSConfirmationToBitSet.html</a></p>
<p>The improvements are pretty minimal and not strictly necessary (except for the formatting). Normally, I would not start a patch for this, but there is already a patch <a class="external" href="https://review.typo3.org/c/Packages/TYPO3.CMS/+/80599">https://review.typo3.org/c/Packages/TYPO3.CMS/+/80599</a> where I first intended to make more changes (in particular the formatting of the bullet lists), but was deemed as too much.</p>
<p>1. bullet lists should have a newline before and after, otherwise they will not be rendered correctly, see <a class="external" href="https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.0/Breaking-100229-ConvertJSConfirmationToBitSet.html#impact">https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.0/Breaking-100229-ConvertJSConfirmationToBitSet.html#impact</a>: matches, setValue and isValid is a list</p>
<p>2. \TYPO3\CMS\Core\Type\Bitmask\JSConfirmation::method should be \TYPO3\CMS\Core\Type\Bitmask\JSConfirmation?</p>
<p>3. "calling public methods methods" should be "calling public methods"</p>
<p>4. The part for BackendUserAuthentication->jsConfirmation() in "Affected installations" could be rephrased for "affected installations"</p> TYPO3 Core - Task #101715 (Closed): Fix syntax for lists in .rst fileshttp://forge.typo3.org/issues/1017152023-08-20T08:18:19ZSybille Peterssypets@gmx.de
<p><a class="external" href="https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/WritingReST/CommonPitfalls/Lists.html">https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/WritingReST/CommonPitfalls/Lists.html</a></p> 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 - Task #96015 (Closed): Remove unused language labelshttp://forge.typo3.org/issues/960152021-11-17T18:32:32ZSybille Peterssypets@gmx.de
LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:
<ul>
<li>source_host</li>
<li>source_path</li>
<li>destination</li>
<li>hits</li>
<li>hit_last</li>
<li>filter.destination</li>
</ul> TYPO3 Core - Feature #92231 (Closed): Add some more error messages to linkvalidatorhttp://forge.typo3.org/issues/922312020-09-08T18:55:47ZSybille Peterssypets@gmx.de
<p>For some error types, the error messages are too long, verbose and not suited for non technical audience.</p>
<p>The reason is, that not all error types have language strings and in some cases a generic error message and the exception (from Guzzle) is used.</p>
<p>I would propose to add some more error messages.</p>
<p>Also, the "Network error / invalid domain" error message is misleading, because all error reasons listed in <a class="external" href="https://curl.haxx.se/libcurl/c/libcurl-errors.html">https://curl.haxx.se/libcurl/c/libcurl-errors.html</a> return that. In fact, the error code is also returned which could be used to give a more specific error message.</p>
<a name="Examples-that-already-have-short-custom-error-messages"></a>
<h2 >Examples that already have short custom error messages:<a href="#Examples-that-already-have-short-custom-error-messages" class="wiki-anchor">¶</a></h2>
<p>404:</p>
<pre><code class="text syntaxhl" data-language="text">The requested url was not found (404).
</code></pre>
<p>403:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="nc">Accessing</span> <span class="n">this</span> <span class="n">address</span> <span class="n">is</span> <span class="n">not</span> <span class="nf">allowed</span> <span class="p">(</span><span class="mi">403</span><span class="p">)</span><span class="mf">.</span>
</code></pre>
<a name="Examples-for-errors-with-long-and-cluttered-error-message"></a>
<h2 >Examples for errors with long and cluttered error message<a href="#Examples-for-errors-with-long-and-cluttered-error-message" class="wiki-anchor">¶</a></h2>
<p>401:</p>
<pre><code class="text syntaxhl" data-language="text">An error occurred (401): "Client error: `GET https://url-which-requires-login/login` resulted in a `401 Unauthorized` response:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xh (truncated...)
".
</code></pre>
<p>wrong domain:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:cURL error 6: Could not resolve host: invalid-domain.de; Unknown error (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
</code></pre>
<p>ssl problem:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:cURL error 51: Unable to communicate securely with peer: requested domain name does not match the server's certificate. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
</code></pre>
<p>timeout:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:cURL error 28: Connection timed out after 10001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
</code></pre>
<p>HTTP Status code 500:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:Server error: `GET http://some-domain/` resulted in a `500 Internal Server Error` response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
< (truncated...)
</code></pre>
<p>wrong protocol:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:cURL error 1: Protocol hhttps not supported or disabled in libcurl (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
</code></pre>
<p>502:</p>
<pre><code class="text syntaxhl" data-language="text">Network error / invalid domain:Server error: `GET http://hochschule-ohne-grenzen.org/` resulted in a `502 Proxy Error` response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy E (truncated...)
07.09.20 16:15
</code></pre> TYPO3 Core - Task #84836 (Closed): Create a template with best practices for php files in Build/S...http://forge.typo3.org/issues/848362018-04-22T15:00:55ZSybille Peterssypets@gmx.de
<p>Some of the existing scripts in Build/Scripts have been converted to PHP. New scripts will be created. It might be good to have a template which includes some best practices, e.g.</p>
<ul>
<li>security: abort script if not called from command line</li>
<li>handle command line arguments</li>
<li>Apply <a href="https://www.php-fig.org/psr/psr-1/#23-side-effects" class="external">PSR-1 2.3 Side Effects</a> ? Which could mean do not define class and execute it in one file. </li>
<li>... more?</li>
</ul>
<p>This script could continuously be refined and the other scripts updated at least for critical and security-related things.</p> TYPO3 Core - Bug #69665 (Closed): Rendering of TypoScript shortcutIcon does not consider HTTPS (i...http://forge.typo3.org/issues/696652015-09-11T12:40:28ZSybille Peterssypets@gmx.de
<p>IMHO it should be possible to enter the URL for shortcutIcon as arbitrary URL, specifically in any the following formats:</p>
<ul>
<li>absolute path, starting with /</li>
<li>absolute URL e.g. <a class="external" href="https://www.example.org">https://www.example.org</a></li>
<li>scheme relative : //www.example.org</li>
</ul>
<p>The current rendering is not flexible enough for HTTP/ HTTPS because the rendered and cached page will be dependant on the URL scheme first used. This may result in a URL with HTTP scheme used for favicon (if the page is first fetched via http), which will then be cached and used for HTTPS as well resulting in security warnings (mixed content).</p>
<a name="TYPO3-source-code-45-and-62-more-or-less-the-same"></a>
<h1 >TYPO3 source code (4.5 and 6.2 more or less the same):<a href="#TYPO3-source-code-45-and-62-more-or-less-the-same" class="wiki-anchor">¶</a></h1>
<pre><code class="php syntaxhl" data-language="php"><span class="k">if</span> <span class="p">(</span><span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'TSFE'</span><span class="p">]</span><span class="o">-></span><span class="n">pSetup</span><span class="p">[</span><span class="s1">'shortcutIcon'</span><span class="p">])</span> <span class="p">{</span>
<span class="nv">$favIcon</span> <span class="o">=</span> <span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'TSFE'</span><span class="p">]</span><span class="o">-></span><span class="n">tmpl</span><span class="o">-></span><span class="nf">getFileName</span><span class="p">(</span><span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'TSFE'</span><span class="p">]</span><span class="o">-></span><span class="n">pSetup</span><span class="p">[</span><span class="s1">'shortcutIcon'</span><span class="p">]);</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">is_file</span><span class="p">(</span><span class="n">PATH_site</span> <span class="mf">.</span> <span class="nv">$favIcon</span><span class="p">))</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">'finfo_open'</span><span class="p">))</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nv">$finfo</span> <span class="o">=</span> <span class="o">@</span><span class="nb">finfo_open</span><span class="p">(</span><span class="no">FILEINFO_MIME</span><span class="p">))</span> <span class="p">{</span>
<span class="nv">$iconMimeType</span> <span class="o">=</span> <span class="s1">' type="'</span> <span class="mf">.</span> <span class="nb">finfo_file</span><span class="p">(</span><span class="nv">$finfo</span><span class="p">,</span> <span class="p">(</span><span class="n">PATH_site</span> <span class="mf">.</span> <span class="nv">$favIcon</span><span class="p">))</span> <span class="mf">.</span> <span class="s1">'"'</span><span class="p">;</span>
<span class="nb">finfo_close</span><span class="p">(</span><span class="nv">$finfo</span><span class="p">);</span>
<span class="nv">$pageRenderer</span><span class="o">-></span><span class="nf">setIconMimeType</span><span class="p">(</span><span class="nv">$iconMimeType</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="nv">$pageRenderer</span><span class="o">-></span><span class="nf">setFavIcon</span><span class="p">(</span><span class="nc">GeneralUtility</span><span class="o">::</span><span class="nf">getIndpEnv</span><span class="p">(</span><span class="s1">'TYPO3_SITE_URL'</span><span class="p">)</span> <span class="mf">.</span> <span class="nv">$favIcon</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
<p>As you can see, it is not possible to use relative or absolute paths because TYPO3_SITE_URL is prepended in any case. It is not possible to use absolute URLs because this will result in is_file failing.</p>
<p>This issue has actually already been reported, but for typo3.org, see <a class="external" href="https://forge.typo3.org/issues/58265">https://forge.typo3.org/issues/58265</a></p>
<p>Any help is appreciated.</p> TYPO3 Core - Feature #36542 (Closed): Changed domain handling on "View webpage" from backend caus...http://forge.typo3.org/issues/365422012-04-25T12:32:51ZSybille Peterssypets@gmx.de
<p>Due to fix for Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: t3lib_befunc::getViewDomain returns wrong or no domain (Closed)" href="http://forge.typo3.org/issues/30892">#30892</a>:</p>
<p>This new behaviour causes problems for us.</p>
<p>For a long time (due to bug or not) the domain currently used in the backend was used for loading a page with "View webpage". Due to the change in getViewDomain, the first domain from the domain records is now used.</p>
<p>On multi-site installations we use a generic domain for working in the backend and this should be consistent with the domain used for viewing the page from the backend.</p>
<p>We now have to patch the core or completely change handling.</p>
<p>Ideal would be to make this configurable !!!</p>