Undefined portal variable not catched propertly in editor

Description

We have had an issue in our Evaluation System tool. When we use it in MyWorkspace, CKEditor doesn’t load because a javascript stacktrace is thrown.

Uncaught ReferenceError: portal is not defined

The reason is in ckeditor.launch.js file, where this code doesn’t catch propertly the undefined variable:

if (collectionId.startsWith('/user/') && portal && portal.siteId)

In the same file there are other places where the portal variable is checked, this is the way:

if (collectionId.startsWith('/user/') && typeof portal != 'undefined' && portal.siteId)

After this change everything keeps on working and our issue doesn’t happen anymore.

Activity

Show:

Automation for Jira September 26, 2023 at 12:12 PM

A pull request has been created, "SAK-49309 - Check undefined variable portal in CKEditor", you can see it at https://github.com/sakaiproject/sakai/pull/11945

Fixed

Details

Priority

Affects versions

Fix versions

23 Status

Please Merge

22 Status

Please Merge

Components

Assignee

Reporter

Created September 26, 2023 at 11:03 AM
Updated October 25, 2023 at 7:33 AM
Resolved October 9, 2023 at 4:41 PM