Project

General

Profile

Actions

Bug #87325

closed

Unexpected behavior when there is no text in f:link.page

Added by Giovanni Romero Pérez over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-01-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello. Happy new year!

I'm using the f:link.page view helper. I found that the vh unfolds in a different way than expected when I don't define a text inside it.

For example, I have the following partial:

<div id="my-div">
    <div class="indicator hidden-xs" title="Search">
        <f:link.page pageUid="{searchPageUid}">text</f:link.page>
    </div>
    <div class="my-div-content"></div>
</div>

The result is:

<div id="my-div">
    <div class="indicator hidden-xs" title="Search">
        <a href="/index.php?id=362">text</a>
    </div>
    <div class="my-div-content"></div>
</div>

But, when I don't set any text in the view helper...

<div id="my-div">
    <div class="indicator hidden-xs" title="Search">
        <f:link.page pageUid="{searchPageUid}"></f:link.page>
    </div>
    <div class="my-div-content"></div>
</div>

The result is:

<div id="my-div">
    <div class="indicator hidden-xs" title="Search">
        <a href="/index.php?id=362">
    </a></div><a href="/index.php?id=362">
    <div class="my-div-content"></div>
</a></div>
<a href="/index.php?id=362">

</a>

Thanks.

Actions #1

Updated by Stefanos Karasavvidis over 5 years ago

I tried your example on the latest master, on current LTS 9 and LTS 8, and can't reproduce it.

In all cases, I get just a single empty a tag of the form

<a href="/index.php?id=362" />

The complete generated code is

    <div id="my-div">
        <div class="indicator hidden-xs" title="Search">
            <a href="index.php?id=1" />
        </div>
        <div class="my-div-content"></div>
    </div>

Note the self closing /> at the end of the a element. It doesn't make sense, but is valid. There are no additional a tags generated.

Please also note that the browser may get confused and use following elements as part of the link. But that would be a browser issue.

So could you please elaborate on your test case and make it more specific? Make also sure to view the generated source, and not try to use your browsers element inspector to view the generated source.

Actions #2

Updated by Anja Leichsenring over 5 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Riccardo De Contardi about 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions

Also available in: Atom PDF