[FIX] 43581: paragraph characteristic is ignored inside lists - #12010
Merged
alex40724 merged 1 commit intoSep 1, 2026
Conversation
A paragraph containing a bullet or numbered list is rendered as div instead of p (COPage/xsl/page.xsl:929-942), since ul inside p is invalid HTML. The class is written correctly onto that div (page.xsl:990, "ilc_Paragraph ilc_text_block_<Characteristic>"), but the content style only emits the selector p.ilc_text_block_<class> for characteristics of type text_block (ilObjStyleSheet.php:305, CSSBuilder.php:55) - which does not match a div. The characteristic is therefore silently dropped as soon as a list is inserted into the paragraph. For heading1/2/3 the matching alias already exists (CSSBuilder.php:61-64), which is why heading characteristics do work inside lists since the fix for 41844, while text block characteristics still do not. That asymmetry is what the reporter of 43581 describes. Add the same alias for text_block. The .ilc_Paragraph part restricts it to the paragraph container produced by the page editor and leaves other divs carrying ilc_text_block_ classes untouched - notably the table preview container in PC/Table/class.ilPCDataTableGUI.php:147, where a blanket alias would apply the padding twice. The shipped default style needs the same alias for its eight non-heading classes; heading1/2/3, PageTitle and GlossaryOvTitle already have it. style.css is cached per style object (style_data.uptodate), so a database update step is required for the change to take effect on existing installations - same as step_14, step_19 and step_22. Introduced by 9cd338e (text_block tag div -> p). Affects 9.8 and later for text block characteristics; 9.0 to 9.7 additionally produced invalid <p><ul></p>. ILIAS 8 was unaffected, because text_block used the tag div there. Verified in a browser against the markup produced by the actual page.xsl: with the alias, list items inherit the paragraph characteristic for every list item characteristic, not just StandardListItem, while the table preview container keeps its single padding.
Member
Author
|
The failing pipeline is not caused by this change: the copyright checker rejects the license header of |
alex40724
added a commit
that referenced
this pull request
Sep 1, 2026
A paragraph containing a bullet or numbered list is rendered as div instead of p (COPage/xsl/page.xsl:929-942), since ul inside p is invalid HTML. The class is written correctly onto that div (page.xsl:990, "ilc_Paragraph ilc_text_block_<Characteristic>"), but the content style only emits the selector p.ilc_text_block_<class> for characteristics of type text_block (ilObjStyleSheet.php:305, CSSBuilder.php:55) - which does not match a div. The characteristic is therefore silently dropped as soon as a list is inserted into the paragraph. For heading1/2/3 the matching alias already exists (CSSBuilder.php:61-64), which is why heading characteristics do work inside lists since the fix for 41844, while text block characteristics still do not. That asymmetry is what the reporter of 43581 describes. Add the same alias for text_block. The .ilc_Paragraph part restricts it to the paragraph container produced by the page editor and leaves other divs carrying ilc_text_block_ classes untouched - notably the table preview container in PC/Table/class.ilPCDataTableGUI.php:147, where a blanket alias would apply the padding twice. The shipped default style needs the same alias for its eight non-heading classes; heading1/2/3, PageTitle and GlossaryOvTitle already have it. style.css is cached per style object (style_data.uptodate), so a database update step is required for the change to take effect on existing installations - same as step_14, step_19 and step_22. Introduced by 9cd338e (text_block tag div -> p). Affects 9.8 and later for text block characteristics; 9.0 to 9.7 additionally produced invalid <p><ul></p>. ILIAS 8 was unaffected, because text_block used the tag div there. Verified in a browser against the markup produced by the actual page.xsl: with the alias, list items inherit the paragraph characteristic for every list item characteristic, not just StandardListItem, while the table preview container keeps its single padding.
alex40724
added a commit
that referenced
this pull request
Sep 1, 2026
A paragraph containing a bullet or numbered list is rendered as div instead of p (COPage/xsl/page.xsl:929-942), since ul inside p is invalid HTML. The class is written correctly onto that div (page.xsl:990, "ilc_Paragraph ilc_text_block_<Characteristic>"), but the content style only emits the selector p.ilc_text_block_<class> for characteristics of type text_block (ilObjStyleSheet.php:305, CSSBuilder.php:55) - which does not match a div. The characteristic is therefore silently dropped as soon as a list is inserted into the paragraph. For heading1/2/3 the matching alias already exists (CSSBuilder.php:61-64), which is why heading characteristics do work inside lists since the fix for 41844, while text block characteristics still do not. That asymmetry is what the reporter of 43581 describes. Add the same alias for text_block. The .ilc_Paragraph part restricts it to the paragraph container produced by the page editor and leaves other divs carrying ilc_text_block_ classes untouched - notably the table preview container in PC/Table/class.ilPCDataTableGUI.php:147, where a blanket alias would apply the padding twice. The shipped default style needs the same alias for its eight non-heading classes; heading1/2/3, PageTitle and GlossaryOvTitle already have it. style.css is cached per style object (style_data.uptodate), so a database update step is required for the change to take effect on existing installations - same as step_14, step_19 and step_22. Introduced by 9cd338e (text_block tag div -> p). Affects 9.8 and later for text block characteristics; 9.0 to 9.7 additionally produced invalid <p><ul></p>. ILIAS 8 was unaffected, because text_block used the tag div there. Verified in a browser against the markup produced by the actual page.xsl: with the alias, list items inherit the paragraph characteristic for every list item characteristic, not just StandardListItem, while the table preview container keeps its single padding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Mantis 43581: https://mantis.ilias.de/view.php?id=43581
Problem
Applying a bullet or numbered list to a paragraph drops its paragraph
characteristic. The text falls back to the default font, although the editor
still shows the characteristic in its dropdown.
Cause
A paragraph containing a list is rendered as div instead of p (page.xsl:929-942),
since ul inside p is invalid HTML. The class is written correctly onto that div
(page.xsl:990): class="ilc_Paragraph ilc_text_block_StandardLarge".
But the content style only emits p.ilc_text_block_ for characteristics of
type text_block (ilObjStyleSheet.php:305, CSSBuilder.php:55), and that selector
does not match a div.
For heading1/2/3 the matching alias already exists (CSSBuilder.php:61-64), which
is why heading characteristics work inside lists since the fix for 41844, while
text block characteristics still do not.
Change
Add the same alias for text_block, plus the eight non-heading classes in the
shipped default style, plus a database update step.
The .ilc_Paragraph part restricts the alias to the paragraph container produced
by the page editor and leaves other divs carrying ilc_text_block_ classes
untouched - notably ilPCDataTableGUI.php:147, where a blanket alias would apply
the padding twice.
The update step is required because style.css is cached per style object
(style_data.uptodate); without it the change has no effect on existing
installations. Same as step_14, step_19 and step_22.
The change applies unmodified to release_11 and trunk; step_23 is free in all
three lines.