Project

General

Profile

Actions

Bug #67845

closed

Page disappers if page is shortcut with shortcut mode "First subpage of selected/current page"

Added by Daniel Wagner almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2015-06-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem
In a HMENU a shortcut page is not rendered if the shortcut mode is set to "First subpage of selected/current page".
If the mode is set to "Selected page" and a page has been selected it works as expected. The page is not translated.

TYPO3 Version
6.2.13


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #67563: Broken shortcut generates empty <a> tag in menuClosedAndreas Wolf2015-06-17

Actions
Actions #1

Updated by David Greiner almost 9 years ago

Hi Daniel!

I can't confirm this bug using your configurations. Do you have some extensions installed which are modifying menu rendering?

It would be great if you could post your HMENU typoscript settings here.

Actions #2

Updated by Frederic Gaus almost 9 years ago

Dear Daniel,

I can not confirm this either. Works perfectly well.

Actions #3

Updated by Gernot Ploiner almost 9 years ago

I can confirm this issue with TYPO3 6.2.14
Tested in two different projects.
You only need to create a new page with the shortcut to subpage.

I can give you a testlogin (just mail me), if you like. So you can reproduce it and analyze installed extensions and versions and so on.

Actions #4

Updated by Ralf Merz almost 9 years ago

Hi,

i can confirm this with 6.2.14, too. We render a TMENU with simple <ul><li>..... construct. In the frontend, the links do not have any a-tags around them, when shortcut mode is "First subpage".
If I change it to "selected page" and set the first subpage's UID, it works.

I´ve tried 6.2.11 to 6.2.13: It works as expected. For me it is broken since 6.2.14 now.
In the attached screenshot you can see that for the 2nd link the markup is wrong, meaning that a-tag is missing. You may ignore the "javascript:void(0)" thing, this is done by jQuery after the document is ready.

One more thing: The page uses templavoila. I don´t know if this could be relevant.

Yours
Ralf
(merzilla)

Here is the Typoscript snippet:

std_TMENU = TMENU
std_TMENU {

  wrap = <ul id="nav">|</ul>
  noBlur = 1
  expAll = 1

  NO = 1
  NO {
     stdWrap.wrap = <span> | </span>
    stdWrap.htmlSpecialChars = 1
    wrapItemAndSub = <li class="first">|</li> |*| <li>|</li> |*| <li class="last">|</li>
  }

  NO.wrapItemAndSub.stdWrap.override.cObject = CASE
  NO.wrapItemAndSub.stdWrap.override.cObject {
    key.data = field:uid

    74 = TEXT
    74 {
      value = <li class="first products">|</li> |*| <li class="products">|</li> |*| <li class="last products">|</li>
    }

    73 = TEXT
    73 {
      value = <li class="first solutions">|</li> |*| <li class="solutions">|</li> |*| <li class="last solutions">|</li>
    }

    6 = TEXT
    6 {
      value = <li class="first services">|</li> |*| <li class="services">|</li> |*| <li class="last services">|</li>
    }
    51 = TEXT
    51 {
      value = <li class="first company">|</li> |*| <li class="company">|</li> |*| <li class="last company">|</li>
    }
  }

  ACT = 1
  ACT < .NO
  ACT.wrapItemAndSub = <li class="first active">|</li> |*| <li class="active">|</li> |*| <li class="last active">|</li>

  CUR = 1
  CUR < .NO
  CUR.wrapItemAndSub = <li class="first active current">|</li> |*| <li class="active current">|</li> |*| <li class="last active current">|</li>

  IFSUB = 1
  IFSUB < .NO
  IFSUB.wrapItemAndSub = <li class="first parent">|</li> |*| <li class="parent">|</li> |*| <li class="last parent">|</li>

  ACTIFSUB = 1
  ACTIFSUB < .NO
  ACTIFSUB.wrapItemAndSub = <li class="first active parent">|</li> |*| <li class="active parent">|</li> |*| <li class="last active parent">|</li>

  CURIFSUB = 1
  CURIFSUB < .NO
  CURIFSUB.wrapItemAndSub = <li class="first active current parent">|</li> |*| <li class="active current parent">|</li> |*| <li class="last active current parent">|</li>
  CURIFSUB.ATagParams.dataWrap = class="active sub{field:uid}" 
}

#######################################################
# Main Menu
#######################################################

lib.mainMenu = HMENU
lib.mainMenu {

  special = directory
  special.value = 1

  1 < std_TMENU
  1 {

    # writes an empty string
    # between <a> tags
    NO.stdWrap.if{
      value.field= uid
      equals = 102
      negate = 1
      }
    # removes the <a> tags
    NO.doNotLinkIt {
      override = 1
      override.if{
      value.field= uid
      equals = 102
      }
    }
    # writes the COA object
    NO.allWrap.override.cObject = COA
    NO.allWrap.override.cObject {

      20 < lib.solutions
      if{
      value.field= uid
      equals = 102
      }

    }
  }

    2 < .1
    2.wrap = <ul class="level2 container">|</ul>
    2.ACT.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>
    2.CUR.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>
    2.ACTIFSUB.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>
    2.CURIFSUB.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>
    2.NO.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>
    2.IFSUB.wrapItemAndSub = <li class="level2 first">|</li> |*| <li class="level2">|</li> |*| <li class="level2 last">|</li>

    3 < .1
    3.wrap = <ul class="level3">|</ul>

    4 < .1
    4.wrap = <ul class="level4">|</ul>
}

The markup is:

<ul id="nav">
    <li class="first products"><a href="javascript:void(0)"><span>Produkte</span></a>
        <ul class="level2 container">
            <li>... [cutted this off]</li>
        </ul>
    </li>
    <li class="solutions"><a href="javascript:void(0)"><span>Lösungen</span></a>
        <ul class="level2 container">
            <li>... [cutted this off]</li>
        </ul>
    </li>
    <li class="services"><span>Services</span>

        ....[cutted off]....
    </li>
    <li class="last company"><span>Unternehmen</span>
        ....[cutted off]....
    </li>
</ul>

So the first and second link have an a-tag, because their shortcut type is "Selected Page" and a page is selected. The 3rd and 4th have no a-tag because their shortcut mode is "First subpage of this page".

HTH

Actions #5

Updated by Alfred Bez almost 9 years ago

I had the same issue yesterday:

We’ve a website running on TYPO3 6.2 with a 3-level menu. Some of the pages are shortcuts to the first child page. It worked for more than 6 months and now suddenly doesn’t work if the language is english or french.
The markup should be:

<li class="has-dropdown">
    <a href="en/page/" title="Page">Page</a>
    <ul class="dropdown">
        <li><a href="en/subpage1/" title="Subpage">Subpage</a>
        <li><a href="en/subpage2/" title="Subpage">Subpage</a>
    </ul>
</li>

but is:

<li class="has-dropdown">
    Page
    <ul class="dropdown">
        <li><a href="en/subpage1/" title="Subpage">Subpage</a>
        <li><a href="en/subpage2/" title="Subpage">Subpage</a>
    </ul>
</li>

So there is a missing a-tag, but only in other languages (german is fine).

TypoScript:

mainNavi = HMENU
mainNavi {
  entryLevel = 0
  select.languageField = sys_language_uid
  1 = TMENU
  1 {
    noBlur = 1
    expAll = 1
    collapse = 0
    NO = 1
    NO {
      allStdWrap.dataWrap = <li>|</li>
      ATagTitle.field = title // subtitle
      ATagParams =
      allStdWrap.insertData = 1
    }
    IFSUB = 1
    IFSUB.wrapItemAndSub = <li class="has-dropdown">|</li>
    ACTIFSUB < .IFSUB
    ACTIFSUB = 1
    ACTIFSUB.wrapItemAndSub= <li class="has-dropdown active">|</li>
    ACT = 1
    ACT.wrapItemAndSub= <li class="active">|</li>
  }
}

After commenting out the line 91 it works (but this is not the proper solution, I've done this only for debug purpose).

I found our real problem: Page Type and Shortcut Mode weren’t properly configured in the english and french pages. I set Type to Shortcut and Shortcut Mode to First subpage of selected/current page (same as values on german site)

Actions #6

Updated by Riccardo De Contardi over 8 years ago

  • Status changed from New to Needs Feedback

I've not understood if it can be closed, then.

Actions #7

Updated by Jonas Hiller over 8 years ago

I can also confirm this Problem in TYPO3 Version 6.2.14

Actions #8

Updated by Alexander Opitz about 8 years ago

  • Status changed from Needs Feedback to New
Actions #9

Updated by Riccardo De Contardi almost 7 years ago

  • Status changed from New to Needs Feedback

Is this issue still present? I tried to reproduce it with 7.6.20 and two languages, without success.

My TypoScript menu:

page.6 = HMENU
page.6 {
  entryLevel = 0

  1 = TMENU
  1.wrap = <ul>|</ul>
  1 {
    expAll = 1
    collapse = 0
    NO = 1
    NO {
      wrapItemAndSub = <li>|</li>
      ATagTitle.field = subtitle // title
      ATagParams =

    }
    IFSUB = 1
    IFSUB.wrapItemAndSub = <li class="has-dropdown">|</li>
    ACTIFSUB < .IFSUB
    ACTIFSUB = 1
    ACTIFSUB.wrapItemAndSub= <li class="has-dropdown active">|</li>
    ACT = 1
    ACT.wrapItemAndSub= <li class="active">|</li>
  }

  2 < .1

}
Actions #10

Updated by Alexander Opitz over 6 years ago

  • Status changed from Needs Feedback to Closed

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

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF