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

Macro browser preview doesn't respect @RequiresFormat on macro execute method

    XMLWordPrintable

Details

    Description

      The @RequiresFormat annotation is used by the parseRichTextMacroBody() method in the StorageMacroV2Unmarshaller, to override the default behaviour of processing the macro body before calling the macro's execute() method.

      This is used by the cache macro (among others) to get an unprocessed copy of the macro body, and use a cached result rather than evaluating the macro body.

      This works fine for normal page rendering, but it doesn't work correctly when rendering macro previews in the macro editor. This is because the macro preview is done through a completely separate code path to the one which renders the macro normally – in MacroResource.generatePreview() in the editor plugin.

      We should make the behaviour of the MacroResource.generatePreview() method the same as the StorageMacroV2Unmarshaller with regard to the @RequiresFormat annotation.

      Attachments

        1. dev-screenshot-1.png
          dev-screenshot-1.png
          307 kB
        2. dev-screenshot-2.png
          dev-screenshot-2.png
          232 kB
        3. dev-screenshot-3.png
          dev-screenshot-3.png
          326 kB
        4. macropreview-error.png
          macropreview-error.png
          61 kB
        5. rendererror.zip
          132 kB
        6. Screen Shot 2014-01-15 at 1.37.25 PM.png
          Screen Shot 2014-01-15 at 1.37.25 PM.png
          79 kB
        7. Screen Shot 2014-01-15 at 1.37.41 PM.png
          Screen Shot 2014-01-15 at 1.37.41 PM.png
          68 kB
        8. Screen Shot 2014-01-15 at 1.47.15 PM.png
          Screen Shot 2014-01-15 at 1.47.15 PM.png
          115 kB
        9. Screen Shot 2014-08-12 at 11.59.13 AM.png
          Screen Shot 2014-08-12 at 11.59.13 AM.png
          150 kB
        10. Screen Shot 2014-08-12 at 12.00.03 PM.png
          Screen Shot 2014-08-12 at 12.00.03 PM.png
          407 kB
        11. Screen Shot 2014-08-12 at 2.08.29 PM.png
          Screen Shot 2014-08-12 at 2.08.29 PM.png
          102 kB
        12. Screen Shot 2014-08-12 at 2.08.41 PM.png
          Screen Shot 2014-08-12 at 2.08.41 PM.png
          125 kB
        13. Screen Shot 2014-08-15 at 00.53.15.png
          Screen Shot 2014-08-15 at 00.53.15.png
          16 kB
        14. test5098273494155537034.jar
          2 kB

        Issue Links

          Activity

            People

              vvo Vu Truong Vo (Inactive)
              matt@atlassian.com Matt Ryall
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: