This issue has been created
 
 
Prism.js Macro / cid:jira-generated-image-avatar-4805ffed-8c38-4c13-b87c-5a38d6a6e3e2 XPRISMJS-13 Open

Uninstalling Prism.js Code Macro Replacement doesn't restore the standard Code Macro until XWiki is restarted

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-04ad74d2-355b-4d88-a39b-a52273ee8691 Vincent Massol created this issue on 20/Oct/26 16:21
 
Summary: Uninstalling Prism.js Code Macro Replacement doesn't restore the standard Code Macro until XWiki is restarted
Issue Type: cid:jira-generated-image-avatar-4805ffed-8c38-4c13-b87c-5a38d6a6e3e2 Bug
Affects Versions: 1.1
Assignee: Unassigned
Created: 20/Oct/26 16:21
Priority: cid:jira-generated-image-static-major-45fac0f3-2382-43c0-8c4e-827708e26acf Major
Reporter: Vincent Massol
Description:

Example of a Code Macro used below:

{{code language="python" title="My Title"}}
print("hi")
{{/code}}

Steps to reproduce, on XWiki 18.8.0:

  1. Install "Prism.js Code Macro Replacement" (org.xwiki.contrib.prismjs:prismjs-code).
  2. View a page holding the Code Macro above: it is rendered by the Prism.js Macro, as expected.
  3. Uninstall "Prism.js Code Macro Replacement" from the Extension Manager.
  4. View the same page again, or a page created after the uninstall.

Result: the Code Macro is still rendered by the Prism.js Macro (<code class="language-python">, no box, title ignored). The standard Code Macro is only back after restarting XWiki.

Expected: uninstalling the extension restores the standard Code Macro right away, without a restart.

The cause is probably not in this extension but in the Extension Manager / component manager: when an extension that overrides a core component (here the code macro component) is uninstalled, the original component doesn't seem to be registered again.

Found while documenting the extension (tested with 1.3-SNAPSHOT). Until fixed, the documentation says to restart XWiki after uninstalling.