NPE in Sitestats if lessons is not added to site
Description
Attachments
Activity

Derek Ramsey May 9, 2018 at 8:01 AM
Verified on Sakai nightly 13
Created a new site that included Site Stats, but not Lessons. Selecting the Statistics tool did not display a stack trace.

Matthew Jones May 1, 2018 at 2:57 PM
Hi . For that you'd have to look at the server logs. If you're testing on nightly there will be a link to the logs for every server.
You basically go all the way to the bottom of the logs (you can hit refresh) and if there was a problem it would have something that looks like the following that shows every link of code tracing back to the problem. If that isn't present at the bottom that's fine. There might be something in the logs earlier or later but that's probably a different issue.

DeekshaSudini May 1, 2018 at 11:01 AM
I couldn't able to understand the last line in the test plan can someone help me out with that.

Miguel Pellicer April 26, 2018 at 10:08 AM
I've raised a PR, thanks for reporting the issue.

Matthew Jones April 26, 2018 at 9:59 AMEdited
Yeah there was already a jira request for disabling it on
It looks like this is a regression from SAK-32104
If you create a site without the Lessons tool, sitestats throwns this NPE.
I believe this is because getSitePages returns a null when the site doesn't have lessons.
Even though this doesn't seem to cause a user facing error, this should be caught to avoid the stack trace in the logs.