Project

General

Profile

Actions

Bug #40647

closed

Typo3 creates menu without href attribut inside the a tag

Added by Ralle Büchnitz about 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2012-09-05
Due date:
% Done:

0%

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

Description

Pages that are created as shortcuts (first subpage) fail to get an href attribute in second language.

This only happens for the second language and shortcut pages. example: <a title="Portfolio">Portfolio</a>

I researched a bit in the code and found out that class 'class.tslib_menu.php' throws an exception on line 1173. Because the shortcut-mode-value is zero.

If the same link is generated within the default language the shortcut-mode-value is 1. And the href attribute is added to the a-tag.

I think it is a problem of the shortcut-mode value in the menuArr-Array inside this class.

I fixed this for my case as quick and dirty to force shortcut-mode value to 1

// CHANGED BY ME
if ($this->menuArr[$key]['shortcut_mode'] == 0) {$this->menuArr[$key]['shortcut_mode'] = 1;}

The problem appears in Version 4.7.4 and also in version 4.6.x

Actions #1

Updated by Markus Klein about 12 years ago

You have to set a shortcut mode in the translated content element.

Actions #2

Updated by Ralle Büchnitz about 12 years ago

Thanks - this works fine.

The second page-language was pagetype 'standard' while default-language pagetype was 'shortcut'.
This looks like an upgrade issue to me. I fixed this.

But the generated link should - imo - have at least an href-attribute which should point to the page itself as it was a standard page in second language and should therefore link to itself.

So users would be able to point to another page in different languages (p.e. some-parts-are-of-this-site-are-only-available-in-german) or present other content for each language.

Actions #3

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.2 (Frontend)
  • Is Regression set to No
Actions #4

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #5

Updated by Thomas Esterer over 9 years ago

I'm having this problem after updating from 4.5.22 to 6.2.14. The hint with updating the shortcut_mode to 1 at the translated entry in the pages_language_overlay didn't solve the problem. I'm still not getting an anchor tag when rendering the HMENU in my second language.

Actions #6

Updated by Markus Klein over 9 years ago

  • Status changed from New to Needs Feedback

@Thomas. Can you please provide more information about your setup?

What did you set in the default language?
What did you set in the alternative language?
How does your menu TS look like?

Actions #7

Updated by Thomas Esterer over 9 years ago

Here is some more information:

I'm setting the languages like this:

[globalVar=TSFE:type=0]
...
    seite.config {
        linkVars = L
        sys_language_uid = 0
        language = de
        forceTypeValue = 0
        htmlTag_langKey = de-at
        locale_all = de_AT
    }

    ...
[global]

[globalVar=TSFE:type=1]
    ...
    seite.config {
        linkVars = L
        sys_language_uid =  1
        language = en
        htmlTag_langKey = en
        languageTranslationnummer = 1
        locale_all = en
        forceTypeValue = 1
    }
    ...
[global]

And the menu looks like this:

mainmenu = HMENU
mainmenu.entryLevel = 0
mainmenu.1 = TMENU
mainmenu.1.itemArrayProcFunc = user_main
mainmenu.1 {
    noBlur = 1
    expAll = 1
    NO = 1
    NO {
        ATagParams = class="helvetica-light" 
        allWrap    = <td valign="bottom" style="padding-right:28px;">|</td>|*|<td valign="bottom" style="padding-right:28px;">|</td>|*|<td valign="bottom">|</td>
    }
    ACT < .NO
    ACT {
        ATagParams = class="helvetica-light active" 
    }

}

menuSeperator = TEXT
menuSeperator.value = <div class="menu-seperator"></div>

[globalVar=TSFE:type=1]
mainmenu.1.NO.allWrap = <td valign="bottom" style="padding-right:28px;">|</td> |*| <td valign="bottom" style="padding-right:28px;">|</td> |*| <td valign="bottom" style="padding-right:24px;">|</td>
[global]
[globalVar=TSFE:id=1]
menuSeperator.value >
[global]
Actions #8

Updated by Markus Klein over 9 years ago

Sorry, I don't understand your setup.

You have a condition for the type parameter, but you do not set the typeNum on the "seite" content object.
You define a different language for each type.

You're actually running two different sites in different languages (distinguished by type), but you manage them in the same page tree.
To be honest, I've never seen such a setup before.
I need to think about such a setup and which implications this has for the menus.

Actions #9

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #10

Updated by Benni Mack about 9 years ago

  • Target version deleted (7.5)
Actions #11

Updated by Riccardo De Contardi almost 9 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.

You could also join the #typo3-cms channel in Slack if you still need support.
Thank you

Actions

Also available in: Atom PDF