Problem with user macros not loading in preview screen
Asked by RedundantLlamaStSt:

Hey guys,

i am using confluence in my workenvironment with my team and we have this odd problem with user macros.

We want a custom status macro with selectable statuses instead of typing in a status. I found an example code somewhere and used it. It works fine but after a while something happens and editing or setting up that macro isn't possible anymore since it just keeps loading in the preview screen.

When i update the user macro without any changes it works again. But somehow something happens after awhile and the same problem occures. every user has the same problem until i update it. After the update, everyone can use it again.

Does anyone know what the problem might be.

The code to the macro is:

## @param Status:title=Status\|type=enum\|required=true\|enumValues=BACKLOGGED,INPROGRESS,REVIEW,ONHOLD,DONE,DENIED\|desc=Test Case Status.  

#if ( $paramStatus == "BACKLOGGED" )  
#set ( $color = "Grey" )  

#elseif ( $paramStatus == "INPROGRESS" )  
#set ( $color = "Blue" )  

#elseif ( $paramStatus == "REVIEW" )  
#set ( $color = "Yellow" )  

#elseif ( $paramStatus == "ONHOLD" )  
#set ( $color = "Yellow" )  

#elseif ( $paramStatus == "DONE" )  
#set ( $color = "Green" )  

#elseif ( $paramStatus == "DENIED" )  
#set ( $color = "Red" )  

#else  
#set ( $color = "Grey" )  
#end  

\<ac:macro ac:name="status"\>  
\<ac:parameter ac:name="color"\>$color\</ac:parameter\>  
\<ac:parameter ac:name="title"\>$paramStatus\</ac:parameter\>  
\</ac:macro\>


Answers:
author: Badr Nazzal
body: I have the same problem with a similar macro. It used to work, but today I noticed that when attempting to edit the macro in the page editor all I get is this window. (Using Confluence 6.7.2)![project status macro.png](https://community.atlassian.com/t5/image/serverpage/image-id/35719iCD1B652BA8C16D37/image-size/large?v=v2&px=999 "project status macro.png")

comments: author: Marco Lindner
body: I have the same problem.

Any Solution for this ?


author: Orosz G?bor
body: I have the same experience, described here:

We have 4 user macros. Each of it works fine in elderly pages.

Since an undetermined time one (1) of our 4 user macros (a single user macro) cannot be inserted to a new page any more, while the other 3 user macros are working with no problem. 3 user macros can be inserted into newly created pages and perform as designed, but one.

The single user macro -- which suddenly stopped working and has the same setup as the other 3 well-performing user macros -- produces a the next symptomps:

1. Cannot be inserted with the {usermacroname typing method.  
2. Selecting with the macro browser, the windows of the macro pops up correctly, AND IN THE PREVIEW PANE PRODUCES THE DESIRED RESULT. The preview pane can be refreshed any number, with no problem. Meaning the code of the user macro works as desired. BUT WHEN the user try to insert the ready macro to the page with the "Insert" button, than the "Preview", "Save" and "Close" buttons of the Confluence page get unallowed, and the page stops working (hungs up).

Any suggestion?

Thanks!


author: Erik Uetz
body: I have run into this exact problem. I created a user macro, and the macro editor will eventually stop loading (choosing the macro only shows the spinner...none of the fields or preview shows). And just like the original poster, it starts working again after updating the macro without changes.

Any luck anyone?


author: Reinhard Piltz
body: Do you mean with the preview screen the macro browser?

From version 6.8 the problem is solved.

comments: author: LarsGroh NA
body: edit: wrong user


author: RedundantLlamaStSt
body: no not the browser itself, thatone works fine. i can brows and select any macro i want. Only when i select this user macro i made and insert it, the preview window where you put additional settings in, that one loads with no end. Same happens when i try to edit the inserted user macro

Like i said earlyer, when i update the user macro in the config, it works again- i can insert them and edit them with no problem. But i don't know when but at some proint it breaks again.


Tags: atl-dev

user-macro