Project

General

Profile

Actions

Bug #91434

closed

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

Added by Hagen Gebauer almost 4 years ago. Updated almost 4 years ago.

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

100%

Estimated time:
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.

Actions #1

Updated by Michael Stucki almost 4 years ago

  • Project changed from 9 to TYPO3 Core
  • TYPO3 Version set to 10

Wrong project.

Actions #2

Updated by Benni Mack almost 4 years 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?

Actions #3

Updated by Hagen Gebauer almost 4 years 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>

Actions #4

Updated by Riccardo De Contardi almost 4 years 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

Actions #5

Updated by Riccardo De Contardi almost 4 years ago

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

Actions #6

Updated by Hagen Gebauer almost 4 years ago

  • % Done changed from 0 to 100

Hi Riccardo!

Riccardo De Contardi wrote:

Another question: do you use third-party extensions?

Thanks a lot for this hint! It was the extension secure_downloads, and its configuration setting linkPrefix. The default was securedl and I changed it to download because I thought it looked nicer. Apparently the extension now replaced everything in the template files that started with download.

Thanks again!
H.

Actions #7

Updated by Riccardo De Contardi almost 4 years ago

@Hagen Gebauer thank you for your quick reply; do you agree if I close your issue as non-core related? Or is there still something to do here?

Actions #8

Updated by Hagen Gebauer almost 4 years ago

Riccardo De Contardi wrote:

do you agree if I close your issue as non-core related? Or is there still something to do here?

Thank you! Yes, please close the issue. I set it to 100% done but didn’t know how to close it (or maybe I couldn’t). I will try and place an issue with the extension developer.

Actions #9

Updated by Riccardo De Contardi almost 4 years ago

  • Category set to Frontend
  • Status changed from Needs Feedback to Closed

Closed in agreement with the reporter.

If you think that this is the wrong decision, please reopen it or ping me.

Actions

Also available in: Atom PDF