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

Autosave Error when editing a DB field with TinyMCE

    • MOODLE_405_STABLE
    • MDL-83772-main
    • Hide

      For manual tests please follow the steps in the description, use the two attached files for the setup.

      The change contains an additional behat test file with two scenarios. The first scenario is a simple edit test. The second scenario simulated the test description. Without the patch the last step should fail, the content "Some text is here" is present on the page in view mode.

      Show
      For manual tests please follow the steps in the description, use the two attached files for the setup. The change contains an additional behat test file with two scenarios. The first scenario is a simple edit test. The second scenario simulated the test description. Without the patch the last step should fail, the content "Some text is here" is present on the page in view mode.
    • Hide

      Code verified against automated checks.

      Checked MDL-83772 using repository: https://github.com/srobotta/moodle

      More information about this report

      Built on: Wed 20 Nov 2024 06:36:27 PM UTC

      Show
      Code verified against automated checks. Checked MDL-83772 using repository: https://github.com/srobotta/moodle main (0 errors / 0 warnings) [branch: MDL-83772-main | CI Job ] More information about this report Built on: Wed 20 Nov 2024 06:36:27 PM UTC

      When a text field is used in the database, due to autosave an empty field can be filled with the data from another previously edited field.

      Prerequisites:

      1. Create a new database activity.
      2. Use the attached preset and import the two entries from the attachment.

      Steps to reproduce

      1. As Admin go to the database activity.
      2. Edit the first entry. Click into the TinyMCE in the description field hit the enter button.
      3. In the sticky footer click on "Cancel" to discard the changes.
      4. In the list view, check that the second entry has an empty description field.
      5. Open the second entry in edit mode.
      6. After the page is loaded and TinyMCE is initialized, the description field is set with the value from the first entry.

      Expected outcome:

      when the TinyMCE is loaded with the data from the second entry, the field is empty as in view mode, because there is no description set for that entry.

            strobotta Stephan Robotta
            strobotta Stephan Robotta
            Luca Bösch Luca Bösch
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

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