meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
public:condition_toc_resolution [2026/04/18 22:28] – created - external edit 127.0.0.1public:condition_toc_resolution [2026/07/08 23:38] (current) doreps
Line 1: Line 1:
 +{{page>public:condition_toc_resolution_banner&inline}}
 ====== Condition Plugin, Include Plugin, and TOC Interaction (Resolution – April 2026) ====== ====== Condition Plugin, Include Plugin, and TOC Interaction (Resolution – April 2026) ======
-~~NOCACHE~~ 
  
 +This page documents the resolution of a cascading Table of Contents issue that occurred when using the Condition plugin alongside the Include plugin in a PHP 8 environment. It is published for the benefit of other administrators who may encounter similar behavior.
  
-This page documents the resolution of a cascading Table of Contents issue that occurred when using the Condition plugin together with the Include plugin on a PHP 8 environment. It is published for the benefit of other administrators who may encounter similar behavior.+~~NOCACHE~~
  
 ===== Summary ===== ===== Summary =====
  
-A page that used the Condition plugin to display a time‑based announcement behaved correctly on a local DokuWiki installationbut produced duplicated and cascading TOC entries when deployed on a shared hosting environment. The issue was reproducible only when the Condition plugin and an Include block were placed near the top of the page.+A page that used the Condition plugin to display a time‑based announcement behaved correctly on a local DokuWiki installation but produced duplicate and cascading TOC entries when deployed to a shared hosting environment. The issue was reproducible only when the Condition plugin and an Include block were placed near the top of the page, causing the parser to misinterpret heading boundaries.
  
 The root cause was a combination of: The root cause was a combination of:
Line 15: 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, 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 stabilizedand the Condition plugin behaved consistently across environments.
  
 ===== Environment ===== ===== Environment =====
Line 61: 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 86: 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 correctlyand 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, and frozen heading states across all tested environments.
  
 +<WRAP noprint>{{page>site:site-footer-comment_feedback_block}}</WRAP>
 +~~DISCUSSION~~