Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
4.5.4
-
None
-
None
-
Linux Debian
xwiki-xjetty-mariadb package
-
Unknown
-
Description
Wiki Diff failed with error: Cannot invoke method getDifferencesAsHTML() on null object.
This has been done in the following environment:
- XWiki 16.7.1
- Source URL: http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-flavor-common/16.7.1/xwiki-platform-distribution-flavor-common-16.7.1.xar
- Target URL: <empty> to compare to current wiki
The actual code failing is located in WikiDiffGroovy page.
The root cause of the issue seems to be the missing diff plugin.
Performing a research in javadoc let me believe that the plugin was removed starting with XWiki version 8.0:
- https://nexus.xwiki.org/nexus/service/local/repositories/public/archive/org/xwiki/platform/xwiki-platform-oldcore/7.4.6/xwiki-platform-oldcore-7.4.6-javadoc.jar/!/com/xpn/xwiki/plugin/diff/DiffPlugin.html exists
- https://nexus.xwiki.org/nexus/service/local/repositories/public/archive/org/xwiki/platform/xwiki-platform-oldcore/8.0/xwiki-platform-oldcore-8.0-javadoc.jar/!/com/xpn/xwiki/plugin/diff/DiffPlugin.html doesn't exist
A fix would probably be to use the Diff module but this doesn't seems trivial (at least to me with my current understanding of the legacy code and the features of the new module).