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

"Cannot read properties of null" error when using Atto editor

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Courses > Add a new course in site administration
      3. Open browser developer console
      4. Enter some text in Course summary field
      5. Select the entered text
      6. Open Paragraph styles menu from editor toolbar
      7. Press Heading (large)
      8. Confirm there is no error in the browser console
      9. Confirm large heading style is applied to text
      Show
      Log in as admin Navigate to Courses > Add a new course in site administration Open browser developer console Enter some text in Course summary field Select the entered text Open Paragraph styles menu from editor toolbar Press Heading (large) Confirm there is no error in the browser console Confirm large heading style is applied to text

      Whilst peer-reviewing another issue todo with the Atto editor (MDL-69292), I encountered another error when using the Atto editor. It only affects Moodle 4.0 onwards.

      The issue is easy to reproduce. 

      1. Log in to a Moodle 4.0+ instance as admin or teacher
      2. Click on a course
      3. Turn Edit mode on
      4. Click on Add an activity or resource
      5. Choose Page
      6. Use the Atto editor (text editor)
      7. Open up your browser's console
      8. Click on the text/font dropdown in the editor (A symbol) and choose a style
      9. You will see an error similar to TypeError: Cannot read properties of null. See attached screenshot.

      This is not isolated to the Atto editor in the above instructions, it seems to be an error present on all Atto editors and is the same on all the major browsers (Chrome, Edge, Firefox and Safari).

      This does not seems to impact performance and seems benign, but further investigation may reveal what is causing it and any negative impact.

            pholden Paul Holden
            david.woloszyn@moodle.com David Woloszyn
            David Woloszyn David Woloszyn
            Huong Nguyen Huong Nguyen
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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