Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33892

NPE creating site with LTI tool and tools that take extra parameters during setup

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 12.0, 19.0, 20.0 [Tentative]
    • Fix Version/s: 20.0 [Tentative]
    • Component/s: Worksite Setup
    • Labels:
      None
    • Test Plan:
      Hide
      1. As admin add LTI tool available to all sites in Administration Workspace External Tools
        1. Make sure the option "Allow the tool to be launched as a link (this is typically true for most tools)" is checked for latest version of Sakai so it appears selectable
        2. All of the other options can be anything it just needs required fields
        3. Look at this for info about better LTI testing. https://github.com/sakaiproject/sakai/blob/master/basiclti/basiclti-docs/resources/docs/BLTI_TestPlan.xls
      2. Create a new site with Worksite Setup. Get to the adding tools, and select "Web content" and that LTI tool you created (in external tools)
      3. Put in an invalid URL for the web content (Just click continue the default is invalid)
      4. Add a valid URL
      5. Continue through the workflow

      Expected: Site gets created goes to next page and site has the LTI tool placed.

      Actual: No error message to user, stack trace in logs, site never gets created correctly

      Show
      As admin add LTI tool available to all sites in Administration Workspace External Tools Make sure the option "Allow the tool to be launched as a link (this is typically true for most tools)" is checked for latest version of Sakai so it appears selectable All of the other options can be anything it just needs required fields Look at this for info about better LTI testing.  https://github.com/sakaiproject/sakai/blob/master/basiclti/basiclti-docs/resources/docs/BLTI_TestPlan.xls Create a new site with Worksite Setup. Get to the adding tools, and select "Web content" and that LTI tool you created (in external tools) Put in an invalid URL for the web content (Just click continue the default is invalid) Add a valid URL Continue through the workflow Expected: Site gets created goes to next page and site has the LTI tool placed. Actual: No error message to user, stack trace in logs, site never gets created correctly

      Description

      It appears there's a regression from SAK-32360 somehow.

      So what happens is if you create a site with an LTI tool and a tool that requires additional information (like Web Content) but you fail the validation for the tool, it leaves the page in a state that you cannot progress and there's a stack trace.

      Caused by: java.lang.NullPointerException
      	at org.sakaiproject.site.tool.SiteAction.updateSelectedExternalToolList(SiteAction.java:12574)
      	at org.sakaiproject.site.tool.SiteAction.updateSelectedToolList(SiteAction.java:12552)
      	at org.sakaiproject.site.tool.SiteAction.doAdd_features(SiteAction.java:12409)
      	... 56 more
      

      This error is on the line

      				String[] contentToolModel=m_ltiService.getContentModel(Long.valueOf(ltiToolId), site.getId());
      

      I'm not sure if site or ltiToolId is null here. (I'd guess site?)

      Also after pressing back no tools are selected anymore, and Web Content isn't even in the list of selectable tools in the menu.

      See test plan for more details.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  jonespm Matthew Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code