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 10:43] – doreps | public:condition_toc_resolution [2026/07/08 23:38] (current) – doreps | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== 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 8: | Line 8: | ||
| ===== Summary ===== | ===== Summary ===== | ||
| - | 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 19: | Line 19: | ||
| * 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 | * 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 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. | + | 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 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. This placement ensures that conditional and included content is fully evaluated before DokuWiki constructs the TOC, preventing cascading, duplication, | + | 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. This placement ensures that conditional and included content is fully evaluated before DokuWiki constructs the TOC, preventing cascading, duplication, |
| <WRAP noprint> | <WRAP noprint> | ||
| ~~DISCUSSION~~ | ~~DISCUSSION~~ | ||