gocodebox / gocodebox/lifterlms

Quill error in Course Builder with certain content

Open
#2,655 0 comments 0 reactions 1 assignee Claimed by @ideadude View on GitHub
Dominant language
PHP
Stars
212
Forks
140
Avg merge
2d 14h
Merged PRs (30d)
19

Description

### Reproduction Steps

1. Create a quiz on a Lesson, with certain content as a question (see HS-242192)
2. Create another question below it by typing in some content
3. Save changes in the course builder
4. Refresh the page
5. Open the quiz

### Expected Behavior

All questions load and can be edited

### Actual Behavior

Only the first question loads with an error in the Console

### Error Messages / Logs

```
quill.min.js?ver=1.3.5:7 Uncaught DOMException: Failed to execute 'splitText' on 'Text': The offset 64 is larger than the Text node's length.
at e.split (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:126820)
at t.isolate (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:72074)
at t.formatAt (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:71423)
at http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:49204
at t.forEachAt (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:118644)
at e.formatAt (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:49172)
at e.formatAt (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:124028)
at e.value (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:7729)
at http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:49204
at t.forEachAt (http://lifter2.test/wp-content/plugins/lifterlms/assets/vendor/quill/quill.min.js?ver=1.3.5:7:118644)
```

This issue has be recreated:
+ [ ] Locally
+ [ ] On a staging site
+ [ ] On a production website
+ [ ] With only LifterLMS and a default theme

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.