Bug #83795
closed in the tables with <ol> or <ul>
0%
Description
If you insert a table in the RTE-field and use just a list inside a table cell (<ol>
or <ul>
) inside a table cell there will in the frontend output alway a
included before and after the list. This
does not exist in the backend if you switch to code view but in the frontend. This moves the list always one line down in the table so it is not anymore on the same hight as the table row bevor or after.
This is to output in the frontend with this strange
:
<table class="contenttable"> <tbody> <tr> <td> <p>List</p> </td> <td> <ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol> </td> </tr> </tbody> </table>
PS: If you insert a table in the RTE-field which provides the extension news. This problem does not happen. So I guess news uses an other rendering method for the RTE-fields.
Files
Updated by Sascha Bucher Bucher almost 7 years ago
The nbsp is not visible in the ticket, sorry. Here again.
<table class="contenttable">
<tbody>
<tr>
<td>
<p>List</p>
</td>
<td>
((nbsp is inserted here))
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
((nbsp and heir))
</td>
</tr>
</tbody>
</table>
Updated by Sascha Bucher Bucher almost 7 years ago
Updated by Oliver joppnet almost 7 years ago
Just run into the same issue with TYPO3 8.7 and PHP 7.1. Any workaround or fix would be appreciated.
Updated by Oliver joppnet almost 7 years ago
After some digging in the TS object browser we figured the following lines of TS setup solved the issue for us:
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.innerStdWrap_all.ifBlank > lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.innerStdWrap_all.ifBlank =
We're still testing if this breaks anything other than purposely removing the
around
<ol>or
<ul>tags in RTE table cells.
Updated by Peter Linzenkirchner over 6 years ago
Same Problem here (TYPO3 8.7 latest version). The two lines from Oliver fixed the problems. No side effects until now, if i find some i will post.
Updated by Riccardo De Contardi over 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Susanne Moog over 6 years ago
- Tags changed from table ul ol frontendrendering rte creditor to frontendrendering rte ckeditor
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57777
Updated by Johannes Seipelt over 6 years ago
maybe this explains the intention?
https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fillEmptyBlocks
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57777
Updated by Nicolai Schirawski about 6 years ago
In Typo3 9.5 the problem doesn't exist: there is no in Frontend.
Updated by Gerrit Code Review about 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57777
Updated by Gerrit Code Review about 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58719
Updated by Łukasz Uznański about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c23b1e1970d44cb3fc836db697650be568788218.
Updated by Christian Hernmarck about 6 years ago
- Related to Bug #86819: Since 8.7.20 (#83795) all <p> </p> are converted to <p></p> added
Updated by Benni Mack about 6 years ago
- Status changed from Resolved to Accepted
Updated by Benni Mack about 6 years ago
Reverted due to a regression https://forge.typo3.org/issues/83795
Updated by Christian Hernmarck almost 6 years ago
In the database it looks like this after saving (insert table, insert list, save):
<td>{space}{tab}{tab}{tab}<ol>{space}{tab}{tab}{tab}{tab}<li>1. eins</li>{space}{tab}{tab}{tab}{tab}<li>2. zwei</li>{space}{tab}{tab}{tab}</ol>{space}{tab}{tab}{tab}</td>
{space} and {tab} to make it clear... :-) - normal intended html structure
if you remove all the tabs and spaces directly in the database and reload the frontend - the are away...
If you remove the spaces between td and ol (and /ol /td) in rte (source view) and save then the spaces are not there in the database and also the are away. But if you reopen the content in rte again -> the tabs are there again (with all the problems when saving)
This also happens with
<td> <div>foobar</div> </td>
but not with
<td><a href="/">Start</a></td>
I guess that block elements inside a td-pair will be structured and therefore get some tabs/spaces around. Theese should not be converted to in the frontend.
Hope this will help other people to find a solution.
Updated by Markus Klein almost 6 years ago
- Assignee deleted (
Łukasz Uznański) - % Done changed from 100 to 0
- Sprint Focus deleted (
On Location Sprint)
Updated by Franz Kugelmann over 5 years ago
we use the following 2 lines. This avoids the nbsp; around <ol> and <ul> within a <td>, but still keeps the <p>nbsp;</p> intact.
lib.parseFunc_RTE.externalBlocks.table.HTMLtableCells.default > lib.parseFunc_RTE.externalBlocks.table.HTMLtableCells.default.stdWrap.parseFunc =< lib.parseFunc
Updated by Georg Ringer almost 5 years ago
- Status changed from Accepted to Needs Feedback
I have just checked current master and using the following HTML in a text element
<table class="contenttable">
<tbody>
<tr>
<td>
<p>List</p>
</td>
<td>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
</td>
</tr>
</tbody>
</table>
and the output in the frontend is
<td><ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol></td>
which looks ok to me. can someone check that as well?
Updated by Riccardo De Contardi almost 5 years ago
- File cattura2.png cattura2.png added
Tested with the same HTML reported by Georg Ringer on comment 24
Results:¶
TYPO3 10.4.0-dev: not present
TYPO3 9.5.14: still present
I checked the configuration of lib.parseFunc_RTE
on the two versions and fount that TYPO3 10.4.0-dev has
lib.parseFunc_RTE.externalBlocks.table.HTMLtableCells.default.stdWrap.parseFunc.nonTypoTagStdWrap.encapsLines.innerStdWrap_all.ifBlank =
while TYPO3 9.5.14 does not. (don't know if there are other changes) See attached screenshot
Updated by Georg Ringer almost 5 years ago
- Status changed from Needs Feedback to Closed
Closing issue because works in 10 and solution available as well