TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692017-05-29T15:15:41ZTYPO3 Forge
Redmine TYPO3 Core - Bug #81364 (Closed): Internal links get treated as external links by linkPage()http://forge.typo3.org/issues/813642017-05-29T15:15:41ZNico Niebergallnico.niebergall@artif.com
<p>I currently have the issue that indexed_search treats search result links as "external" when in reality, they are internal links. I'm referring to a specific part in indexed_search's source code; see explanation/details:</p>
<p>This (IMHO) wrong behaviour results in links not going through the TYPO3 URIBuilder (and therefore realURL), e.g. domain.tld/index.php?id=18 vs. domain.tld/contact.html. I tracked this down to \TYPO3\CMS\IndexedSearch\Controller\SearchController, line 1326 in the linkPage() function:</p>
<pre><code class="php syntaxhl" data-language="php"> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="k">empty</span><span class="p">(</span><span class="nv">$this</span><span class="o">-></span><span class="n">domainRecords</span><span class="p">[</span><span class="nv">$pageUid</span><span class="p">]))</span> <span class="p">{</span>
<span class="c1">// Handle external link</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="c1">// Handle internal link</span>
<span class="p">}</span>
</code></pre>
<p>IMHO, the negation of empty() should be removed, e.g. "if there is no domain record, this is an external link.." instead of "if there is a domain record, this is an external link":</p>
<pre><code class="php syntaxhl" data-language="php"> <span class="k">if</span> <span class="p">(</span><span class="k">empty</span><span class="p">(</span><span class="nv">$this</span><span class="o">-></span><span class="n">domainRecords</span><span class="p">[</span><span class="nv">$pageUid</span><span class="p">]))</span> <span class="p">{</span>
<span class="c1">// Handle external link</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="c1">// Handle internal link</span>
<span class="p">}</span>
</code></pre>
<p>If I remove the negation, the extension behaves as expected and shows the correct link(s), e.g. /contact.html instead of /index.php?id=18. Hopefully, this is an actual issue and not a result of an oversight of mine. ;-)</p>
<p>In any case, I hope someone more involved in the core's development can shed some light on this! If that's indeed the way to fix this, I'd also be willing to contribute this myself.</p>
<p>Thank you in advance!</p> TYPO3 Core - Bug #60675 (Closed): CSS compressor is removing white spaces (font directive)http://forge.typo3.org/issues/606752014-07-30T11:51:48ZNico Niebergallnico.niebergall@artif.com
<p>Today I noticed the internal CSS compressor is removing white spaces between the font size and the font family. Of course the white space should stay there. Some browsers will still render the font family correct, some other's dont, but the CSS syntax is clearly wrong without the white space.</p>
<p>The white space is removed when you use a font-family surrounded with quotation marks, and only in this particular case. If you remove the quotation marks the white space won't get removed. According to the W3C the apostrophes are needed for strings with white spaces, as stated here: <a href="http://www.w3.org/TR/CSS21/syndata.html#strings" class="external">4.3.7 Strings</a></p>
<p>This is a snippet of the code where I was facing this symptom:</p>
<p><strong>Before minifying</strong><br /><pre>
body {
font: 0.875em "Open Sans", Arial, Helvetica, sans-serif;
line-height: 2em;
}
</pre></p>
<p><strong>After minifying</strong><br /><pre>
body{font:0.875em"Open Sans",Arial,Helvetica,sans-serif;line-height:2em}
</pre></p>
<p>It doesn't matter if you use a single quotation or a double quotation mark, the white space is removed as soon as you surround the font-face with (single or double) quotation marks. Is this a bug?</p>
<p>Kind regards,<br />Nico</p>