Wiki macros , ui extensions and panels are prepared at init , but if one is using a wiki macro use another wiki macro that happen to not be initialized after yet, a warning similar to the following might be produced:
{noformat} 2023-10-30 13:58:47,560 [XWiki initialization] WARN .x.r.i.t.m.MacroTransformation - Failed to get the macro with identifier [wikis] for syntax [XWiki 2.0] (this macro block won't be prepared): MacroNotFoundException: No macro [wikis/xwiki/2.0] could be found. {noformat}
The reason is that in this case the macro "wikis" was not yet initialized when the other macro was prepared.
A possible way to fix this would be to prepare a wiki macro , ui extension or panel content the first time it's executed instead of at init. I will also speed up the init and lower the memory used by wiki components which are never used.
It also shows that we might want to invalidate the various cached prepared contents when a macro is registered/unregistered. |
|