Deeplinking fails with LTI 1.1 tools when the content returned by the tool doesn't include a title
Steps to reproduce:
Select a LIT 1.1 external tool and finish the tool's deep linking process returning a valid response with no title.
The following error is reported in the browser console:
helpers.js:89 Uncaught TypeError: Cannot read properties of undefined (reading 'name')
at G.handleContentItemResult (select_content_dialog.js:191:61)
at G.externalContentReadyHandler (select_content_dialog.js:59:25)
at G.ltiPostMessageHandler (select_content_dialog.js:142:27)
at a (helpers.js:73:23)
The "Link Resource from External tool" gets stuck with the message "Success! This popup should close on its own..."
Expected behavior:
The deep linking process should finish successfully. It does in LTI 1.3 version of the tool.
Actual behavior:
The content selection process fails.
Additional notes:
In the LTI1.1 version tool is undefined here, provoking the error:
Summary:
Deeplinking fails with LTI 1.1 tools when the content returned by the tool doesn't include a title
Steps to reproduce:
Select a LIT 1.1 external tool and finish the tool's deep linking process returning a valid response with no title.
The following error is reported in the browser console:
Expected behavior:
The deep linking process should finish successfully. It does in LTI 1.3 version of the tool.
Actual behavior:
The content selection process fails.
Additional notes:
In the LTI1.1 version
tool
is undefined here, provoking the error:https://github.com/instructure/canvas-lms/blob/f18139732c8d38b76968a064403ddf8b2c9fdd0e/ui/shared/select-content-dialog/jquery/select_content_dialog.js#L191