Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-53469

Insert JIRA Macro - Timeout while getting placeholder, Rendering this content exceeded the timeout of 5 seconds

      Information

      This issue has been resolved by reinstating the system property of confluence.macro.placeholder.timeoutMillis

      For versions of confluence:

      • 6.5.3 to (not including) 6.6.0
      • 6.6.1 to (not including) 6.14.0
      • 7.13.19 to (not including) 7.14.0
      • 7.19.11 to (not including) 7.20.0
      • 8.4.0 and newer

      Please use the confluence.macro.placeholder.timeoutMillis system property to increase the timeout of the placeholder.

      For other versions not mentioned above, please use the workarounds provided in the the issue below

      Summary

      When using JIRA macro (with Total issue count selected in the Display options), displays Error 'Timeout while getting placeholder. Please try again shortly.'  when inserting the macro and the Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds." even if confluence.macro.placeholder.timeoutMillis is set.

      Steps to reproduce

      1. Create a page and Insert JIRA issue macro
      2. Use JQL similar to project=confserver and issuetype="bug" and status was Open after -5d (note: This JQL took 7.5 seconds to return data from JAC)
      3. Select Total Issue count from the Display options drop down in JIRA issues macro
      4. Insert the Macro 
      5. After 5 seconds, Editor throws an error "Timeout while getting placeholder, Please try again shortly", Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds.
      6. Set the system property value to change the default timeout from 5 seconds to much higher value (It was set to 10 seconds for this test)
      7. CATALINA_OPTS="-Dconfluence.macro.placeholder.timeoutMillis=<value> ${CATALINA_OPTS}"
      8. Restart Confluence
      9. Repeat steps 1 to 4
      10. The page Editor still throws the same error "Timeout while getting placeholder, Please try again shortly"

      Expected Results

      JIRA Macro should get inserted in the page without any errors

      Actual Results

      The editor Errors out as  'Timeout while getting placeholder. Please try again shortly.'  

      It is observed the placeholder timeout value in the Javascript doesn't respect the confluence.macro.placeholder.timeoutMillis parameter and it defaults to 5 seconds.

      Workaround

      No workaround for Confluence older than 6.5.3 or 6.6.1

      For newer versions as stated above, setting the confluence.macro.placeholder.timeoutMillis to a higher value e.g. 10000 will override the timeout.

       Workaround for Affected versions 7.x and greater

      Option 1

      Recommended approach
       # Edit page with placeholder issue.

      1. Click on the Source editor Icon <> to display the page's XHTML content.
      2. Locate the block of XHTML that represents the macro:
        • <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
              <ac:parameter ac:name="server">Jira</ac:parameter>
              <ac:parameter ac:name="jqlQuery">project = "MARS"  </ac:parameter>
              <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
            </ac:structured-macro>
          
      3. Add the following line into the list of parameters nested within the structured-macro tags:
        #*
        <ac:parameter ac:name="count">true</ac:parameter>
        
      4. Example:
        • <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
              <ac:parameter ac:name="server">Jira</ac:parameter>
              <ac:parameter ac:name="jqlQuery">project = "MARS"  </ac:parameter>
              <ac:parameter ac:name="count">true</ac:parameter>
              <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
            </ac:structured-macro>
          
      5. Save this and the page, then check if the Issue Count displays.

      Option 2

      This option is more involved via the JAR file but doesn't require users to update the macro every time.
      There are different JAR files depending on the Confluence major version.

      • Confluence version 7: confluence-editor-v4-<version>.jar AND editor.js file.
      • Confluence version 8: com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar AND core.js file.

      Resources

      The resource to manipulate JAR files: How to edit files in Confluence JAR files.

      Steps

      Example for Confluence version 8.2.3.

      1. Navigate /Users/mmadrid/confluence/atlassian-confluence-8.2.3/confluence/WEB-INF/atlassian-bundled-plugins
      2. Find com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar
      3. Create a directory and copy JAR file to it.
        1. mkdir testJar ; cp com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar ./testJar ; cd testJar
      4. Extract JAR
        1. jar xf com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar
      5. Open core.js in editor.
        1. vi core.js
      6. Find Editor.UI.setButtonsState
        • Note that the first part of this code "g.a." will be different per version of Confluence. use "Editor.UI.setButtonsState" earlier in the code to determine the right letters to use.
        1. Returned r.a.Editor.UI.setButtonsState
      7. Find DEFAULT_INSERT_MACRO_TIMEOUT
        1. Returned: {{var Xt=
          Unknown macro: {DEFAULT_INSERT_MACRO_TIMEOUT}}
      8. Modify above with colon and code letters and Meta.get("macro-placeholder-timeout")
        • To :r.a.Meta.get("macro-placeholder-timeout")
      9. Add new code to core.js
        1. From var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:5e3
        2. To var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout")
      10. Insert back in correct path, Example
        • setButtonsState(!0)}),a.promise()}var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout"),insertMacro
          
      11. Compress JAR after corrections. jar uvf <JAR file> <path to edited file>
        • (base) GLQC6P379N:testJar mmadrid$ jar uvf com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar core.js
          adding: core.js(in = 416369) (out= 128888)(deflated 69%)
          
      12. Mark original JAR as default.
        • mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig
          
      13. Move default to new directory.
        •  mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig testJar/
          
      14. Move modifed JAR to atlassian-bundled-plugins directory.
        • mv ./testJar/com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar . 
          
      15. Restart Confluence.

            [CONFSERVER-53469] Insert JIRA Macro - Timeout while getting placeholder, Rendering this content exceeded the timeout of 5 seconds

            Renata Dornelas made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 533455 ]

            A fix for this issue is available in Confluence Server and Data Center 7.13.19.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Mahesh Swami added a comment - A fix for this issue is available in Confluence Server and Data Center 7.13.19. Upgrade now or check out the Release Notes to see what other issues are resolved.

            A fix for this issue is available in Confluence Server and Data Center 7.19.11.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Server and Data Center 7.19.11. Upgrade now or check out the Release Notes to see what other issues are resolved.
            Edward made changes -
            Description Original: h4. Summary

            When using JIRA macro (with Total issue count selected in the Display options), displays Error 'Timeout while getting placeholder. Please try again shortly.'  when inserting the macro and the Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds." even if {{confluence.macro.placeholder.timeoutMillis}} is set.
            h4. Steps to reproduce
             # Create a page and Insert JIRA issue macro
             # Use JQL similar to {{project=confserver and issuetype="bug" and status was Open after -5d}} (note: This JQL took 7.5 seconds to return data from JAC)
             # Select Total Issue count from the Display options drop down in JIRA issues macro
             # Insert the Macro 
             # After 5 seconds, Editor throws an error "Timeout while getting placeholder, Please try again shortly", Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds.
             # Set the system property value to change the default timeout from 5 seconds to much higher value (It was set to 10 seconds for this test)
             # *CATALINA_OPTS="-Dconfluence.macro.placeholder.timeoutMillis=<value> ${CATALINA_OPTS}"*
             # Restart Confluence
             # Repeat steps 1 to 4
             # The page Editor still throws the same error "Timeout while getting placeholder, Please try again shortly"

            h4. Expected Results

            JIRA Macro should get inserted in the page without any errors
            h4. Actual Results

            The editor Errors out as  'Timeout while getting placeholder. Please try again shortly.'  

            It is observed the placeholder timeout value in the Javascript doesn't respect the confluence.macro.placeholder.timeoutMillis parameter and it defaults to 5 seconds.
            h4. Workaround

            No workaround for Confluence older than 6.5.3 or 6.6.1

            For newer versions, setting the {{confluence.macro.placeholder.timeoutMillis}} to a higher value e.g. 10000 will override the timeout.

            Need a fix or a workaround to allow Javascript macro placeholder timeout value to be increased.
            h4.  Workaround for Confluence 7 and 8
            h4. {color:#4C9AFF}Option 1{color}
            *Recommended approach*
             # Edit page with placeholder issue.
            # Click on the [Source editor|https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?hosting=server&tab=overview] Icon {{<>}} to display the page's XHTML content.
             # Locate the block of XHTML that represents the macro:
            #* {code:java}
            <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
                <ac:parameter ac:name="server">Jira</ac:parameter>
                <ac:parameter ac:name="jqlQuery">project = "MARS" </ac:parameter>
                <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
              </ac:structured-macro>
            {code}
            # Add the following line into the list of parameters nested within the structured-macro tags:
            #*{code:java}
            <ac:parameter ac:name="count">true</ac:parameter>
            {code}
            # Example:
            #* {code:java}
            <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
                <ac:parameter ac:name="server">Jira</ac:parameter>
                <ac:parameter ac:name="jqlQuery">project = "MARS" </ac:parameter>
                <ac:parameter ac:name="count">true</ac:parameter>
                <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
              </ac:structured-macro>
            {code}
            # Save this and the page, then check if the Issue Count displays.

            h4. {color:#4C9AFF}Option 2{color}
            This option is more involved via the JAR file but doesn't require users to update the macro every time.
            (i) There are different JAR files depending on the Confluence major version.
            * Confluence version 7: {{confluence-editor-v4-<version>.jar}} AND {{editor.js}} file.
            * Confluence version 8: {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}} AND {{core.js}} file.

            h4. {color:#4c9aff}Resources{color}
            The resource to manipulate JAR files: [How to edit files in Confluence JAR files|https://confluence.atlassian.com/confkb/how-to-edit-files-in-confluence-jar-files-103711179.html].
            h4. {color:#4c9aff}Steps{color}
            (i) Example for Confluence version 8.2.3.
            # Navigate {{/Users/mmadrid/confluence/atlassian-confluence-8.2.3/confluence/WEB-INF/atlassian-bundled-plugins}}
            # Find {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}}
            # Create a directory and copy JAR file to it.
            ## mkdir testJar ; cp {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}} ./testJar ; cd testJar
            # Extract JAR
            ## jar xf {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}}
            # Open *core.js* in editor.
            ## vi core.js
            # Find *Editor.UI.setButtonsState*
            #* (i) Note that the first part of this code "g.a." will be different per version of Confluence. use "Editor.UI.setButtonsState" earlier in the code to determine the right letters to use.
            ## Returned {{r.a.Editor.UI.setButtonsState}}
            # Find *DEFAULT_INSERT_MACRO_TIMEOUT*
            ## Returned: {{var Xt=
            Unknown macro: \{DEFAULT_INSERT_MACRO_TIMEOUT}}
            # Modify above with *colon* and *code letters* and *Meta.get("macro-placeholder-timeout")*
            #* To *:r.a.Meta.get("macro-placeholder-timeout")*
            # Add new code to core.js
            ## From *var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:5e3*
            ## To *var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout")*
            # Insert back in correct path, Example
            #* {code:java}
            setButtonsState(!0)}),a.promise()}var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout"),insertMacro
            {code}
            # Compress JAR after corrections. jar uvf <JAR file> <path to edited file>
            #* {code:java}
            (base) GLQC6P379N:testJar mmadrid$ jar uvf com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar core.js
            adding: core.js(in = 416369) (out= 128888)(deflated 69%)
            {code}
            # Mark original JAR as default.
            #* {code:java}
            mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig
            {code}
            # Move default to new directory.
            #* {code:java}
             mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig testJar/
            {code}
            # Move modifed JAR to {{atlassian-bundled-plugins}} directory.
            #* {code:java}
            mv ./testJar/com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar .
            {code}
            # Restart Confluence.


            New: {panel:title=(i) Information|borderStyle=solid|borderColor=#4599e0|titleBGColor=#87bdeb|bgColor=#c9e1f6}
            This issue has been resolved by reinstating the system property of {{confluence.macro.placeholder.timeoutMillis}}

            For versions of confluence:
             * 6.5.3 to (not including) 6.6.0
             * 6.6.1 to (not including) 6.14.0
             * 7.13.19 to (not including) 7.14.0
             * 7.19.11 to (not including) 7.20.0
             * 8.4.0 and newer

            Please use the {{confluence.macro.placeholder.timeoutMillis}} system property to increase the timeout of the placeholder.

            For other versions not mentioned above, please use the workarounds provided in the the issue below
            {panel}

            h4. Summary

            When using JIRA macro (with Total issue count selected in the Display options), displays Error 'Timeout while getting placeholder. Please try again shortly.'  when inserting the macro and the Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds." even if {{confluence.macro.placeholder.timeoutMillis}} is set.
            h4. Steps to reproduce
             # Create a page and Insert JIRA issue macro
             # Use JQL similar to {{project=confserver and issuetype="bug" and status was Open after -5d}} (note: This JQL took 7.5 seconds to return data from JAC)
             # Select Total Issue count from the Display options drop down in JIRA issues macro
             # Insert the Macro 
             # After 5 seconds, Editor throws an error "Timeout while getting placeholder, Please try again shortly", Confluence logs logged the message "Rendering this content exceeded the timeout of 5 seconds.
             # Set the system property value to change the default timeout from 5 seconds to much higher value (It was set to 10 seconds for this test)
             # *CATALINA_OPTS="-Dconfluence.macro.placeholder.timeoutMillis=<value> ${CATALINA_OPTS}"*
             # Restart Confluence
             # Repeat steps 1 to 4
             # The page Editor still throws the same error "Timeout while getting placeholder, Please try again shortly"

            h4. Expected Results

            JIRA Macro should get inserted in the page without any errors
            h4. Actual Results

            The editor Errors out as  'Timeout while getting placeholder. Please try again shortly.'  

            It is observed the placeholder timeout value in the Javascript doesn't respect the confluence.macro.placeholder.timeoutMillis parameter and it defaults to 5 seconds.
            h4. Workaround

            No workaround for Confluence older than 6.5.3 or 6.6.1

            For newer versions as stated above, setting the {{confluence.macro.placeholder.timeoutMillis}} to a higher value e.g. 10000 will override the timeout.

            h4.  Workaround for Affected versions 7.x and greater
            h4. {color:#4C9AFF}Option 1{color}
            *Recommended approach*
             # Edit page with placeholder issue.
            # Click on the [Source editor|https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?hosting=server&tab=overview] Icon {{<>}} to display the page's XHTML content.
             # Locate the block of XHTML that represents the macro:
            #* {code:java}
            <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
                <ac:parameter ac:name="server">Jira</ac:parameter>
                <ac:parameter ac:name="jqlQuery">project = "MARS" </ac:parameter>
                <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
              </ac:structured-macro>
            {code}
            # Add the following line into the list of parameters nested within the structured-macro tags:
            #*{code:java}
            <ac:parameter ac:name="count">true</ac:parameter>
            {code}
            # Example:
            #* {code:java}
            <ac:structured-macro ac:macro-id="78f1bf71-283c-431a-a7ea-f6faf8db2cc1" ac:name="jira" ac:schema-version="1">
                <ac:parameter ac:name="server">Jira</ac:parameter>
                <ac:parameter ac:name="jqlQuery">project = "MARS" </ac:parameter>
                <ac:parameter ac:name="count">true</ac:parameter>
                <ac:parameter ac:name="serverId">f192aac9-bcb6-33f2-b5ba-70909652951a</ac:parameter>
              </ac:structured-macro>
            {code}
            # Save this and the page, then check if the Issue Count displays.

            h4. {color:#4C9AFF}Option 2{color}
            This option is more involved via the JAR file but doesn't require users to update the macro every time.
            (i) There are different JAR files depending on the Confluence major version.
            * Confluence version 7: {{confluence-editor-v4-<version>.jar}} AND {{editor.js}} file.
            * Confluence version 8: {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}} AND {{core.js}} file.

            h4. {color:#4c9aff}Resources{color}
            The resource to manipulate JAR files: [How to edit files in Confluence JAR files|https://confluence.atlassian.com/confkb/how-to-edit-files-in-confluence-jar-files-103711179.html].
            h4. {color:#4c9aff}Steps{color}
            (i) Example for Confluence version 8.2.3.
            # Navigate {{/Users/mmadrid/confluence/atlassian-confluence-8.2.3/confluence/WEB-INF/atlassian-bundled-plugins}}
            # Find {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}}
            # Create a directory and copy JAR file to it.
            ## mkdir testJar ; cp {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}} ./testJar ; cd testJar
            # Extract JAR
            ## jar xf {{com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar}}
            # Open *core.js* in editor.
            ## vi core.js
            # Find *Editor.UI.setButtonsState*
            #* (i) Note that the first part of this code "g.a." will be different per version of Confluence. use "Editor.UI.setButtonsState" earlier in the code to determine the right letters to use.
            ## Returned {{r.a.Editor.UI.setButtonsState}}
            # Find *DEFAULT_INSERT_MACRO_TIMEOUT*
            ## Returned: {{var Xt=
            Unknown macro: \{DEFAULT_INSERT_MACRO_TIMEOUT}}
            # Modify above with *colon* and *code letters* and *Meta.get("macro-placeholder-timeout")*
            #* To *:r.a.Meta.get("macro-placeholder-timeout")*
            # Add new code to core.js
            ## From *var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:5e3*
            ## To *var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout")*
            # Insert back in correct path, Example
            #* {code:java}
            setButtonsState(!0)}),a.promise()}var Xt={DEFAULT_INSERT_MACRO_TIMEOUT:r.a.Meta.get("macro-placeholder-timeout"),insertMacro
            {code}
            # Compress JAR after corrections. jar uvf <JAR file> <path to edited file>
            #* {code:java}
            (base) GLQC6P379N:testJar mmadrid$ jar uvf com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar core.js
            adding: core.js(in = 416369) (out= 128888)(deflated 69%)
            {code}
            # Mark original JAR as default.
            #* {code:java}
            mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig
            {code}
            # Move default to new directory.
            #* {code:java}
             mv com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar.orig testJar/
            {code}
            # Move modifed JAR to {{atlassian-bundled-plugins}} directory.
            #* {code:java}
            mv ./testJar/com.atlassian.confluence.plugins.confluence-editor-plugin-9.1.1.jar .
            {code}
            # Restart Confluence.


            A fix for this issue is available in Confluence Server and Data Center 8.4.0.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Server and Data Center 8.4.0. Upgrade now or check out the Release Notes to see what other issues are resolved.
            James Whitehead made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            Support reference count Original: 73 New: 74
            SET Analytics Bot made changes -
            UIS Original: 46 New: 47
            James Ponting made changes -
            Link New: This issue is resolved by CONFSRVDEV-27115 [ CONFSRVDEV-27115 ]
            SET Analytics Bot made changes -
            UIS Original: 58 New: 46

              ephillips@atlassian.com Edward
              pyarakala Praveen Yarakala (Inactive)
              Affected customers:
              34 This affects my team
              Watchers:
              61 Start watching this issue

                Created:
                Updated:
                Resolved: