-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.9.13
-
None
-
MOODLE_39_STABLE
There is an error in Timeline block when it tries to show a planned event if the course full name or the activity full name contain a backslash '\'.
Examples:
'Backslash \ chat name'
'Backslash \ course name'
When there is a backslash in the course name.
SyntaxError: Unexpected token in JSON at position 53
at JSON.parse (<anonymous>)
at Renderer.stringHelper (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:362:6773)
at Renderer.<anonymous> (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:362:8141)
at Writer.renderSection (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:8035)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6836)
at Writer.renderPartial (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:9198)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6995)
at Writer.renderSection (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:7634)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6836)
at Writer.renderPartial (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:9198)
When there is a backslash in the chat name.
SyntaxError: Unexpected token in JSON at position 22
at JSON.parse (<anonymous>)
at Renderer.stringHelper (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:362:6773)
at Renderer.<anonymous> (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:362:8141)
at Writer.renderSection (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:8035)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6836)
at Writer.renderPartial (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:9198)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6995)
at Writer.renderSection (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:7634)
at Writer.renderTokens (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:6836)
at Writer.renderPartial (https://communitymoodle39.p72.demo3.opentechnology.ru/lib/requirejs.php/1647854186/core/first.js:529:9198)
Steps:
(course case)
- Create a user.
- Make sure there is a visible timeline block in the user dashboard.
- Create a course with a backslash in its name (Backslash \ course name).
- Enrol the user on the course.
- Create a chat with no backslashes in its name in the course (Regular chat name).
- In the chat instance settings in "Chat session" section set "Next chat time" to tomorrow or the day after tomorrow.
- In the chat instance settings in "Chat session" section set "Repeat/publish session times" to "At the same time every week".
- Login as the user and navigate to the dashboard.
- Wait a little for AJAX requests to execute and the error to appear in modal.
(chat case)
- Create a user.
- Make sure there is a visible timeline block in the user dashboard.
- Create a course with no backslashes in its name (Regular course name).
- Enrol the user on the course.
- Create a chat with a backslash in its name in the course (Backslash \ chat name).
- In the chat instance settings in "Chat session" section set "Next chat time" to tomorrow or the day after tomorrow.
- In the chat instance settings in "Chat session" section set "Repeat/publish session times" to "At the same time every week".
- Login as the user and navigate to the dashboard.
- Wait a little for AJAX requests to execute and the error to appear in modal.
Seems related to https://tracker.moodle.org/browse/MDL-67640
- is a clone of
-
MDL-66820 Double escaped quotes in timeline block
-
- Closed
-