Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39801

navigationlib.php navigation_node_collection::remove fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3.8, 2.4.5, 2.5.1
    • 2.3.7, 2.4.4, 2.5, 2.6
    • Navigation
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • wip-MDL-39801-master
    • Hide

      This can not be reproduced in core since function navigation_node::remove() is almost not used. It may occur when themes or other contributed plugins attempt to remove a navigation node.

      Review the commits and run unit tests.

      Show
      This can not be reproduced in core since function navigation_node::remove() is almost not used. It may occur when themes or other contributed plugins attempt to remove a navigation node. Review the commits and run unit tests.

      navigationlib.php:902 if ($node->key == $key && $node->type == $type)
      This test always returns true for the first element of the $this->collection
      Hard to find out why my theme was not removing the good item !

      Solution :
      if ($node->key === $key && $node->type === $type)
      Maybe the test is not ok also l.2561 and l.4397 .

      Thanks for your work.

            marina Marina Glancy
            lartet Florent Lartet
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.