Bug #65234
closedUnwanted p tag between UL and LI
Added by Tobias Pierschel over 9 years ago. Updated over 3 years ago.
0%
Description
Version: 6.2.10RC1:
If you have a html list (ul, li) in a normal text content element the frontend renders:
<ul> <p><p> <li>Hallo Welt</li> <p></p> </ul>
Solution:
lib.parseFunc_RTE.externalBlocks.ul.callRecursive >
Files
Schermata 2016-05-15 alle 19.04.44.png (61.9 KB) Schermata 2016-05-15 alle 19.04.44.png | Riccardo De Contardi, 2016-05-15 19:22 | ||
Bildschirmfoto 2018-11-07 um 14.18.14.png (14.4 KB) Bildschirmfoto 2018-11-07 um 14.18.14.png | Julian Stock, 2018-11-07 14:18 |
Updated by Andreas Kienast over 9 years ago
- Category changed from t3editor to Frontend
Updated by Claude Unterleitner over 9 years ago
This is no solution as then links inside the <li> tags are no more possible.
Updated by Riccardo De Contardi over 9 years ago
This seems to work:
lib.parseFunc_RTE.externalBlocks := addToList(li) lib.parseFunc_RTE.externalBlocks{ li.stripNL=1 li.stdWrap.parseFunc = < lib.parseFunc }
Updated by Tobias Pierschel over 9 years ago
Its true that
lib.parseFunc_RTE.externalBlocks.ul.callRecursive >
remove all links but
lib.parseFunc_RTE.externalBlocks := addToList(li) lib.parseFunc_RTE.externalBlocks{ li.stripNL=1 li.stdWrap.parseFunc = < lib.parseFunc }
also doesnt work. I get the same result:
<ul> <p> </p> <li><a href="/">Prozessoptimierung</a></li> <p> </p> <li>Ressourcenauslastung</li> <p> </p> <li>Qualitätssteigerung</li> <p> </p> <li>Effizienz</li> <p> </p> <li>Imagestärkung</li> <p> </p> </ul>
Updated by Claude Unterleitner over 9 years ago
Could you try this?
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt,li
I was really wondering because in an other TYPO3 installation (also 6.2.10) which I updated already last year, I found this line which is completely different.Could it perhaps be that the update manager in the install tool didn't terminate properly in V. 6.2.10?
Updated by Tobias Pierschel over 9 years ago
This
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt,li
works for me. Thank you!
Updated by Daniel Neugebauer over 9 years ago
Just happened to fall into this trap as well with 6.2.11, PHP 5.5 and static include "CSS Styled Content TYPO3 v4.5"...
For me, lib.parseFunc_RTE.externalBlocks.ul.callRecursive = 0
does not break (page) links.
The other working solution is adding the lines from comment #3 (adding li
to externalBlocks
).
Another idea I had was trying to remove li
from lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList
as TYPO3 4.5 (which we are migrating over from) did not have li
in encapsTagList
. This was sufficient when rendered via TemplaVoila but not outside TV. (Edit: not sure what I tested here, didn't work on retry) However, this doesn't seem to have any effect although that's an obvious difference compared to TYPO3 4.5 (why is it in "CSS Styled Content TYPO3 v4.5", anyway?).
To prevent confusion: Comments #4-#6 are no solution to the original problem; the problem exists with encapsLines
defined as in #5/#6 (default).
Edit 2: Another thing about the default code that worries me is that it produced a completely invalid structure on one content element for us: (notice how opening and closing tags are in the wrong order)
<ul><p class="bodytext"><li>Some text: </p><ul><li>link here</li>...</ul><p class="bodytext"></li></p></ul>
Updated by Chris Müller over 9 years ago
I am having the same problem after updating from TYPO3 6.2.6 to TYPO3 6.2.11. So, this is a breaking change.
Updated by Julian Stock over 9 years ago
This bug (?) still occurs in TYPO3 6.2.12.
Updated by Brain Appeal GmbH over 9 years ago
The problem seems to occur because of a "fix" in #61954.
The following configuration finally worked without breaking something else:
lib.parseFunc_RTE { externalBlocks { ol > ul > ol.stripNL = 1 ol.stdWrap.parseFunc = < lib.parseFunc ul.stripNL = 1 ul.stdWrap.parseFunc = < lib.parseFunc } }
Links inside the nested lists work, too. I did not test click-enlarge images inside an rtehtmlarea.
Updated by Patrick Lenk over 9 years ago
same problem here with 6.2.13. the above #10 snippet works! thx
Updated by Andreas Becker over 9 years ago
The following one-liner works for me as well
# Stop wrapping the following tags with p-tag lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.encapsTagList = cite, div, p, pre, hr, h1, h2, h3, h4, h5, h6, table, tr, td, th, ul, li
Updated by Patrick Lenk over 9 years ago
Andreas Becker wrote:
The following one-liner works for me as well
[...]
...but not with nested lists...
Updated by Thomas Mayer over 9 years ago
Issue still occurs in 6.2.14. The above https://forge.typo3.org/issues/65234#note-10 works for me as well.
This issue should be tagged as a regression.
Updated by Riccardo De Contardi about 9 years ago
It is still present on both 6.2.15 and 7.6-dev (latest master), I tried with the standard RTE configuration.
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Daniel Neugebauer almost 9 years ago
#71878 doesn't apply for us as the p/ul/li-issue happens outside any Fluid templates for us (regular content elements in TemplaVoila columns).
Updated by Riccardo De Contardi over 8 years ago
as far as I can see in both 7.6.6 and 8.2-dev there is the situation illustrated on the attached screenshot and the bug is absent; still present on 6.2.22. Can someone confirm?
Updated by Thomas Oliver Moll over 8 years ago
Stil present in 6.2.26
but Workarround from #10 works for me.
Please be aware, that this is all about nested Lists
Updated by Michael Sollmann about 8 years ago
It is still present in 7.6.10. The TS-Setup from #10 fixes the problem.
Updated by Michael Hank over 7 years ago
Still present in 6.2 branch. The workaround from #10 worked for me, too. Thank you.
Updated by Thomas Mayer over 7 years ago
Still present in 6.2.31 and 7.6.18. #10 still works for both versions.
Updated by Patrick Kracht over 7 years ago
Still present in 8.5.1 but #10 still works.
Updated by Patrick Lenk over 7 years ago
Patrick Kracht wrote:
Still present in 8.5.1 but #10 still works.
and 8.7.1 only work with #10
Updated by Riccardo De Contardi over 7 years ago
The lines
lib.parseFunc_RTE { externalBlocks { ol { stripNL = 1 stdWrap.parseFunc = < lib.parseFunc } ul { stripNL = 1 stdWrap.parseFunc = < lib.parseFunc } } }
are already present in TYPO3 8.7.1: EXT:fluid_styled_content/Configuration/TypoScript/Helper/ParseFunc.txt
Updated by Patrick Lenk over 7 years ago
Riccardo De Contardi wrote:
The lines
[...]are already present in TYPO3 8.7.1: EXT:fluid_styled_content/Configuration/TypoScript/Helper/ParseFunc.txt
ok, but not in EXT:css_styled_content (i know it's deprecated)
Updated by Susanne Moog about 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Nicolai Schirawski about 6 years ago
The unwanted p-Tag between ul and li doesn't appear any more for TYPO3 8.7.
This applies to both cases: both rendering with fluid-styled-content and rendering with csc-styled-content.
Updated by Benni Mack about 6 years ago
- Status changed from New to Closed
I'll close this ticket then. @Patrick Broens the same code snippet can be used for Fluid Styled Content and CSS Styled Content.
Updated by Julian Stock about 6 years ago
- File Bildschirmfoto 2018-11-07 um 14.18.14.png Bildschirmfoto 2018-11-07 um 14.18.14.png added
- TYPO3 Version changed from 6.2 to 8
- PHP Version changed from 5.4 to 7.1
Still happening in TYPO3 v8.7.19, using rte_ckeditor.
Updated by Andreas Kießling over 3 years ago
Thanks Patrick for mentioning csc, just stumbled over that misconfiguration. Why is the parseFunc part of csc or fsc? IMHO this hast nothing to do with the way content elements are created / rendered, the editor should behave the same.