<ul><li>Root cause found via console debug: Fatal TypeError in websites.class.php:280 — count($exist) where $exist is null (returned by checkModuleSecurity when no security record exists for a new page). PHP 8 requires Countable|array for count(), null causes Fatal. Fix: removed redundant || count($exist) > 0 — !empty($exist) already handles the truthy case and is null-safe.</li><li>Fixed checkModuleSecurity() line 311: $_SESSION["YPTemplateID"] ?? 0 null guard.</li><li>Effect: pages with no prior security settings can now be saved for the first time (insert path). Pages with existing security records also update correctly.</li></ul>