Skip to main content
Skip table of contents

Macro editor not loading / macro parameter containing "%"

If you are using PocketQuery macros with parameter values, that contain the percentage sign ("%"), that were created with a PocketQuery version earlier than 3.4.1, you might face issues after updating to 3.4.1 or higher.

Preconditions

  • The PocketQuery macro was last edited using PocketQuery 3.4.0 or earlier.

  • At least one of the parameter values set for the macro contain the percentage sign (%).

  • Later an update to PocketQuery 3.4.1 or higher was performed.

Resulting Issue

  • Rendering the macro works fine, the pages are displayed as usual.

  • When trying to edit the macro settings, the macro editor loads endlessly.

Explanation

With PocketQuery 3.4.1 we included an encoding change to fix some known issues. Unfortunatly, this leads to problems in cases where the percentage sign was used in parameter values. We did not attempt to migrate the old content, as this would have meant an automated page content change on all of our customers' systems and we decided this was too risky. The percentage sign is only rarely used in parameter values.

Solution

  • Edit the page with the affected macros.

  • Use the source code editor on the top right to enter the source code mode. (This functionality might be restricted to certain user groups or Confluence administrators.)

  • If you do not see the button, please install this plugin.

  • Look for the affected PocketQuery macro, it should look something like that:

CODE
<ac:structured-macro ac:macro-id="12345678-1a23-45b6-7c89-12345678" ac:name="pocketquery" ac:schema-version="1">
    <ac:parameter ac:name="name">MyMacro</ac:parameter>
    <ac:parameter ac:name="parameters">dateFormat=%Y-%m-%d</ac:parameter>
</ac:structured-macro>
  • Replace all occurences of "%" within the <ac:parameter ac:name="parameters"> section with "%25"

CODE
<ac:structured-macro ac:macro-id="12345678-1a23-45b6-7c89-12345678" ac:name="pocketquery" ac:schema-version="1">
    <ac:parameter ac:name="name">MyMacro</ac:parameter>
    <ac:parameter ac:name="parameters">dateFormat=%25Y-%25m-%25d</ac:parameter>
</ac:structured-macro>
  • Click "apply" to leave the source code editor and apply the changes.

  • Now you should be able to edit the macro again.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.