[Building Sakai] MSGCNTR-691

Zhen Qian zqian at umich.edu
Wed Oct 10 11:55:56 PDT 2012


Hi, all:

I have question about MSGCNTR-691: NPE caused Forum messages not searchable
under server-client search config

Stacktrace is included inside the ticket, and here is the related code:


  public boolean isRead(DiscussionTopic topic, DiscussionForum forum,
String userId){
      return isRead(topic, forum, userId, getContextId());
  }

....
  private String getContextId()
  {
    LOG.debug("getContextId()");
    if (TestUtil.isRunningTests())
    {
      return "test-context";
    }
    Placement placement = toolManager.getCurrentPlacement();
    String presentSiteId = placement.getContext();
    return presentSiteId;
  }

Notice when user did search inside Search tool,
toolManager.getCurrentPlacement() returns null value inside getContextId()
call.

I would suggest a change in the isRead() function: get the site id value
from DiscussionTopic object or Forum object, instead of calling
getContextId(). Can anyone show me the right way to do this?

Thanks,

- Zhen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121010/49931f45/attachment.html 


More information about the sakai-dev mailing list