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

navigationlib.php navigation_node_collection::remove fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.7, 2.4.4, 2.5, 2.6
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-39801-master

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13