Project

General

Profile

Actions

Bug #65234

closed

Unwanted p tag between UL and LI

Added by Tobias Pierschel over 9 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2015-02-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #65948: Nested lists are rendered with paragraphs around inner listsClosed2015-03-23

Actions
Related to TYPO3 Core - Bug #61954: Click-enlarge problem when an image is inside ul li OR ol liClosed2014-09-29

Actions
Related to TYPO3 Core - Bug #70067: RTE - list with sub item has nasty p tagsClosed2015-09-24

Actions
Related to TYPO3 Core - Bug #39261: parseFunc does not handle nested tags correctClosed2012-07-25

Actions
Related to TYPO3 Core - Bug #71878: Empty <p>-Tags after Content RenderingClosed2015-11-27

Actions
Actions #1

Updated by Andreas Kienast over 9 years ago

  • Category changed from t3editor to Frontend
Actions #2

Updated by Claude Unterleitner over 9 years ago

This is no solution as then links inside the <li> tags are no more possible.

Actions #3

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
}
Actions #4

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>&nbsp;</p>
<li><a href="/">Prozessoptimierung</a></li>
<p>&nbsp;</p>
<li>Ressourcenauslastung</li>
<p>&nbsp;</p>
<li>Qualitätssteigerung</li>
<p>&nbsp;</p>
<li>Effizienz</li>
<p>&nbsp;</p>
<li>Imagestärkung</li>
<p>&nbsp;</p>
</ul>
Actions #5

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?

Actions #6

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!

Actions #7

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>
Actions #8

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.

Actions #9

Updated by Julian Stock over 9 years ago

This bug (?) still occurs in TYPO3 6.2.12.

Actions #10

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.

Actions #11

Updated by Patrick Lenk over 9 years ago

same problem here with 6.2.13. the above #10 snippet works! thx

Actions #12

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

Actions #13

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...

Actions #14

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.

Actions #15

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.

Actions #16

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (next-patchlevel)
Actions #17

Updated by Mathias Brodala almost 9 years ago

Please have a look at #71878

Actions #18

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).

Actions #19

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?

Actions #20

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

Actions #21

Updated by Michael Sollmann about 8 years ago

It is still present in 7.6.10. The TS-Setup from #10 fixes the problem.

Actions #22

Updated by Michael Hank over 7 years ago

Still present in 6.2 branch. The workaround from #10 worked for me, too. Thank you.

Actions #23

Updated by Thomas Mayer over 7 years ago

Still present in 6.2.31 and 7.6.18. #10 still works for both versions.

Actions #24

Updated by Thomas Mayer over 7 years ago

  • Is Regression changed from No to Yes
Actions #25

Updated by Patrick Kracht over 7 years ago

Still present in 8.5.1 but #10 still works.

Actions #26

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

Actions #27

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

Actions #28

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)

Actions #29

Updated by Susanne Moog about 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #30

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.

Actions #31

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.

Actions #32

Updated by Julian Stock about 6 years ago

Still happening in TYPO3 v8.7.19, using rte_ckeditor.

Actions #33

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.

Actions

Also available in: Atom PDF