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

Tiny editor using unexpected autofill values in mod/data fields.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3.9, 4.5.1
    • MOODLE_403_STABLE, MOODLE_405_STABLE

      Setup:
      Create a new database activity instance with 2 fields - a "Title" short text field, and a "Description" text area field.
      Create a record (1) with text in both fields, and save.
      Create another record (2) with text only in the Title field - leave the Description field empty.

      Behaviour:
      Edit record (1) and keep editor open until an entry is saved to the "tiny_autosave" database table.
      (The tiny_autosave.elementid value will correspond to the input name of the Description field. Note that both the "pagehash" and "pageinstance" fields are blank for this record.)
      Click the cancel button.

      Edit record (2) - once the page has finished loading, the Description field is populated with the text from the Description field of record (1).

      Expected Behaviour:
      When editing record (2), the Description field should initially be empty.

      Details:
      I can see the tiny editor is using $PAGE->url for the pagehash, so I'm not sure yet why the pagehash and pageinstance are blank in come instances.
      The "edit" pages for mod/data records do have unique URLs for editing each record, e.g.
      /mod/data/edit.php?d=1&rid=1
      /mod/data/edit.php?d=1&rid=2

      Searching the tiny_autosave table for records with no values for pagehash or pageinstance, the problem may be wider-spread than the mod/data plugin.

            Unassigned Unassigned
            firsttimedev firsttimedev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m

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