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

Exception thrown when updating related tags of a tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7
    • Component/s: Tags
    • Labels:
    • Testing Instructions:
      Hide

      Test 1

      1. Add a interest tag to your profile from the edit profile page.
      2. Go to profile view / click on tag / edit tag
      3. Change description and add a few related tags, save form
      4. Make sure you get no notices/exceptions
        PS:- There is an un related error in master MDL-44398

      Test 2

      1. Backup a course with user data and restore it as a new course. Make sure no error related to this issue is seen.
      Show
      Test 1 Add a interest tag to your profile from the edit profile page. Go to profile view / click on tag / edit tag Change description and add a few related tags, save form Make sure you get no notices/exceptions PS:- There is an un related error in master MDL-44398 Test 2 Backup a course with user data and restore it as a new course. Make sure no error related to this issue is seen.
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45258-master

      Description

      1. Edit a tag
      2. Add some related tags
      3. Save
        Following error is generated

        Debug info: Objects are are not allowed: context_system
        Error code: codingerror
        Stack trace:
         
            line 782 of /lib/dml/moodle_database.php: coding_exception thrown
            line 592 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->detect_objects()
            line 914 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->normalise_value()
            line 1015 of /tag/lib.php: call to pgsql_native_moodle_database->insert_record()
            line 168 of /tag/lib.php: call to tag_assign()
            line 139 of /tag/edit.php: call to tag_set()
         
        Output buffer: <pre class="notifytiny">stdClass Object ( [tagid] =&gt; 9 [component] =&gt; core [itemid] =&gt; 3 [itemtype] =&gt; tag [contextid] =&gt; context_system Object ( [_id:protected] =&gt; 1 [_contextlevel:protected] =&gt; 10 [_instanceid:protected] =&gt; 0 [_path:protected] =&gt; /1 [_depth:protected] =&gt; 1 ) [ordering] =&gt; 0 [timecreated] =&gt; 1398329305 [timemodified] =&gt; 1398329305 [tiuserid] =&gt; 0 ) </pre>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ankit_frenz Ankit Agarwal
              Reporter:
              ankit_frenz Ankit Agarwal
              Peer reviewer:
              Marina Glancy
              Integrator:
              Marina Glancy
              Tester:
              Frédéric Massart
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14