Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
Unknown
-
Description
The application only records the logs produced while a page is rendered: PageLogsEventListener starts capturing on the document.progress.render progress step and ignores everything else. Warnings and errors logged while a page is saved are therefore never shown to the user, and the only place to see them is the server log, which most users can't access.
A concrete case is XWIKI-16792: when a user saves a wiki macro whose ID is already used by another macro, the new macro overrides the existing one, or is hidden by it, depending on the registration level. This is the expected component override behavior, but the user gets no feedback at all, and since wiki macros are created through the generic object editor there is no dedicated UI where a warning could be displayed. As suggested on that issue, displaying the logs of the page save in the page UI would cover this case and similar ones, such as other wiki components or UI extensions.
Proposal
- Also capture the logs produced while a document is saved, including the DocumentCreatedEvent and DocumentUpdatedEvent listeners, since this is where wiki macros and other wiki components get registered.
- Display them in the page UI next to the rendering logs, clearly distinguished, so that the user sees them after saving.
Note
For the XWIKI-16792 case this is not enough on its own: DefaultWikiComponentManager#registerWikiComponent currently replaces an already registered component without logging anything, so platform would also need to log a warning when a wiki component overrides an existing one.
Attachments
Issue Links
- relates to
-
XWIKI-16792 Duplicate macro ID not handled
-
- Open
-