Bug #36494
closed
GMENU img has "name" attribute instead of "id" in html5
Added by Sven Tappert over 12 years ago.
Updated about 7 years ago.
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.
I have the same error with GMENU & HTML5. Try this as short hack:
config.xhtmlDoctype = xhtml_2
This is still not working in 6.2.6.
Is nobody able or willing to fix that?
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
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.
- Target version set to Candidate for Major Version
- Assignee set to Benni Mack
- Status changed from New to Closed
- Assignee deleted (
Benni Mack)
- Category changed from 1050 to Frontend
Also available in: Atom
PDF