Problem with glossary application

Hello everybody,

I’m testing the glossary application developed by Sarthak Gupta. This application is generally outstanding.
But it does not work out of the box.

I’v installed the application as described (e.g. xwiki.properties adjusted…) and set the rights of users and pages correctly (I hope so).

The problem is that only the admin of the wiki (who has installed the app) can see the content. All other users get the following error message: 2019-02-27%2010_09_43-Glossary%20-%20XWiki

I’ve reinstalled the application and saw the following error message:

Incomplete macro definition in [Object home:Glossary.WebHome^XWiki.WikiMacroClass[0]], macro code is empty
class org.xwiki.rendering.macro.wikibridge.WikiMacroException: Incomplete macro definition in [Object home:Glossary.WebHome^XWiki.WikiMacroClass[0]], macro code is empty
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroFactory.checkMacroCode(DefaultWikiMacroFactory.java:223)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroFactory.buildMacro(DefaultWikiMacroFactory.java:162)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroFactory.createWikiMacro(DefaultWikiMacroFactory.java:107)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroInitializer.registerMacro(DefaultWikiMacroInitializer.java:220)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroInitializer.registerMacrosForWiki(DefaultWikiMacroInitializer.java:184)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroInitializer.registerExistingWikiMacros(DefaultWikiMacroInitializer.java:146)
at org.xwiki.rendering.wikimacro.internal.DefaultWikiMacroInitializer.registerExistingWikiMacros(DefaultWikiMacroInitializer.java:115)
at org.xwiki.rendering.wikimacro.internal.RegisterMacrosOnImportListener.onEvent(RegisterMacrosOnImportListener.java:103)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:309)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:274)
at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:193)
at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:157)
at org.xwiki.extension.xar.internal.handler.packager.Packager.importXAR(Packager.java:145)
at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.installInternal(XarExtensionHandler.java:201)
at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:166)
at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:85)
at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:306)
at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:209)
at org.xwiki.extension.job.internal.AbstractExtensionJob.applyActions(AbstractExtensionJob.java:157)
at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:154)
at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

At the moment I’m thankful for every advice. I don’t know whether it’s a general XWiki config problem or an application problem…

Thank you very much!

Hi @Thomas_Nett I just checked and the glossary macro is badly coded and it has a bug. By default it sets the visibility to “current user” so that only the current user can see the macro, see https://github.com/xwiki-contrib/application-glossary/blob/master/application-glossary-ui/src/main/resources/Glossary/Code/GlossaryMacro.xml#L206

Could you open a jira for the glossary macro project on jira.xwiki.org (at https://jira.xwiki.org/projects/GLOSSARY/summary )?

Thanks

As a workaround, you just need to edit the macro page and change the visibility.

Hi Vincent, thanks for your input. The workaround does not work for me yet. I will test it on a new installation.
I’ve created an issue: https://jira.xwiki.org/browse/GLOSSARY-10

Hi Vincent,

thanks for your fixes in version 0.3.

I’ve updated the glossary app in Extension Manager. While installing I got the following warning:

Failed to install optional dependency [[org.xwiki.platform:xwiki-platform-rendering-macro-velocity-[10.11.2]](http://testwiki/xwiki/bin/admin/XWiki/XWikiPreferences?section=XWiki.Extensions&search=glossary&repo=&extensionId=org.xwiki.platform%3Axwiki-platform-rendering-macro-velocity&extensionVersion=%5B10.11.2%5D&extensionNamespace=wiki%3Axwiki)] with error:
InstallException: Dependency [org.xwiki.platform:xwiki-platform-rendering-macro-velocity-[10.11.2]] is not compatible with core extension feature [org.xwiki.platform:xwiki-platform-rendering-macro-velocity/11.1] ([org.xwiki.platform:xwiki-platform-rendering-macro-velocity/11.1])

What does that mean? I’m running XWiki 10.11.2 at the moment.

Could you check what version of this extension you have installed in your wiki?

Velocity Macro and Velocity API are installed in version 11.1.
I don’t understand why…

Nevertheless the glossary application seems to work correctly :slight_smile:
Will there be any improvements in the future as you wrote it is “badly coded”?

I refactored and fixed the “badly” coded places. Actually, this word is a bit too strong. Originally I had an old version locally and thought I was on the last version… Then I realized I was missing a lot of improvements of it so it’s not as bad as I initially thought.

Now this extension is NOT supported by the XWiki Dev team. It was coded by Sarthak, one GSOCer who’s not been active for a long time now. So this extension is waiting for some love from someone to continue improving it. I did some quick changes to make it usable but I’m not sure I’ll have the time to improve it much over that.

OTOH it’s a nice extension. It would be great if someone could spend time to improve it even further.

FTR I added 2 small improvements as part of the refactorings:

  • Support for nested pages (ie you can have glossary entries in nested pages now)
  • Ability to put Glossary pages anywhere in the wiki
1 Like