Uploaded image for project: 'Change Request Application'
  1. Change Request Application
  2. CRAPP-277

Comments on diff don't work in subwiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 1.8
    • 1.7
    • discussion
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Comments on lines of the diff cause error in subwiki.

      This error is not reproducible in the main wiki.

      Steps to reproduce

      1. Create a change request to any document in subwiki.
      2. Open this CR and go to "File changes" tab.
      3. Click on any line of diff to add comment. The discussion modal is opened.
      4. Add comment. If I click the "Cancel" button the outcome will be the same.
      5. Added comment doesn't appear.
      6. Reload the page.

      Expected result

      1. The comment is added.

      Obtained result

      CR is broken with error:

      Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [sandbox:ChangeRequest.Code.ChangeRequestSheet]
       at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:289)
       at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
       at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:127)
       ... 191 more
      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getPageTitle' in  class  

      There is also an error in XWiki logs:

      ERROR o.a.v.d.null                   - Exception in macro #displayDiffBlockMetadata called at sandbox:ChangeRequest.Code.ChangeRequestDiscussion[line 58, column 1] 

      Workaround

      I changed the "Change Request Sheet" page and commented out this line:

      ##set ($diffBlockMetadata = $services.changerequest.discussion.getDiffBlockMetadata($changeRequestDiscussion.discussion)) 

      This modification helped and now I can add comments on diff. But I've found that comments appear only after page reload. In the main wiki comments appear automatically.

      Environment

      • Xwiki - 14.10.8
      • Change Request Application - 1.7

      Attachments

        Activity

          People

            surli Simon Urli
            amirov Dmitry Amirov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: