Bug #20607
closedWrong rendering of HTML content element
0%
Description
If content element HTML has open tag, fe:
<div id="foo">
then it will be closed automatically but should not.
This behaves like that if I choose the latest "CSS Styled Content" in "Include static (from extensions)".
If I choose "CSS Styled Content TYPO3 4.2" then the tag is not closed automatically.
(issue imported from #M11316)
Files
Updated by Krystian Szymukowicz about 15 years ago
It appears that from 4.3 every content element its wrapped with <div id="cXXX" class="csc-default" >|</div> and this is the reason why it closes my opened tag.
Updated by Marcus Biesioroff about 15 years ago
Small correct: 4.3 doesn't complete your tag but wraps your 'non-complete' tag into complete <div class="csc-default">|</div> so if your tag is div the browser threads next found </div> as end of your part... The solution is "No frame" type of frame to avoid csc-defauld wrapping. (I posted it on the typo3.projects.content-rendering list)
Updated by Krystian Szymukowicz about 15 years ago
As an explanation why I use wrappers in HTML CE.
I use it in case when:
a) wrapper will be not available to end user and used at pages that editor can not edit anyway
b) wrapper will be used only once or two in whole webpage.
There are "better" ways (TV, ICE Box, kb_nescefe) but first you need to add wrapper to system then exclude it from end user. Its time consuming and what for: to use it just once? HTML CE wrapper are much faster.
But anyway as there are workarounds and the behavior can be easily changed in TS I think it is not a problem.
I would only make a note in 4.3 changelog so this people who uses "extremely quick HTML CE wrapper" may know why their layout just broke after upgrade to 4.3.
So please close this bug.
Updated by Susanne Moog over 14 years ago
Attached a new patch which does:
- Keep the default frame (see deeper reasons in the discussion)
- Define a label for the default frame ("Default Frame" instead of no
label, so one can guess that there will be a frame around the element)
- Define a new section_frame called "No Frame" which renders the element
like v4.2 did and which can be used for wrapper HTML elements.
Updated by Ron Hall over 14 years ago
I too have run into this issue when upgrading legacy sites to 4.3. I have dealt with it using the following TS:
tt_content.stdWrap.innerWrap.cObject.default.if {
value = html
equals.field = CType
negate = 1
}
tt_content.html.dataWrap = <a id="c{field:uid}"></a>|
This will keep the HTML element from being wrapped in a div but still retains the ability to link to it via the anchor tag. Be aware the space before and after fields are nullified. But the rendering is close to that in 4.2 and only affects the HTML CE.
I don't have this problem in later installations as I do not use the HTML CE in ways where the wrapping div causes an issue.
Updated by Francois Suter over 14 years ago
Committed Susanne's solution to trunk in revision 7250