Project

General

Profile

Actions

Bug #36494

closed

GMENU img has "name" attribute instead of "id" in html5

Added by Sven Tappert about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2012-04-23
Due date:
% Done:

0%

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

Description

In tslib_menu::start() (class.tslib_menu.php, line 148-158) $this->nameAttribute is not correctly set to "id" for xhtmlDoctype "html5", because at this point "$GLOBALS['TSFE']->xhtmlDoctype" is an empty string.

As a result GMENUs get an obsolete "name" attribute in the img tags.

The error is caused by resetting "$GLOBALS['TSFE']->xhtmlDoctype" in class.tslib_pagegen.php (line 186), since "html5" is not considered as XHTML doctype.

Possible solutions:
  • html5 has to be added as xhtml doctype in class.tslib_pagegen.php
  • the switch statement in tslib_menu::start() should check for $GLOBALS['TSFE']->config['config']['doctype'] in line 148

Version 4.5 is probably affected as well.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #62622: Javascript variable version not setClosed2014-11-02

Actions
Related to TYPO3 Core - Bug #75983: GMENU rollover not workingClosed2016-04-29

Actions
Actions #1

Updated by Marcel Zweifel almost 12 years ago

I have the same error with GMENU & HTML5. Try this as short hack:

config.xhtmlDoctype = xhtml_2

Actions #2

Updated by Stefan Krude over 9 years ago

This is still not working in 6.2.6.
Is nobody able or willing to fix that?

Actions #3

Updated by Riccardo De Contardi almost 9 years ago

  • Is Regression set to No

The bug is still present on 6.2.14 and 7. I used the following code to test:

page.14=HMENU
page.14.1 = GMENU
page.14.1{
  wrap =<ul class="menu-ul">|</ul>
  NO = 1
    NO {
      wrap =<li class="menu-li">|</li>
      format = gif
      XY=[10.w]+5,[10.h]+15
      10 = TEXT
      10 {
        text.field = title
        fontSize = 14
        fontColor = #414141
        offset = 0,18
        niceText = 1
        antiAlias= 0
       }
       imgParams = title="{field:title}" 
       allStdWrap.insertData = 1
       ATagParams = class="gmenu-no" 
    }
    ACT = 1
    ACT < .NO
    ACT {
     10.fontColor = #d62919
    }
    RO = 1
    RO < .NO
    RO.backColor=#000000
    RO{
      10.fontColor=#ffffff
    }
}

Notes:
1) in both enviroments, the rollover does not work, a javascript error is thrown

Uncaught Reference
Error: version is not defined(anonymous function) @ (index):51

2) it works also with config.doctype=xhtml_strict , config.doctype=xhtml_11

Actions #4

Updated by Riccardo De Contardi over 8 years ago

I report here the description of #62622 (closed as duplicate) to help the discussion:

In typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php in function INTincScript_loadJSCode() there is JavaScript code emitted which tests the variable 'version'. This variable was set in sysext/cms/tslib/class.tslib_pagegen.php (version 4.5) but isn't set any more in typo3/sysext/frontend/Classes/Page/PageGenerator.php (version 6.2).
Because of this the hover effect in GMENU is not working.
Either the missing code should be readded again or the code in TypoScriptFrontendController.php should be adapted.

Actions #5

Updated by Riccardo De Contardi over 8 years ago

  • Target version set to Candidate for Major Version
Actions #6

Updated by Riccardo De Contardi about 8 years ago

  • Assignee set to Benni Mack
Actions #7

Updated by Riccardo De Contardi about 8 years ago

  • Status changed from New to Closed
  • Assignee deleted (Benni Mack)

This has been solved with https://review.typo3.org/#/c/47975/ so I think I can close it.

If you think this is the wrong decision, then let us know (on Slack for example - https://typo3.slack.com/ ) or open a new ticket and add a relation to this ticket number. Thank you

Actions #8

Updated by Oliver Hader over 6 years ago

  • Category changed from 1050 to Frontend
Actions

Also available in: Atom PDF