Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
1.7
-
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
- Create a change request to any document in subwiki.
- Open this CR and go to "File changes" tab.
- Click on any line of diff to add comment. The discussion modal is opened.
- Add comment. If I click the "Cancel" button the outcome will be the same.
- Added comment doesn't appear.
- Reload the page.
Expected result
- 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