TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692023-04-25T10:08:11ZTYPO3 Forge
Redmine TYPO3 Core - Bug #100746 (New): Better handling of images with wrong file endinghttp://forge.typo3.org/issues/1007462023-04-25T10:08:11ZSybille Peterssypets@gmx.de
<p>If files with wrong file ending (e.g. png image with .jpg or vice versa) are uploaded there are some problem which are difficult to detect if one is not aware of it.</p>
<p>This may vary, depending on the Webserver configuration and graphics tool used (Image Magick or Graphics Magick).</p>
<p><strong>Note: Behaviour may vary depending on TYPO3 version, most of my tests were with v11, should be verified with latest main.</strong></p>
<p>I describe what happens on my system.</p>
<ul>
<li>for processed files, a processed file with size 0 is created (Graphics Magick does not convert it and shows an error message, but this is not displayed in BE)</li>
<li>in the BE, no image is displayed as preview </li>
<li>in the FE, the image is not scaled</li>
<li>no error messages are displayed and no errors are logged (severity >= ERROR)</li>
</ul>
<p>Unfortunately, I have a number of these files, noticed this when searching for files with size 0 (_processed files are created with size=0).</p>
<a name="Suggested-changes"></a>
<h2 >Suggested changes<a href="#Suggested-changes" class="wiki-anchor">¶</a></h2>
<ul>
<li>if possible show an error on upload if the wrong file ending is used or refuse to upload the file (requires 100% correct detection of wrong file ending, at least for images, which may be difficult, should probably be configurable)</li>
<li>or use correct file ending when creating the processed file (e.g. as detected by graphics tool)</li>
<li>or do not create processed files with file ending 0, possibly fallback to creating a placeholder image if the created file has size 0</li>
<li>show errors / log messages</li>
</ul>
<a name="System"></a>
<h2 >System<a href="#System" class="wiki-anchor">¶</a></h2>
<ul>
<li>TYPO3 11.5.26</li>
<li>Graphics Magick (gm)</li>
</ul>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<p>(1)</p>
<p>1. Upload a file with wrong file ending (e.g. previously mv, do not convert 1.jpg 1.png)<br />2. Insert file in "Text & Media" as "asset", specify smaller height / width, view in FE (check if scaled), compare with file which is ok<br />3. activate preview images in file list</p>
Expected:
<ul>
<li>error message or fail on trying to upload image with wrong file extension or error message when creation of scaled image fails (actual: there is no flash message and no log message)</li>
<li>image is scaled in FE or error message is diplayed. (Actual: is not scaled)</li>
<li>preview image is displayed in filelist. (Actual: is not)</li>
</ul>
<a name="How-to-detect-affected-processed-files"></a>
<h2 >How to detect affected processed files<a href="#How-to-detect-affected-processed-files" class="wiki-anchor">¶</a></h2>
<p>On command line:</p>
<pre><code class="shell syntaxhl" data-language="shell">find htdocs/fileadmin/_processed <span class="nt">-type</span> f <span class="nt">-size</span> 0
</code></pre>
<p>The file name of actual file can be derived from the processed file name or looked up in DB sys_file_processedfile.original => sys_file.uid.</p>
<a name="Resources-Tools"></a>
<h2 >Resources / Tools<a href="#Resources-Tools" class="wiki-anchor">¶</a></h2>
<p><strong>gm</strong> This is what was used by TYPO3 to create the thumbnail image in the filelist</p>
<pre><code class="shell syntaxhl" data-language="shell"><span class="s1">'/usr/bin/gm'</span> <span class="s1">'convert'</span> <span class="nt">-interlace</span> None <span class="nt">-auto-orient</span> +profile <span class="s1">'*'</span> <span class="nt">-sample</span> <span class="s1">'64'</span>x<span class="s1">'64'</span> <span class="s1">'png:/var/www/site-uol11/htdocs/fileadmin/test/problems/Koala.png[0]'</span> <span class="s1">'/var/www/site-uol11/var/transient/preview_6908622721787002005.png'</span>
</code></pre>
<p>output:</p>
<pre><code class="shell syntaxhl" data-language="shell">/usr/bin/gm identify: Improper image header <span class="o">(</span>/var/www/site-uol11/var/transient/preview_6908622721787002005.png<span class="o">)</span> <span class="o">[</span>No such file or directory].
</code></pre>
<p>file</p>
<pre>
$ file htdocs/fileadmin/test/problems/Koala.png
</pre>
<p>output:</p>
<pre>
JPEG image data, JFIF standard 1.02, resolution (DPI), density 96x96, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=7, datetime=2009:03:12 13:48:28], baseline, precision 8, 1024x768, components 3
</pre>
<p>file can be used to show the mime type:</p>
<pre>
$ file -b --mime-type htdocs/fileadmin/test/problems/Koala.png
</pre>
<p>shows:<br /><pre>
image/jpeg
</pre></p>
<p>or the (correct) extension(s):</p>
<pre>
$ file --extension htdocs/fileadmin/test/problems/Koala.png
</pre>
<p>shows:<br /><pre>
jpeg/jpg/jpe/jfif
</pre></p>
<hr />
<p>PHP exif_imagetype</p>
<p><a class="external" href="https://www.php.net/manual/en/function.exif-imagetype.php">https://www.php.net/manual/en/function.exif-imagetype.php</a></p>
<p>also determines real image type.</p> TYPO3 Core - Bug #100309 (New): core ProductionExceptionHandler does not show stacktrace in logshttp://forge.typo3.org/issues/1003092023-03-27T09:04:43ZSybille Peterssypets@gmx.de
<p>There are different kinds of log messages created by different TYPO3 components.</p>
<p>The Frontend component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler" writes a complete stack trace to the log.</p>
<p>The TYPO3.CMS.Core.Error.ProductionExceptionHandler (e.g. called in BE) does not.</p>
<p>This makes it difficult to troubleshoot these kinds of errors.</p>
<a name="Example-with-TYPO3CMSCoreErrorProductionExceptionHandler"></a>
<h2 >Example with TYPO3.CMS.Core.Error.ProductionExceptionHandler<a href="#Example-with-TYPO3CMSCoreErrorProductionExceptionHandler" class="wiki-anchor">¶</a></h2>
<p>(added line breaks for better reaability):</p>
<pre>
Sun, 26 Mar 2023 09:53:13 +0200 [CRITICAL] request="230e8bb9a282c"
component="TYPO3.CMS.Core.Error.ProductionExceptionHandler":
Core: Exception handler (WEB: BE): InvalidArgumentException, code #1436717322,
file /var/www/mysite/releases/118/public/typo3/sysext/core/Classes/Http/Uri.php, line 125:
The parsedUri "http:///something/or/other" appears to be malformed -
{"mode":"WEB","application_mode":"BE","exception_class":"InvalidArgumentException","exception_code":1436717322,
"file":"/var/www/mysite/releases/118/public/typo3/sysext/core/Classes/Http/Uri.php","line":125,
"message":
"The parsedUri \"http:///something/or/other" appears to be malformed",
"request_url":"http:///something/or/other","exception":null}
</pre>
<a name="Example-with-TYPO3CMSFrontendContentObjectExceptionProductionExceptionHandler"></a>
<h2 >Example with "TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler"<a href="#Example-with-TYPO3CMSFrontendContentObjectExceptionProductionExceptionHandler" class="wiki-anchor">¶</a></h2>
<pre>
Sun, 26 Mar 2023 11:49:22 +0200 [ALERT] request="bc9e08161a068"
component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler":
Oops, an error occurred! Code: 202303260949217e3aa0de- RequiredArgumentMissingException:
Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create.,
in file /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:1048
- {"exception":"TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Exception\\RequiredArgumentMissingException: Required argument \"mail\" is not set for In2code\\Powermail\\Controller\\FormController->create.
in /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:1048
Stack trace:
#0 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(485): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->mapRequestArgumentsToControllerArguments()
#1 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php(96): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->processRequest(Object(TYPO3\\CMS\\Extbase\\Mvc\\Request))
#2 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php(46): TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher->dispatch(Object(TYPO3\\CMS\\Extbase\\Mvc\\Request))
#3
....
</pre> TYPO3 Core - Bug #99872 (New): Errors with redirects which are attached to deleted pages in redir...http://forge.typo3.org/issues/998722023-02-08T07:05:55ZSybille Peterssypets@gmx.de
<p>Redirects, which are attached to deleted pages (sys.redirct.pid) are displayed in the redirects module and have controls available to edit, delete etc. them.</p>
<p>However, when one of these is edited or deleted, an error occurs:</p>
<ul>
<li>delete: no error message, just does not work</li>
<li>edit: incorrect error message:</li>
</ul>
<pre>
Record with uid 98156 from table pages not found
Edit form could not be loaded
The edit form could not be loaded for the requested records. This might be due to insufficient permissions.
</pre>
<p>Due to this, these redirects can't be deleted except directly via the database.</p>
<a name="Problem-description"></a>
<h2 >Problem description<a href="#Problem-description" class="wiki-anchor">¶</a></h2>
<p>As admin:</p>
<p>1. Create a redirect<br />2. delete corresponding page<br />3. Go to redirects BE module.<br />4. edit redirect or try to delete it</p>
<a name="Versions"></a>
<h2 >Versions<a href="#Versions" class="wiki-anchor">¶</a></h2>
<ul>
<li>11.5.23</li>
<li>not tested in v12</li>
</ul>
<a name="DB-queries"></a>
<h2 >DB queries<a href="#DB-queries" class="wiki-anchor">¶</a></h2>
<pre>
select uid,pid,source_path,deleted,disabled,target from sys_redirect where source_path like '/en/neuromodulation/events-details/kick-off-meeting-march-2023%';
+-------+-------+-------------------------------------------------------------------------------+---------+----------+---------------------------------+
| uid | pid | source_path | deleted | disabled | target |
+-------+-------+-------------------------------------------------------------------------------+---------+----------+---------------------------------+
| 15008 | 94598 | /en/neuromodulation/events-details/kick-off-meeting-march-2023 | 0 | 0 | t3://page?uid=94597&_language=1 |
| 15009 | 94597 | /en/neuromodulation/events-details/kick-off-meeting-march-2023/registration | 0 | 0 | t3://page?uid=94818&_language=1 |
</pre><br /><pre>
select uid,pid,slug,hidden,deleted from pages where uid=94598;
+-------+-------+------------------------------------------------------------+--------+---------+
| uid | pid | slug | hidden | deleted |
+-------+-------+------------------------------------------------------------+--------+---------+
| 94598 | 94594 | /neuromodulation/events-details/workshop-neglect-july-2023 | 1 | 1 |
+-------+-------+------------------------------------------------------------+--------+---------+
</pre> TYPO3 Core - Bug #99767 (New): Allowed file types are not displayed with type="input", renderType...http://forge.typo3.org/issues/997672023-01-31T10:32:50ZSybille Peterssypets@gmx.de
<p>This used to be the case with type="inline". Here, the allowed file types were displayed in the form and in the link browser.</p>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<p>There is an example extension available to reproduce, was tested with v12 latest main:</p>
<p><a class="external" href="https://github.com/sypets/sypets_example_inputlink">https://github.com/sypets/sypets_example_inputlink</a></p>
<p>1. in Backend insert a plugin using the "Content element wizard" in tab plugins "InputLink plugin" <br />2. check out the fields in "plugin" tab and compare the behaviour of various types<br />3. Look at flexform file</p>
<a name="Screenshot"></a>
<h2 >Screenshot<a href="#Screenshot" class="wiki-anchor">¶</a></h2>
<p><img src="http://forge.typo3.org/attachments/download/37361/Screenshot_show_allowed_file_extensions.png" alt="" loading="lazy" /></p>
<p>in type="file" the allowed file extensions are displayed (as previously in "inline") in type="link" and renderType="linkType" not.</p>
<a name="Versions"></a>
<h2 >Versions<a href="#Versions" class="wiki-anchor">¶</a></h2>
<ul>
<li>used latest v11 (11.5.22)</li>
<li>this can also be reproduced with v12, with type="link"</li>
</ul>
<a name="Example"></a>
<h2 >Example<a href="#Example" class="wiki-anchor">¶</a></h2>
<pre><code class="xml syntaxhl" data-language="xml"><span class="nt"><settings.link></span>
<span class="nt"><TCEforms></span>
<span class="nt"><label></span>Link<span class="nt"></label></span>
<span class="nt"><config></span>
<span class="nt"><type></span>input<span class="nt"></type></span>
<span class="nt"><renderType></span>inputLink<span class="nt"></renderType></span>
<span class="nt"><fieldControl></span>
<span class="nt"><linkPopup></span>
<span class="nt"><options></span>
<span class="nt"><allowedExtensions></span>bib<span class="nt"></allowedExtensions></span>
<span class="nt"><blindLinkFields></span>class,param,target,title<span class="nt"></blindLinkFields></span>
<span class="nt"><blindLinkOptions></span>page,mail,telephone,folder,tx_calendarize_domain_model_event,news<span class="nt"></blindLinkOptions></span>
<span class="nt"><title></span>Select specific file (*.bib)<span class="nt"></title></span>
<span class="nt"></options></span>
<span class="nt"></linkPopup></span>
<span class="nt"></fieldControl></span>
<span class="nt"></config></span>
<span class="nt"></TCEforms></span>
<span class="nt"></settings.link></span>
</code></pre>
<p>Documentation</p>
<ul>
<li>v11: inputLink: <a class="external" href="https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ColumnsConfig/Type/Input/Link/Index.html#columns-input-rendertype-inputlink">https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ColumnsConfig/Type/Input/Link/Index.html#columns-input-rendertype-inputlink</a></li>
<li>v12: inputLink was deprecated, type="link" should be used: <a class="external" href="https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Link/Index.html#columns-link">https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Link/Index.html#columns-link</a></li>
</ul> TYPO3 Core - Bug #99442 (New): FileRepository::findByRelation() works differently in FE or other ...http://forge.typo3.org/issues/994422023-01-01T09:32:39ZSybille Peterssypets@gmx.de
<p>The problem is not only that the function behaves differently in FE and CLI but also that this is not reflected in the description (PHPDoc) and in the documentation. (Also, I assume it works in BE, but not in CLI).</p>
<p>I don't know why this relatively lowlevel function should behave differently based on context (and if this is still correct).</p>
<p>Documentation:</p>
<ul>
<li><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>
<blockquote>
<p>Getting Referenced files<br />This snippet shows how to retrieve FAL items that have been attached to some other element, in this case the "media" field of the "pages" table:</p>
</blockquote>
<pre><code class="php syntaxhl" data-language="php"><span class="no">EXT</span><span class="o">:</span><span class="n">some_extension</span><span class="o">/</span><span class="nc">Classes</span><span class="o">/</span><span class="nc">SomeClass</span><span class="mf">.</span><span class="n">php</span>
<span class="kn">use</span> <span class="nc">TYPO3\CMS\Core\Utility\GeneralUtility</span><span class="p">;</span>
<span class="kn">use</span> <span class="nc">TYPO3\CMS\Core\Resource\FileRepository</span><span class="p">;</span>
<span class="nv">$fileRepository</span> <span class="o">=</span> <span class="nc">GeneralUtility</span><span class="o">::</span><span class="nf">makeInstance</span><span class="p">(</span><span class="nc">FileRepository</span><span class="o">::</span><span class="n">class</span><span class="p">);</span>
<span class="nv">$fileObjects</span> <span class="o">=</span> <span class="nv">$fileRepository</span><span class="o">-></span><span class="nf">findByRelation</span><span class="p">(</span><span class="s1">'pages'</span><span class="p">,</span> <span class="s1">'media'</span><span class="p">,</span> <span class="nv">$uid</span><span class="p">);</span>
</code></pre>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<p>Tested with TYPO3 v11.5.21</p>
<p>It is possible to reproduce with this extension: <a class="external" href="https://github.com/sypets/sypets_example_findbyrelation_cli">https://github.com/sypets/sypets_example_findbyrelation_cli</a></p>
<p>1. Create a field of type "inline" with file objects in Flexform of a content element<br />2. In a CLI command process the Flexform settings and try to get the file object (see code below)<br />3. Run command on command line. Try to process the $fileObjects</p>
<p>command: (extends Symfony\Component\Console\Command\Command):</p>
<pre><code class="php syntaxhl" data-language="php"><span class="kn">use</span> <span class="nc">TYPO3\CMS\Core\Resource\FileRepository</span><span class="p">;</span>
<span class="kn">use</span> <span class="nc">TYPO3\CMS\Core\Utility\GeneralUtility</span><span class="p">;</span>
<span class="c1">// ....</span>
<span class="nv">$fileRepository</span> <span class="o">=</span> <span class="nc">GeneralUtility</span><span class="o">::</span><span class="nf">makeInstance</span><span class="p">(</span><span class="nc">FileRepository</span><span class="o">::</span><span class="n">class</span><span class="p">);</span>
<span class="c1">// ....</span>
<span class="c1">// this will return false</span>
<span class="nv">$fileObjects</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="n">fileRepository</span><span class="o">-></span><span class="nf">findByRelation</span><span class="p">(</span><span class="s1">'tt_content'</span><span class="p">,</span> <span class="s1">'pi_flexform'</span><span class="p">,</span> <span class="nv">$uid</span><span class="p">);</span>
</code></pre> TYPO3 Core - Bug #99162 (New): Entire cache flushed if TypoScript template is modified and saved ...http://forge.typo3.org/issues/991622022-11-22T14:18:32ZSybille Peterssypets@gmx.de
<p>If a root or extension TypoScript template is modified and saved, the entire page cache is flushed. Apparently even pages in other site (in multi-site installation) and redirects cache is flushed. Even if just a constant is changed.</p>
<a name="Affected-versions"></a>
<h2 >Affected versions<a href="#Affected-versions" class="wiki-anchor">¶</a></h2>
<p>Not a new issue, was this way since v11 at least, reproducible in v13</p>
<a name="Possible-solutions"></a>
<h2 >Possible solutions<a href="#Possible-solutions" class="wiki-anchor">¶</a></h2>
<p>1. change the behaviour if possible (e.g. flush only cache entries affected by the change, e.g. on subpages)<br />2. Make it possible to override this behaviour</p>
<a name="Usecases"></a>
<h2 >Usecases<a href="#Usecases" class="wiki-anchor">¶</a></h2>
<p>We use a sitepackage to manage TypoScript, but sometimes specific changes need to be made for just one page, e.g. for powermail configuration. It is not possible to do this without flushing entire cache, which has a negative impact on performance</p> TYPO3 Core - Bug #99153 (New): Discrepancy between behaviour and documentation for "eval" propert...http://forge.typo3.org/issues/991532022-11-21T12:15:45ZSybille Peterssypets@gmx.de
<p>In TYPO3 v11, the code below will make a <strong>selectSingle</strong> a required field, meaning you cannot save and a modal pops up with "The fields marked with an exclamation mark are not yet correctly filled in. Please complete them properly."</p>
<p>But, in the documentation "eval" is not a property, for example for selectSingle.</p>
<ul>
<li><a class="external" href="https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Select/Single/Properties.html">https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Select/Single/Properties.html</a></li>
</ul>
<p>Possibly, the documentation is incorrect or it works unintentionally. There is also issue <a class="issue tracker-2 status-1 priority-4 priority-default" title="Feature: Provide Evaluation of TCA select fields (New)" href="http://forge.typo3.org/issues/60908">#60908</a>, but I think it makes sense to first clarify if we should document "eval" for the select fields or not.</p>
<p>I looked in the source SelectSingleElement. There, AbstractNode::getValidationDataAsJsonString is called which handles eval.</p>
<p>So, by looking at the code, I assume, eval is handled and should be handled.</p>
<pre><code class="xml syntaxhl" data-language="xml"><span class="nt"><settings.test></span>
<span class="nt"><TCEforms></span>
<span class="nt"><label></span>test<span class="nt"></label></span>
<span class="nt"><config></span>
<span class="nt"><type></span>select<span class="nt"></type></span>
<span class="nt"><size></span>5<span class="nt"></size></span>
<span class="nt"><renderType></span>selectSingle<span class="nt"></renderType></span>
<span class="nt"><itemsProcFunc></span>... some funciton<span class="nt"></itemsProcFunc></span>
<span class="nt"><default></default></span>
<span class="nt"><eval></span>required<span class="nt"></eval></span>
...
</code></pre> TYPO3 Core - Bug #99034 (New): In a Flexform with selectCheckBox and a default value when saving,...http://forge.typo3.org/issues/990342022-11-09T15:59:53ZSybille Peterssypets@gmx.de
<p>So, for example, you have 2 checkboxes with value 'a' and value 'b' and a default of 'a'. Then you unset them all and save. After saving, 'a' is set again.</p>
<a name="animated-gif"></a>
<h2 >animated gif<a href="#animated-gif" class="wiki-anchor">¶</a></h2>
<p><img src="http://forge.typo3.org/attachments/download/37199/flexform1.gif" alt="" loading="lazy" /></p>
<a name="Code-snippet"></a>
<h2 >Code snippet<a href="#Code-snippet" class="wiki-anchor">¶</a></h2>
<pre>
<settings.showColumns>
<TCEforms>
<label>selectCheckBox with default=room</label>
<config>
<type>select</type>
<renderType>selectCheckBox</renderType>
<items>
<numIndex index="0">
<numIndex index="0">room</numIndex>
<numIndex index="1">room</numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">available</numIndex>
<numIndex index="1">available</numIndex>
</numIndex>
</items>
<default>room</default>
</config>
</TCEforms>
</settings.showColumns>
</pre>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<a name="Versions"></a>
<h2 >Versions<a href="#Versions" class="wiki-anchor">¶</a></h2>
<p>This is reproducible with</p>
<ul>
<li>TYPO3 11.5.16-dev (latest commit 74b597cb507fda6f8c4214a9d203541df614597f, September 12, 2022)</li>
<li>TYPO3 11.5.18 official release</li>
</ul> TYPO3 Core - Bug #98328 (New): Exception "Data too long for column url" when checking links http://forge.typo3.org/issues/983282022-09-11T08:07:38ZSybille Peterssypets@gmx.de
<p>Presumably, due to the already known parsing problem when parsing links, an exception may get thrown while checking links. This is severe for linkvalidator because the link checking is aborted and worst case a number of links can no longer be checked.</p>
<p>The exception occurs in linkvalidator but the reason for the exception is the link parsing, see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Link parsing problem in linkvalidator (Closed)" href="http://forge.typo3.org/issues/98120">#98120</a> and related issues</p>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<p>1. Insert content of attached file bodytext_content_source.txt into an RTE field for example of CE "Text & Media" (in "source" mode or via a DB INSERT).<br />2. Run "Check links" in linkvadator Module tab "Check links" function</p>
<p>An Exception should be shown in BE (use Debug mode)</p>
<a name="Solution"></a>
<h2 >Solution<a href="#Solution" class="wiki-anchor">¶</a></h2>
<a name="Workaround"></a>
<h2 >Workaround<a href="#Workaround" class="wiki-anchor">¶</a></h2>
<p>Avoid Links in RTE where the anchor text contains a URL</p>
<a name="Exception-stack-trace"></a>
<h2 >Exception stack trace<a href="#Exception-stack-trace" class="wiki-anchor">¶</a></h2>
<p>see also file exception_log.txt</p>
<pre>
(1/3) #1406 Doctrine\DBAL\Exception\DriverException
An exception occurred while executing a query: Data too long for column 'url' at row 1
in /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 119
case 1566:
return new NotNullConstraintViolationException($exception, $query);
}
return new DriverException($exception, $query);
}
}
at Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), object(Doctrine\DBAL\Query))
in /var/www/html/vendor/doctrine/dbal/src/Connection.php line 1814
if ($this->exceptionConverter === null) {
$this->exceptionConverter = $this->_driver->getExceptionConverter();
}
$exception = $this->exceptionConverter->convert($driverException, $query);
if ($exception instanceof ConnectionLost) {
$this->close();
}
at Doctrine\DBAL\Connection->handleDriverException(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), object(Doctrine\DBAL\Query))
in /var/www/html/vendor/doctrine/dbal/src/Connection.php line 1749
string $sql,
array $params = [],
array $types = []
): DriverException {
return $this->handleDriverException($e, new Query($sql, $params, $types));
}
/**
* @internal
at Doctrine\DBAL\Connection->convertExceptionDuringQuery(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), 'INSERT INTO `tx_linkvalidator_link` (`headline`, `record_pid`, `record_uid`, `table_name`, `link_type`, `link_title`, `field`, `last_check`, `element_type`, `language`, `url`, `url_response`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(' ....
in /var/www/html/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php line 169
// @todo #64091: only select rows that have content in at least one of the relevant fields (via OR)
while ($row = $result->fetchAssociative()) {
$results = [];
$this->analyzeRecord($results, $table, $fields, $row);
$this->checkLinks($results, $linkTypes);
}
}
}
}
</pre> TYPO3 Core - Bug #97486 (New): Consider file mounts when renaming or deleting directorieshttp://forge.typo3.org/issues/974862022-04-27T12:20:38ZSybille Peterssypets@gmx.de
<ul>
<li>Directories which have filemounts pointing to them (or to a child page) should not be able to be deleted </li>
<li>If the directory is renamed, the directory in the file mounts (and file mounts with child directories) should be renamed as well</li>
</ul>
<p>Given the following situation:</p>
<ul>
<li>Complex access system of groups / filemounts with filemounts within<br />filemounts</li>
</ul>
<p>e.g.</p>
<pre>
- fileadmin
-> dir1
-> dir1.1
</pre>
<p>- group1 - uses filemount for dir1<br />- group1.1 - uses filemount for dir1.1</p>
<p>Now users in group1 (and admin) could rename the directory dir1.1 (or<br />delete it if no files with references in it). If that happens, the user in group 1.1 can no longer access the files.</p>
<p>Users in group1 may not be aware of the subgroups.</p>
<p>There is no warning, when doing this.</p>
<a name="My-suggestion"></a>
<h2 >My suggestion:<a href="#My-suggestion" class="wiki-anchor">¶</a></h2>
<ul>
<li>it should not be possible by users to delete directories with filemounts (and also with filemounts attached to subdirectories)</li>
<li>directories with filemounts should be marked in filelist so they are<br />visible as "system folder" (and ideally visible as directory with a filemount for admins)</li>
<li>If it is allowed for the directories with filemounts pointing to them (or to child directories) are allowed to be renamed, the file mounts records (sys_file_mount) should be updated as well.</li>
</ul>
<a name="TYPO3-versions"></a>
<h2 >TYPO3 versions<a href="#TYPO3-versions" class="wiki-anchor">¶</a></h2>
<p>I reproduced this in v10, superficially confirmed in latest master v12.</p>
<a name="sys_filemounts"></a>
<h2 >sys_filemounts<a href="#sys_filemounts" class="wiki-anchor">¶</a></h2>
<p>- base (int), is storage<br />- path (varchar), is relative path in storage (not uid)</p>
<p>Thus, sys_filemounts uses the path, not the uid(s) of dirs / Folders (and AFAIK there is no management of folders by uid anyway).</p>
<p>See also note in Folder class:</p>
<pre>
/** The identifier of this folder to identify it on the storage.
* On some drivers, this is the path to the folder, but drivers could also just
* provide any other unique identifier for this folder on the specific storage.
*
* @var string
*/
protected $identifier;
</pre> TYPO3 Core - Bug #93912 (New): Avoid horizontal scrollbar for redirects modulehttp://forge.typo3.org/issues/939122021-04-13T08:48:19ZSybille Peterssypets@gmx.de
<p>If some URL targets are long, a horizontal scrollbar is displayed. This makes the action button invisible and you have to scroll down.</p>
<p>I think this is not very good from a usability point of view - it actually hides the action buttons.</p>
<p>We had the same problem in the linkvalidator list and switched to a fixed layout (where each column has a fixed width).</p>
<p>Another (better?) alternative would be to shorten both source and targets paths if they exceed a certain length.</p>
<a name="System"></a>
<h2 >System<a href="#System" class="wiki-anchor">¶</a></h2>
<ul>
<li>master (11-dev)</li>
<li>10.4.14</li>
</ul>
<p><img src="http://forge.typo3.org/attachments/download/36001/redirects1.png" alt="" loading="lazy" /></p>
<p><img src="http://forge.typo3.org/attachments/download/36002/redirects2.png" alt="" loading="lazy" /></p> TYPO3 Core - Bug #93540 (New): It is not clear which options extendToSubpages in page properties ...http://forge.typo3.org/issues/935402021-02-18T07:36:22ZSybille Peterssypets@gmx.de
<a name="Problems"></a>
<h2 >Problems<a href="#Problems" class="wiki-anchor">¶</a></h2>
<p>1. Not intuitive to see which fields are affected by extendToSubpages</p>
<p>extendToSubpages applies to property <strong>hidden</strong> (among others).</p>
<p>It does not apply to <strong>nav_hide</strong> .</p>
<p>The way the options are grouped currently is misleading. It does not make it clear, what extendToSubpages apply to. One could assume it applys to all the options in the section (which would not include hidden) or all option in the row (which might include start and stop, depending on how the page is resized) or in the "Access" tab.</p>
<p>I would suggest to apply extendToSubpages to all options in the "Access" tab (including nav_hide) and remove the separator.</p>
<p>Alternatively, move nav_hide to the "Behaviour" tab.</p>
<p>Or group the options differently.</p>
<a name="Desired-change"></a>
<h2 >Desired change<a href="#Desired-change" class="wiki-anchor">¶</a></h2>
<p>1. rethink which options should be overriden with extendToSubpages (nav_hide yes?, others: ...)<br />2. change gui: Easy to see which fields are affected by extendToSubpages<br />3. on child pages: do not make settings available which will have no effect (because overriden by parent page), see comment by Stefan P: <a class="external" href="https://forge.typo3.org/issues/93540#note-10">https://forge.typo3.org/issues/93540#note-10</a><br />4. improve docs</p>
<p>see also questions and suggestions below in comments.</p>
<p>current state:</p>
<p><img src="http://forge.typo3.org/attachments/download/35859/extendToSubpages.png" alt="" loading="lazy" /></p> TYPO3 Core - Bug #93409 (New): Inconsistent parsing of URLs without <a> taghttp://forge.typo3.org/issues/934092021-02-02T10:48:31ZSybille Peterssypets@gmx.de
<p>Parsing of URLs without a <a href tag in tt_content.bodytext gets inconsistent results.</p>
<p>Sometimes it is a link in the frontend, sometimes not, the rendering of frontend and RTE is not always consistent.</p>
<a name="Example-1"></a>
<h2 >Example 1<a href="#Example-1" class="wiki-anchor">¶</a></h2>
<pre>
<p>Weitere Informationen sind auf der Webseite des Projekts zu finden https://www.klasse-klima.de/.<br />
BUNDjugend, Klasse Klima (https://www.klasse-klima.de/sfsd)<br />
</p>
</pre>
<ul>
<li>In the frontend, the first URL is rendered as link, the second is not</li>
<li>In the RTE, both links are not rendered as links</li>
</ul>
<a name="Example-2"></a>
<h2 >Example 2<a href="#Example-2" class="wiki-anchor">¶</a></h2>
<p>URL without <a href and directly followed by a ")" gets different results:</p>
<p>1. is rendered as link in frontend<br />2. is not rendered as link in RTE<br />3. is incorrectly evaluated by linkvalidator as URL with the ), so e.g. URL "https://example.org" becomes "https://example.org)"</p>
<p>tt_content.bodytext has softref:</p>
<pre>
typolink_tag,email[subst],url
</pre>
<p>I have wondered about the "url" in there, if you remove that you could just parse explicit links with "<a>" as links which seems to me to be a "cleaner" solution.</p>
<a name="Example"></a>
<h2 >Example<a href="#Example" class="wiki-anchor">¶</a></h2>
<p>The following (raw) example text in tt_content.bodytext:</p>
<pre><code class="html syntaxhl" data-language="html"><span class="nt"><p></span>(some url http://t3coredev/sdfdsf2) more text ...<span class="nt"></p></span>
</code></pre>
<a name="system"></a>
<h2 >system<a href="#system" class="wiki-anchor">¶</a></h2>
<ul>
<li>latest master</li>
<li>with Introduction package</li>
<li>points 2 and 3 can be reproduced without Introduction Package, did not test 1) as that requires rendering of content in frontend</li>
</ul> TYPO3 Core - Bug #93130 (New): Impexp export as XML is no xml if downloadedhttp://forge.typo3.org/issues/931302020-12-21T09:41:39ZSybille Peterssypets@gmx.de
<p>Format "XML" is selected.</p>
<p>If "Save under" is pressed, the file is save on the webserver in the specified format and looks good (format is XML).</p>
<p>However, if "Download export file" is pressed, the format looks like .t3d, but definitely not XML.</p> TYPO3 Core - Bug #92586 (New): Configuration for linktypes not considered in scheduler for linkva...http://forge.typo3.org/issues/925862020-10-18T14:29:28ZSybille Peterssypets@gmx.de
<p>Linkvalidator report always reports results for external, internal (page) and file links, even if configuration was changed in scheduler</p>
<a name="Reproduce"></a>
<h2 >Reproduce<a href="#Reproduce" class="wiki-anchor">¶</a></h2>
<ol>
<li>set configuration in scheduler:</li>
</ol>
<pre>
mod.linkvalidator.linktypes=external
</pre>
<a name="Result"></a>
<h2 >Result<a href="#Result" class="wiki-anchor">¶</a></h2>
<p>Only external link types will be checked but all will be reported. This means that the information for file and internal links reported may be stale.</p>
<p>It would probably better to separate the checking and reporting configuration (as is done in the checklinks "report" and "check" tab), and possibly separate the reporting (via email) and checking altogether, but while this is not yet done, I think the results give should be "fresh" and what was just checked.</p>