Hello, I am trying to find a macro I have listed on my XWikiSyntaxMacrosList
The problem is that I have no idea how to find it!
I am not sure how or where are macros stored, I assumed that by deleting the page of the macro, it would stop showing up on the pages of editing, but that’s not the case.
What is the best approach to find and delete an installed macro?
If XWikiSyntaxMacrosList doesn’t provide a link to the macro it’s because the macro is coded in java. You’ll need to use the Extension Manager to uninstall the extension contributing the macro (you’ll need to pay attention that it won’t remove other features you need. Right now there’s no easy way to just disable a single java macro).
Apparently, it was installed manually through a XAR import by one of our developers, and well, it is kind of botched so it does not show up on the import list nor on the extension manager. Super odd!
Is there any other way to ‘search’ for the macro i.e. using the database or similar approaches?
I just want to outright remove it but I have no idea where it lives.
It is a real mistery because if I search for the keyword “expand” on the search bar, I can only see the “expandable” macro but not this one called ‘expand’
ah maybe there are 2 macros having the same name in your wiki, one coming from a JAR and the other from a wiki page. I’ve checked the code and indeed we only display a single entry in the table in this case (something to fix probably). In any case only 1 macro can be enabled at a time.
No it looks good. Are you sure that the macro’s id is expand? You can try the search with another id corresponding to an existing wiki macro like property.XWiki.WikiMacroClass.id:notifications (it’s a wiki macro available by default) to see if it works. Maybe your solr index is broken.
No, the macro is not in the DB since it’s a java macro (and not a wiki macro), ie it’s not written in a wiki page (only wiki pages are in the DB). It’s likely coming from a JAR extension.
The problem is that we currently don’t have an api to know from which extension a macro is coming from. cc @tmortagne
Maybe search for “expand” in the Extension Manager to see if there’s an extension with that name installed
@vmassol , I was reading the thread you sent about ‘disabling’ a macro, I think the ‘easiest’ approach is going through that.
If I understand correctly, my XWiki.properties file should have:
#-# Overrides default macro categories (Each macro has default categories already defined, for example
#-# "Navigation" for the Table of Contents Macro).
#-# Note: the categories are case sensitive.
#-#
#-# Ex: To redefine the macro categories for the TOC macro so that it'd be in the "My Category" and "Deprecated"
#-# categories + redefine the category for the Script Macro to be "My Other Category", you'd use:
rendering.transformation.macro.categories = expand = Deprecated
rendering.transformation.macro.hiddenCategories = Deprecated