Uploaded image for project: 'Guided Tour'
  1. Guided Tour
  2. GUIDEDTOUR-11

isActive property type causes NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • None
    • None
    • Unknown

    Description

      On a fresh 18.3.0 instance, install the GuidedTour app (and disable the existing Tour app).

      When rendering the GuidedTour widget, an error message is shown. In the instance logs, this appears:

      2026-06-11 16:18:43,650 [qtp1025309396-253 - http://localhost:8090/xwiki/rest/guidedTour/tours] ERROR o.x.c.g.i.DefaultToursResource - Internal error: Tour API: retrieving all tours. 
      java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "org.apache.solr.common.SolrDocument.getFirstValue(String)" is null
          at wiki:xwiki//org.xwiki.contrib.guidedtour.internal.ToursManager.getAllTours(ToursManager.java:138)
          at wiki:xwiki//org.xwiki.contrib.guidedtour.internal.DefaultToursResource.lambda$getAvailableTours$0(DefaultToursResource.java:52)
          at wiki:xwiki//org.xwiki.contrib.guidedtour.internal.AbstractGuidedTourResource.execute(AbstractGuidedTourResource.java:74)
          at wiki:xwiki//org.xwiki.contrib.guidedtour.internal.DefaultToursResource.getAvailableTours(DefaultToursResource.java:51)
          at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

      The isActive property is stored as an int when importing the tour pages through the Extension Manager (they're not boolean properties as expected).

      Saving a task page and editing the isActive field will switch back to using a boolean field for the solr index, thus fixing the problem for that task.

       

       

      TourProperty.java could be changed like this:

      IS_ACTIVE("isActive", "int")

      Or the property could be forced to be boolean somehow in solr, idk how.

       

      The app used to work fine, I'm not sure what changed.

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            abrassat Brassat Alexandru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: