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

Exception on manage tags page when tag collection is predefined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.1
    • 3.1, 3.1 regressions
    • Tags
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-54837-master
    • Hide

      Test 1.

      1. Install this plugin
      2. Go to Appearance>Manage tags and make sure the new tag area appeared
      3. Modify plugin as specified in comments in local/testtags/db/tag.php
      4. Go to the "Manage tags" page and make sure the collection for this tag area is displayed and is not editable (and there are no exceptions).
      5. Try adding other collections and make sure the collection for new tag area remains locked

      Test 2.

      1. Modify plugin as specified in comments in local/testtags/db/tag.php
      2. Go to Site pages > Tags and click on any tag (go to "manage tags" to create new tags if necessary)
      3. Make sure there are no exceptions

      Test 3.
      Add to any form:

      $mform->addElement('tags', 'tags', get_string('tags'));
      

      Make sure there are no fatal errors when this form is rendered.

      Show
      Test 1. Install this plugin Go to Appearance>Manage tags and make sure the new tag area appeared Modify plugin as specified in comments in local/testtags/db/tag.php Go to the "Manage tags" page and make sure the collection for this tag area is displayed and is not editable (and there are no exceptions). Try adding other collections and make sure the collection for new tag area remains locked Test 2. Modify plugin as specified in comments in local/testtags/db/tag.php Go to Site pages > Tags and click on any tag (go to "manage tags" to create new tags if necessary) Make sure there are no exceptions Test 3. Add to any form: $mform->addElement('tags', 'tags', get_string('tags')); Make sure there are no fatal errors when this form is rendered.
    • 3.2 Sprint 1

      While upgrading my own plugin to 3.1 I found several errors in Tag API:

      Error 1: If the tag collection is predefined in the db/tag.php (example), the "Manage tags" page throws an exception

      Coding error detected, it must be fixed by a programmer: Options for select element must contain an option for the specified value
       
      More information about this error
      Debug info:
      Error code: codingerror
      Stack trace:
       
          line 175 of /lib/classes/output/inplace_editable.php: coding_exception thrown
          line 56 of /tag/classes/output/tagareacollection.php: call to core\output\inplace_editable->set_type_select()
          line 76 of /tag/classes/areas_table.php: call to core_tag\output\tagareacollection->__construct()
          line 188 of /tag/manage.php: call to core_tag_areas_table->__construct()
      

      Error 2: Specifying the tag callback as a static function in a class throws a fatal error

      'callback' => 'local_testtags_process::tags',
      

      Error 3: Again fatal error when upgrading plugin that used to add a form element 'tags' this way:

      $mform->addElement('tags', 'tags', get_string('tags'));
      

            marina Marina Glancy
            marina Marina Glancy
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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