meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:condition_toc_resolution [2026/04/19 00:48] – doreps | public:condition_toc_resolution [2026/07/08 23:38] (current) – doreps | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{page> | ||
| ====== Condition Plugin, Include Plugin, and TOC Interaction (Resolution – April 2026) ====== | ====== Condition Plugin, Include Plugin, and TOC Interaction (Resolution – April 2026) ====== | ||
| - | This page documents the resolution of a cascading Table of Contents issue that occurred when using the Condition plugin | + | This page documents the resolution of a cascading Table of Contents issue that occurred when using the Condition plugin |
| ~~NOCACHE~~ | ~~NOCACHE~~ | ||
| Line 7: | Line 8: | ||
| ===== Summary ===== | ===== Summary ===== | ||
| - | {{page> | + | A page that used the Condition plugin to display a time‑based announcement behaved correctly on a local DokuWiki installation but produced |
| - | + | ||
| - | + | ||
| - | A page that used the Condition plugin to display a time‑based announcement behaved correctly on a local DokuWiki installation, but produced | + | |
| The root cause was a combination of: | The root cause was a combination of: | ||
| Line 18: | Line 16: | ||
| * A DokuWiki parser rule that no plugin block may appear between the page title and the first heading | * A DokuWiki parser rule that no plugin block may appear between the page title and the first heading | ||
| * Differences in PHP 8 handling of the Condition plugin’s internal logic | * Differences in PHP 8 handling of the Condition plugin’s internal logic | ||
| + | * The discovery that plugin blocks placed immediately after the first heading also destabilize TOC construction | ||
| + | * The final finding that an Include block is safe only when placed at the very top of the page, before all headings, where it is evaluated during the pre‑parse stage rather than during TOC assembly | ||
| - | After applying PHP 8 compatibility fixes and restructuring the page to avoid plugin blocks above the first heading, | + | After applying PHP 8 compatibility fixes and restructuring the page so that the Include banner appears as the first element on the page—above the page title and before any headings—the TOC stabilized, and the Condition plugin behaved consistently across environments. |
| ===== Environment ===== | ===== Environment ===== | ||
| Line 64: | Line 64: | ||
| ===== Temporal Conditions ===== | ===== Temporal Conditions ===== | ||
| - | The Condition plugin’s ``time`` test accepts full date and time formats. A ``date`` test has been added locally and mirrors the same logic. | + | The Condition plugin’s ``time`` test accepts full date-and-time formats. A ``date`` test has been added locally and mirrors the same logic. |
| Examples: | Examples: | ||
| Line 89: | Line 89: | ||
| ===== Resolution ===== | ===== Resolution ===== | ||
| - | After applying the PHP 8 fixes, adding the ``date`` test, and restructuring the page to ensure no plugin blocks appear above the first heading, the TOC now renders correctly and the Condition plugin behaves consistently across environments. | + | After applying the PHP 8 fixes, adding the ``date`` test, and restructuring the page so that the Include banner appears as the first element on the page, the TOC now renders correctly, and the Condition plugin behaves consistently across environments. |
| + | <WRAP noprint> | ||
| + | ~~DISCUSSION~~ | ||