Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21494

A wiki macro used by another wiki component can produce a preparation warning during XWiki initialization

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • Solved by XWIKI-21559.

    Description

      Wiki macros, ui extensions and panels are prepared at init, but if one is using a wiki macro that happen to not be initialized yet, a warning similar to the following might be produced:

      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.
      

      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 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.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: