TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692018-01-31T16:07:23ZTYPO3 Forge
Redmine TYPO3 Core - Bug #83741 (Closed): HTTP Basic Authentication credentials in Google Chrome 64 not t...http://forge.typo3.org/issues/837412018-01-31T16:07:23ZMarco Huber
<p>Our project is protected by a HTTP Basic Authentication and we have to enter the username/password on every d3.json() call in Google Chrome. In TYPO3 8.7 this function is called in the SvgTree.js to build the tree in the tt_content/categories field, in TYPO3 9.x it's called for every(?) tree.</p>
<p>This is a bug in the d3.js (4.10) library, but it affects every TYPO3 8.7 and 9.x. An Update to d3.js 4.13 doesn't help and in d3.js 5.0 there is a similar issue.</p>
<p><a class="external" href="https://github.com/d3/d3-request/issues/33">https://github.com/d3/d3-request/issues/33</a><br /><a class="external" href="https://github.com/d3/d3-fetch/issues/10">https://github.com/d3/d3-fetch/issues/10</a></p>
<p>A dirty workaround would be, to set the credentials with some javascript workaround. But I'm not sure if this is the right way. Berhaps the d3.js developers have some ideas on github.</p>
<p><img src="http://forge.typo3.org/attachments/download/33145/d3.png" alt="" loading="lazy" /></p> TYPO3 Core - Bug #81740 (Closed): temp directory name shouldn't be hardcoded in ClearCacheServicehttp://forge.typo3.org/issues/817402017-06-29T11:36:36ZMarco Huber
<p>As the name of the temp directory can be configured (f.e. <pre><code class="php syntaxhl" data-language="php"><span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'TYPO3_CONF_VARS'</span><span class="p">][</span><span class="s1">'SYS'</span><span class="p">][</span><span class="s1">'caching'</span><span class="p">][</span><span class="s1">'cacheConfigurations'</span><span class="p">][</span><span class="s1">'cache_core'</span><span class="p">][</span><span class="s1">'options'</span><span class="p">][</span><span class="s1">'cacheDirectory'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'typo3temp_local'</span><span class="p">;</span></code></pre>), the name "typo3temp" shouldn't be hardcoded in the ClearCacheService <a href="https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/install/Classes/Service/ClearCacheService.php#L42" class="external">Line 42</a> (<a href="https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/install/Classes/Service/ClearCacheService.php#L56" class="external">TYPO3 7.6 Line 56</a>).</p> TYPO3 Core - Bug #79711 (Closed): The CE File Links (fluid_styled_content) tries to create thumbs...http://forge.typo3.org/issues/797112017-02-09T15:40:01ZMarco Huber
<p>In typo3/sysext/fluid_styled_content/Resources/Private/Templates/Uploads.html line 13 the if condition is true even for non-image files, because the f:uri.image returns an url. But then the f:media viewhelper can't handle this files and returns an <img> tag with an invalid src.</p>
<p>To reproduce:<br />Insert the content element File Links on a page, assign some non-image files (docx, xlsx, ...) and select "Filename and thumbnail (if possible)" in the field "Display file/icon/thumbnail".<br />For this files the generated <img> tag looks like this: <img src="path/to/my.docx" /></p>
<p>As a quick workaround I wrote a little viewhelper to check, if the file extension is in $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], and used this viewhelper in the if condition:</p>
<pre>
<?php
namespace Vendor\MyTheme\ViewHelpers;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Checks if the file extension is in $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
*/
class IsImageViewHelper extends AbstractViewHelper
{
/**
* Checks if the file extension is in $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
*
* @param \TYPO3\CMS\Core\Resource\ResourceInterface $resource Either give this resource
* @return boolean
*/
public function render($resource)
{
return GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $resource->getExtension());
}
}
</pre>
<pre>
<f:if condition="{data.uploads_type} == 2">
<f:if condition="{vendor:isImage(resource:file)}">
<f:then>
<a href="{file.publicUrl}"{f:if(condition:data.target,then:' target="{data.target}"')}>
<f:media file="{file}" width="150" alt="{file.properties.alternative}" />
</a>
</f:then>
</pre>
<p>But perhaps there is a better solution?</p> TYPO3 Core - Bug #79012 (Closed): TYPO3 default language content shownhttp://forge.typo3.org/issues/790122016-12-16T11:26:45ZMarco Huber
<p>If a database field can be NULL, the default language content is shown even if there shouldn't be a fallback.</p>
<p><a class="external" href="http://stackoverflow.com/questions/41181974/typo3-default-language-content-shown">http://stackoverflow.com/questions/41181974/typo3-default-language-content-shown</a></p> TYPO3 Core - Bug #77577 (Closed): Source collection images don't get resized if file = GIFBUILDERhttp://forge.typo3.org/issues/775772016-08-22T13:43:59ZMarco Huber
<p>If you use a GIFBUILDER object as file resource in an IMAGE object, the images in the source collection don't get resized.</p>
<pre>
10 = IMAGE
10 {
file = GIFBUILDER
file {
XY = 400,350
...
}
sourceCollection {
small.width = 320
small.mediaQuery = (min-width: 260px)
medium.width = 400
medium.mediaQuery = (min-width: 360px)
}
}
</pre> TYPO3 Core - Bug #77098 (Closed): versionNumberInFilename = '1' not working with the demo .htacce...http://forge.typo3.org/issues/770982016-07-14T17:38:03ZMarco Huber
<p>If you use an Apache 2.2 and the demo .htaccess the RewriteRule to resolve the verionNumberInFilename doesn't work. It seems like this is a bug in Apache 2.2 and/or mod_rewrite which appends the absolute path to the file when it rewrites the path. Or perhaps I misunderstood the Apache documentation ;-). In the browser you simply get a 404 for the CSS/Javascript file.</p>
<p>To solve this problem, you could set a "RewriteBase = /" in your .htaccess. Then it works for every file, which is not in the "/typo3" folder. But if you enable debugging for the backend, the CSS and Javascript files from the "/typo3" folder can not be found because of the .htaccess in the "/typo3" folder. You have to set a "RewriteBase = /typo3/" in the .htaccess file in the "/typo3" folder.</p>
<p>Or you have to modify the .htaccess RewriteRule in the root folder from<br /><pre>
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
</pre><br />to<br /><pre>
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]
</pre></p>
<p>This bug doesn't happen with Apache 2.4, but i find no requirement for a specific Apache version on <a class="external" href="https://github.com/TYPO3/TYPO3.CMS/blob/master/INSTALL.md">https://github.com/TYPO3/TYPO3.CMS/blob/master/INSTALL.md</a>.</p>
<p>This bug appears in TYPO3 6.2 and 7.6. And I think (but have not tested it) it appears in 8.x, too.</p> TYPO3 Core - Bug #76974 (New): Translation handling with starttime/stoptimehttp://forge.typo3.org/issues/769742016-07-07T10:59:10ZMarco Huber
<p>I hope this is no duplicate, but I didn't find an issue here on forge and on Slack (<a class="external" href="https://typo3.slack.com/archives/typo3-cms/p1467294284003213">https://typo3.slack.com/archives/typo3-cms/p1467294284003213</a>) was no reaction on my question...</p>
<p>Because we had some issues with language handling and starttime/stoptime, I made some tests with different configurations and TYPO3 versions. These are the results, perhaps they are usefull for someone else, too.</p>
<p><a class="external" href="https://gist.github.com/mhuber84/9da479f5410fe4c1abceea90cce6baf2">https://gist.github.com/mhuber84/9da479f5410fe4c1abceea90cce6baf2</a></p>
<p>I didn't find an issue on forge for Configuration 1, Test 06, 08, 14 and 16 (everything the same). Any hints?<br />And, for our usecase, Configuration 4 with TYPO3 7.6 would match best. But only if I can solve the ERROR in Test 11 and 12. Are there any chances to make this work?</p> TYPO3 Core - Bug #75254 (Closed): Wrong page TSconfig in link wizard after positioned inserthttp://forge.typo3.org/issues/752542016-03-24T12:13:37ZMarco Huber
<p>If you insert a content element (or a page) at a concrete position f.e. after content element 15 the value in $row['pid'] is -15.</p>
<p>This pid is also handed over to the link wizard popup. But with this "pid" the TSconfig can not be loaded.</p>
<p>Because this is the second place I find this issue, I'm afraid that we have a bigger problem here.</p> TYPO3 Core - Bug #73675 (Closed): URLs with spaces in the RTEhttp://forge.typo3.org/issues/736752016-02-25T16:00:51ZMarco Huber
<p>Sometimes there could be spaces in a link inserted in the RTE, f.e. if you link to a local file (file:///C:\my\Path is\sö\crazy with everything.pdf) as external URL. Then there should be wrapped some " around the url part of the typo3 link tag, like it is already done in all other link fields (f.e. the field header_link). Otherwise, when the link tag is parsed, some parts of the URL are used as target, class and title.</p>
<p>In \TYPO3\CMS\Core\Html\RteHtmlParser::TS_links_db() we should use the function TypoLinkCodecService::encode().<br />IMO the cleanest solution would be:<br /><pre>
@@ -595,9 +595,6 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser
}
// Only if href, target, class and tile are the only attributes, we can alter the link!
if (empty($attribArray_copy)) {
- // Quoting class and title attributes if they contain spaces
- $attribArray['class'] = preg_match('/ /', $attribArray['class']) ? '"' . $attribArray['class'] . '"' : $attribArray['class'];
- $attribArray['title'] = preg_match('/ /', $attribArray['title']) ? '"' . $attribArray['title'] . '"' : $attribArray['title'];
// Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes):
// If data-htmlarea-external attribute is set, keep the href unchanged
if ($attribArray['data-htmlarea-external']) {
@@ -605,7 +602,8 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser
} else {
$href = $info['url'] . ($info['query'] ? ',0,' . $info['query'] : '');
}
- $bTag = '<link ' . $href . ($attribArray['target'] ? ' ' . $attribArray['target'] : ($attribArray['class'] || $attribArray['title'] ? ' -' : '')) . ($attribArray['class'] ? ' ' . $attribArray['class'] : ($attribArray['title'] ? ' -' : '')) . ($attribArray['title'] ? ' ' . $attribArray['title'] : '') . '>';
+ $typoLink = GeneralUtility::makeInstance(TypoLinkCodecService::class)->encode(array('url' => $href, 'target' => $attribArray['target'], 'class' => $attribArray['class'], 'title' => $attribArray['title'], 'additionalParams' => ''));
+ $bTag = '<link ' . $typoLink . '>';
$eTag = '</link>';
// Modify parameters
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc'])) {
</pre><br />But this would be a breaking change, because we change the value of $attribArray['title'] and $attribArray['class'] in the hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc'].<br />So that's why I remove the " from $attribArray['title'] and $attribArray['class'] manually in my patch.</p> TYPO3 Core - Bug #72948 (Closed): Special characters in Flashmessages are converted to HTML entit...http://forge.typo3.org/issues/729482016-01-26T13:45:28ZMarco Huber
<p>In TYPO3\CMS\Backend\Controller\EditDocumentController::makeEditForm() line 1095 the message which is shown if somebody else edits the current record, is sent through htmlspecialchars.<br />In TYPO3\CMS\Core\Messaging\FlashMessageQueue::renderFlashMessages() the message is sent through htmlspecialchars, too.</p> TYPO3 Core - Bug #72171 (Closed): Since the authMode_enforce strict is set editors can't edit con...http://forge.typo3.org/issues/721712015-12-11T11:56:21ZMarco Huber
<p>Since the authMode_enforce strict is set editors can't edit content elements if the list_type is 0. But 0 is the default value.</p>
<p>So we have to change typo3/sysext/frontend/ext_tables.sql and perhaps also offer a migration script which updates the database?</p>
<p>This was introduced in:<br /><a class="external" href="https://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff/3276f07f39dcaa12458a67469b0c256bf77e89ed">https://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff/3276f07f39dcaa12458a67469b0c256bf77e89ed</a><br /><a class="external" href="https://review.typo3.org/#/c/45165/">https://review.typo3.org/#/c/45165/</a><br /><a class="external" href="https://forge.typo3.org/issues/32209">https://forge.typo3.org/issues/32209</a></p> TYPO3 Core - Bug #53622 (Closed): Updating the file content fails with the FAL APIhttp://forge.typo3.org/issues/536222013-11-13T18:51:48ZMarco Huber
<p>Creating/Updating files with the FAL API fails because FAL want's to update a field sys_file.mimetype. But the field is called sys_file.mime_type in the database.</p>
<p>To reproduce:<br /><pre>
/** @var \TYPO3\CMS\Core\Resource\StorageRepository $storageRepository */
$storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
/** @var \TYPO3\CMS\Core\Resource\ResourceStorage $storage */
$storage = $storageRepository->findByUid(1);
//Create a file (or get an existing one, that makes no difference):
/** @var \TYPO3\CMS\Core\Resource\Folder $folder */
$folder = $storage->getFolder('/user_upload/');
$fileName = '123.txt';
$file = $storage->createFile($fileName, $folder); //A new record in sys_file is created and the file is created in the filesystem.
//Update the file
$fileContent = '12345filecontent';
$file->setContents($fileContent); //The file's content in the filesystem get's updated. But the mimetype changes and can not be updated in the database.
//this one throws the same error: $storage->setFileContents($file, $fileContent);
</pre></p>
<p>The error:<br /><pre>
exec_UPDATEquery
caller: TYPO3\CMS\Core\Database\DatabaseConnection::exec_UPDATEquery
ERROR: Unknown column 'mimetype' in 'field list'
lastBuiltQuery: UPDATE sys_file SET mimetype='text/plain' WHERE uid=2071
debug_backtrace:
include(ysext/extbase/Scripts/CommandLineLauncher.php),li_dispatch.phpsh#65
TYPO3\CMS\Extbase\Core\Bootstrap->run#32
TYPO3\CMS\Extbase\Core\Bootstrap->handleRequest#197
TYPO3\CMS\Extbase\Mvc\Cli\RequestHandler->handleRequest#208
TYPO3\CMS\Extbase\Mvc\Dispatcher->dispatch#96
TYPO3\CMS\Extbase\Mvc\Controller\CommandController->processRequest#100
TYPO3\CMS\Extbase\Mvc\Controller\CommandController->callCommandMethod#114
call_user_func_array#212
BGM\MyExt\Command\MyCommandController->createFileCommand#
TYPO3\CMS\Core\Resource\File->setContents#84
TYPO3\CMS\Core\Resource\ResourceStorage->setFileContents#140
TYPO3\CMS\Core\Resource\FileRepository->update#952
TYPO3\CMS\Core\Database\DatabaseConnection->exec_UPDATEquery#263
TYPO3\CMS\Core\Database\DatabaseConnection->debug#247
</pre></p>
<p>The problem is $file->setContents which calls TYPO3\CMS\Core\Resource\FileRepository->update, but I have no idea how to fix this.</p> TYPO3 Core - Bug #25888 (Closed): TCA Tree readOnly not workinghttp://forge.typo3.org/issues/258882011-04-11T15:09:49ZMarco Huber
<p>The TCA Tree isn't disabled if $PA['fieldConf']['config']['readOnly'] is true.</p> TYPO3 Core - Feature #25382 (Closed): TCA Tree should respect $TCA['myTable']['ctrl']['requestUpd...http://forge.typo3.org/issues/253822011-03-24T09:44:04ZMarco Huber
<p>The onChange-Javascript is missing. I will push a patch to gerrit as soon as possible.</p>
<p>(issue imported from #M18022)</p> TYPO3 Core - Bug #25347 (Closed): TCA type "select", renderMode "tree", maxitems = 1 doesn't workhttp://forge.typo3.org/issues/253472011-03-16T16:53:26ZMarco Huber
<p>I want to use the new TCA tree, but when I configure 1 as maxitems I can't select a tree node.</p>
<p>This happens, because this.countSelectedNodes in t3lib\js\extjs\tree\tree.js is 1 even when I create a new record. And this.countSelectedNodes is 1 because $valueArray in t3lib\tceforms\class.t3lib_tceforms_tree.php in the function renderField always has at least one entry.</p>
<p>$valueArray is created by exploding $PA['itemFormElValue']. In fresh records $PA['itemFormElValue'] is 0 and not NULL (or not set) and has no other effects. But $valueArray has an entry and that's why count($valueArray) is 1 and then this.countSelectedNodes is also 1.</p>
<p>To fix this issue $PA['itemFormElValue'] should be only exploded when it's not 0. Like I worte, this is done in t3lib\tceforms\class.t3lib_tceforms_tree.php and fixed in the appended patch.</p>
<p>Fixing this issue causes a little follow up in t3lib\js\extjs\tree\tree.js. This is also fixed in the patch.</p>
<p>I hope the patch file's syntax is correct, this is my first git patch ;-)</p>
<p>(issue imported from #M17976)</p>