Skip to content

Secondary navigation class is in the wrong namespace and never loads #13

Description

@nihaalshaikh

Summary

classes/local/views/secondary.php declares namespace mod_pcast\navigation\views;, but the file lives under classes/local/views/. Core resolves the class at lib/pagelib.php as class_exists("mod_pcast\navigation\views\secondary"), which maps to classes/navigation/views/secondary.php.

Impact

class_exists() is false, the custom secondary nav is ignored, and edit.php's set_secondary_active_tab('modulepage') and the pendingapproval tab never take effect. The whole file is dead.

Location

classes/local/views/secondary.php:17

Verified live

class_exists('mod_pcast\navigation\views\secondary') = false; file present at classes/local/views/, absent at classes/navigation/views/.

Suggested fix

Move the file to classes/navigation/views/secondary.php.


Verified on a live install: Moodle 5.1.3, PHP 8.2, MariaDB, plugin version 2025121201 (current master). Reproduced 2026-09-02.


Found during the mod_pcast review/test pass (ClickUp 86cb46r9t). Line numbers are against master @ 73bb255.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghighHigh: bug or significant quality issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions