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

Atto autosave: overwrites your content if an error occurs

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_28_STABLE
    • MDL-47140-master
    • Hide
      1. Create a user whose preferred text editor is "Atto HTML editor".
      2. Create a forum that the newly created user will have permission to post/reply in.
      3. With the newly created user, go to reply to a post or create a new post. Enter some text into the "Message" text field. Wait at least 60 seconds and close the tab or log out.
      4. Verify that the message was autosaved into the mdl_editor_atto_autosave table

        select * from mdl_editor_atto_autosave

      5. Change the mdl_editor_atto_autosave table to a different name.

        ALTER TABLE mdl_editor_atto_autosave RENAME TO mdl_dave

      6. Go back to the form that you typed the message in (i.e. the form where the draft was saved). Observe that there is no database error being dumped into that text area. Also observe that a notification informing the user that there was an error retrieving their draft is displayed.
      7. Check the javascript console to see the debug output (in this case, a 'table not found' error should be displayed).
      Show
      Create a user whose preferred text editor is "Atto HTML editor". Create a forum that the newly created user will have permission to post/reply in. With the newly created user, go to reply to a post or create a new post. Enter some text into the "Message" text field. Wait at least 60 seconds and close the tab or log out. Verify that the message was autosaved into the mdl_editor_atto_autosave table select * from mdl_editor_atto_autosave Change the mdl_editor_atto_autosave table to a different name. ALTER TABLE mdl_editor_atto_autosave RENAME TO mdl_dave Go back to the form that you typed the message in (i.e. the form where the draft was saved). Observe that there is no database error being dumped into that text area. Also observe that a notification informing the user that there was an error retrieving their draft is displayed. Check the javascript console to see the debug output (in this case, a 'table not found' error should be displayed).

      One easy if crude way to make an error is to temporarily rename the editor_atto_autosave table to something else.

      If you do this (or if you forget to go to the admin Notifications page after pulling the latest weekly from git, which was my mistake) then when you go to a form, the contents of all the Atto editors gets replaced by a JSON-encoded error message, overwriting your data.

      The system needs to me more error-tolerant than this.

            davecooper Dave Cooper
            timhunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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