Page rendering incorrect macro?! Have to disable one macro to make another macro work

I have a strange thing happening whereby I edit a page to add a macro and after the page is saved, it tries to render a completely different macro. It doesn’t render it correctly, but some of its HTML from its template shows on the page which is the only clue that Confluence is getting confused somehow. These macros are both custom macros developed by our team.

The storage format of the page correctly shows the correct macro ac:name from the altassian-plugin.xml file, e.g.:

<xhtml-macro name=“roadmap-macro” …

… and the two different macros have different ac:names and ac:macro-ids. Nevertheless, I have to disable or uninstall the one it gets confused with in order to make the page render the correct macro.

I’ve tried clearing the plugin cache per the following instructions to no avail: https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html

I’m at my wit’s end trying to figure this out and there is nothing in the logs.

Any suggestions would be greatly appreciated.

Thanks

ALERT: This is due to a Confluence bug. Even though all resources in a plugin are namespaced and are loaded in their own classloader, this provides no comfort at least in regards to the name of the macro templates. So, make sure your templates have different unique names between your plugins.

Hi @alj,

Correct me if my understanding is incorrect; the macros you’re using, although maybe from different plugins, have the same name. If so, this is an existing issue and can be viewed here here.

Cheers!

Good find iragudo. Yes, you are correct. Both macro templates were named macro.vm. That Jira issue should not be low priority, but HIGH for obvious reasons.