We are updating to 15.10.11. As I found in ReleaseNotes for 14.8RC1 there are new configurable hidden macros categories.
Therefor I looked into xwiki.properties:
#-# [Since 14.8RC1]
#-# Override the default hidden macro categories.
#-# Note: the categories are case sensitive.
#-#
#-# The default value is:
# rendering.transformation.macro.hiddenCategories = Internal,Deprecated
#-#
#-# For instance, to make the "Development" category hidden by default, in addition to the "Internal" and
#-# "Deprecated" categories, you'd use:
# rendering.transformation.macro.hiddenCategories = Development,Internal,Deprecated
What makes me wonder we have exactly this but macros with category Internal or Deprecated are nevertheless visible. Shouldn’t they be invisble as this is the default or should this be the default when I uncomment the “default line”?
Regards, Simpel
PS: Where to fill in e.g. Hidden category inside the object at Default category(?) (Standardkategorie in german) or Default categories (yet not translated)?
No need to uncomment, it’s the default. Could you provide a screenshot of where you see this?
I don’t understand this sentence. WDYM by “object”? This is configurable in xwiki.properties using the key rendering.transformation.macro.hiddenCategories.
Can’t provide a screenshot until wednesday, as this test wiki is company internal only. But I see Internal and/or Deprecated macros in the popup where I can pick the macros and see them in quick actions too. But if I understand correctly those should be hidden by default.
As I think about it I remember that looking inside macro class object at Default category (?) (Standardkategorie in german) it isn’t Internal and/or Deprecated but shown translated Intern and/or Veraltet. Maybe there is a bug?
It is configured through the default. When I open the macro class object then I see two inputs:
Default categories (yet not translated)
Default category (?) (Standardkategorie in german)
Where should I type my Internal and/or Deprecated category to set it invisible.
BTW this shows that some Macro is wrongly using a content category (instead of Content, or vice-versa, I’ll check which one is the good one), since it’s displayed twice. I’ll fix this.
My XWiki UI is in German but it’s strange that the Macro Dialog has English text a bit everywhere… And the Categories are not translated (several seem to be missing translations and they’re displayed in lower case I think).
I see no Internal nor Deprecated categories but I’ll check the code to see if the check is done on the translation.
The singular xproperty has been deprecated and removed, the xobject editor should probably show a warning about deprecated properties and you should clean it.
hmm OTOH, if you remove the defaultCategory then you loose the macro category. It just happened to me for the MathJax Macro… That’s not good, I thought we were supposed to have a migration, cc @mleduc
ah I think I know what’s happening, it seems that right now:
We list all macros in the Macro picker
We only list categories that are not hidden in the category selector
This means that Macros in hidden categories are listed when listing all macros (ie when no category is selected).
I think this was done voluntarily but indeed it can be seen as a bug especially when you want to use the hidden category config to prevent users from selecting macros!
The goal of this feature is to allow administrators and macro developers to limit the use of some macros by hiding them in the UI. Note that the goal is not to strictly disallow their use, and this is not a security feature. Knowledgeable user will still be capable to use any hidden macro by writing in xwiki syntax for instance.
The red one is deprecated? I should use the green one? How to type in more then one category? Should I split them with a space or a comma? How to type in a category including a space like “Not Installed”?
Btw: I can’t find the field for translating “Default categories” in weblate. Did I miss something or is it just not existing?