Bug #91434

Class name “downloads” in Layout HTML file prepended with slash

Added by Hagen Gebauer 6 days ago. Updated 1 day ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-19
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In my Layouts/Main-Layout.html Fluid template I have hard-coded the link to a Downloads page:

<li class="downloads"><f:link.page pageUid="85"><span><f:translate key="LLL:fileadmin/pages/language/locallang.xlf:metaNav.downloads" /></span></f:link.page></li>

The class name of <li> is now being prepended with a slash in the compiled HTML file:
<li class="/downloads">

I can’t say when this started, I guess it might have been the update to T3v9.5.16

When changing the class name to download or download-link or downloadsss the same thing happens. When changing it to link-download instead, it will not be prepended. So I reckon that download is some sort of keyword that will be handled as page name or something.

I don’t believe this to have any relevance but as you can see in the <f:translate> above, this website is not yet built on a Site Package Extension.

History

#1 Updated by Michael Stucki 6 days ago

  • Project changed from forge.typo3.org to TYPO3 Core
  • TYPO3 Version set to 10

Wrong project.

#2 Updated by Benni Mack 5 days ago

  • Status changed from New to Needs Feedback

Hello Hagen,

thanks for your report. Can you please tell us
1. how your file "LLL:fileadmin/pages/language/locallang.xlf:metaNav.downloads" looks like?
2. are you running in Composer Mode?
3. What does your site configuration look like?

And you're running TYPO3 v9.5.18 - correct?

#3 Updated by Hagen Gebauer 5 days ago

Hi Benni! Thanks for your reply. I’ll answer below:

Benni Mack wrote:

Hello Hagen,

thanks for your report. Can you please tell us
1. how your file "LLL:fileadmin/pages/language/locallang.xlf:metaNav.downloads" looks like?

I’ll paste it below. But the problem wasn’t in the translation part which worked fine. The problem is the CSS class name in the wrapping list element. Sorry if I hadn’t been clear enough in my description of the problem. Here’s the full HTML line as compiled:

<li class="/downloads"><a href="/intranet/downloads"><span>Document Download</span></a></li>

Link and translation are correct.

2. are you running in Composer Mode?

No. I run a local and a remote version, both in the suggested way of having the core separated and symlinked from the website root folder.

3. What does your site configuration look like?

I’m a bit lost here :) Could you please specify what exactly you need to know?

And you're running TYPO3 v9.5.18 - correct?

My local version was 9.5.17 until just now when I updated to 9.5.18. The remote version is still on 9.5.16. The issue happens under all of them.

My fileadmin/pages/language/locallang.xlf:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2016-07-25T14:03:06Z" product-name="digsbb-tpl">
        <header/>
        <body>
            <trans-unit id="logIn" xml:space="preserve">
                <source>Sign in</source>
            </trans-unit>
            <trans-unit id="logOut" xml:space="preserve">
                <source>Sign out</source>
            </trans-unit>
            <trans-unit id="editPassword" xml:space="preserve">
                <source>Edit Password</source>
            </trans-unit>
            <trans-unit id="editAccount" xml:space="preserve">
                <source>Edit Account</source>
            </trans-unit>
            <trans-unit id="metaNav.faq" xml:space="preserve">
                <source>FAQ</source>
            </trans-unit>
            <trans-unit id="metaNav.downloads" xml:space="preserve">
                <source>Document Download</source>
            </trans-unit>
            <trans-unit id="news.dateFormatD" xml:space="preserve">
                <source>j</source>
            </trans-unit>
            <trans-unit id="news.dateFormatMY" xml:space="preserve">
                <source>%B %Y</source>
            </trans-unit>
        </body>
    </file>
</xliff>

#4 Updated by Riccardo De Contardi 2 days ago

3. What does your site configuration look like?

I’m a bit lost here :) Could you please specify what exactly you need to know?

I think Benni means the config.yaml site configuration file, plus any relevant Typoscript code in your template.

Another question: do you use third-party extensions?

I tried to reproduce this problem on latest master using

<li class="downloads"><f:link.page pageUid="398"><span><f:translate key="LLL:fileadmin/Templates/locallang.xlf:metaNav.downloads" /></span></f:link.page></li>

and two pages "Intranet" and "Downloads" (so the resulting url is. /intranet/downloads)

but I failed

#5 Updated by Riccardo De Contardi 1 day ago

Another short question: Do you perchance have some locallang.xml (xml not xlf) files ?

Also available in: Atom PDF