Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONF-23672

web-panels do not get upgraded after plugin upgrade

    Details

    • Last commented by user?:
      true

      Description

      I have a plugin that uses web panels (a vm file) in the Edit Dialog. When I upgrade the plugin, the old version of the template include in the panel is included/rendered

      The only way I have managed to get the new version of the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

      This is how the panel is defined:

      <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
          <resource name="view" type="velocity" location="templates/panel.vm"/>
      </web-panel>
      

      Steps to Reproduce

      • Install Plugin version 1.0
      • Go to any page, and edit it, you'll get an alert message, showing "Version 1.0", which is defined in the panel.vm file.
      • Install Plugin version 2.0 (the panel.vm file has been updated to include "Version 2.0")
      • Go to any page, and edit it, the alert message will still show "Version 1.0".
      • Restart server
      • Go to any page, and edit it, the alert message will finally show "Version 2.0".

        Attachments

        1. brokenpanels-1.0.jar
          5 kB
        2. brokenpanels-2.0.jar
          5 kB
        3. brokenpanels-src.zip
          5 kB
        4. screenshot-1.jpg
          screenshot-1.jpg
          9 kB

          Issue Links

            Activity

            rodogu Roberto Dominguez created issue -
            rodogu Roberto Dominguez made changes -
            Field Original Value New Value
            Attachment brokenpanels-1.0.jar [ 53893 ]
            rodogu Roberto Dominguez made changes -
            Attachment brokenpanels-2.0.jar [ 53894 ]
            rodogu Roberto Dominguez made changes -
            Attachment brokenpanels-src.zip [ 53895 ]
            rodogu Roberto Dominguez made changes -
            Attachment screenshot-1.jpg [ 53896 ]
            rodogu Roberto Dominguez made changes -
            Description I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template :(

            The only way I have managed to get the new version if the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will still show _"Version 2.0"_.
            I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template :(

            The only way I have managed to get the new version if the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_)
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will finally show _"Version 2.0"_.
            rodogu Roberto Dominguez made changes -
            Description I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template :(

            The only way I have managed to get the new version if the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_)
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will finally show _"Version 2.0"_.
            I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template include in the panel is included/rendered :(

            The only way I have managed to get the new version if the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_)
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will finally show _"Version 2.0"_.
            rodogu Roberto Dominguez made changes -
            Description I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template include in the panel is included/rendered :(

            The only way I have managed to get the new version if the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_)
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will finally show _"Version 2.0"_.
            I have a plugin that uses web panels (a {{vm}} file) in the Edit Dialog. When I upgrade the plugin, the old version of the template include in the panel is included/rendered :(

            The only way I have managed to get the new version of the template to get included/rendered is restarting the server. I've attached a couple of plugins to reproduce.

            This is how the panel is defined:
            {noformat}
            <web-panel key="brokenPanel" location="atl.editor" name="Broken panel in edit window">
                <resource name="view" type="velocity" location="templates/panel.vm"/>
            </web-panel>
            {noformat}

            *Steps to Reproduce*
            * Install Plugin version 1.0
            * Go to any page, and edit it, you'll get an alert message, showing _"Version 1.0"_, which is defined in the {{panel.vm}} file.
            * Install Plugin version 2.0 (the {{panel.vm}} file has been updated to include _"Version 2.0"_)
            * Go to any page, and edit it, the alert message will still show _"Version 1.0"_.
            * Restart server
            * Go to any page, and edit it, the alert message will finally show _"Version 2.0"_.
            rodogu Roberto Dominguez made changes -
            Link This issue is related to BAM-9660 [ BAM-9660 ]
            Hide
            rodogu Roberto Dominguez added a comment - - edited

            Note that similar issues have been submitted against bamboo, fisheye and jura

            Show
            rodogu Roberto Dominguez added a comment - - edited Note that similar issues have been submitted against bamboo, fisheye and jura
            rodogu Roberto Dominguez made changes -
            Link This issue is related to FE-2672 [ FE-2672 ]
            rodogu Roberto Dominguez made changes -
            Link This issue is related to JRA-25694 [ JRA-25694 ]
            Hide
            tanstett Tobias Anstett (K15t Software) added a comment -

            We also tried to workaround this issue by referencing different velocity files in different versions of our plugin, but without server restart (sometimes also deletion of transformed plugins) you will get a ResourceNotFoundException.

            Show
            tanstett Tobias Anstett (K15t Software) added a comment - We also tried to workaround this issue by referencing different velocity files in different versions of our plugin, but without server restart (sometimes also deletion of transformed plugins) you will get a ResourceNotFoundException.
            Hide
            rodogu Roberto Dominguez added a comment -

            Yeah, try that one already...

            So far the only thing I've found to deal with the issue is gracefully handling it, e.g.:

            try {
                $(".stuf").append(AJS.template.load("newtemplateinnewversion").fill());
            } catch (e) {
                alert("Ad hoc Workflows panel out of sync because of CONF-23672. Please restart server")
            }
            

            The issue has been there for a while... not sure when atlassian is going to look into it, so will probably make it more formal (i.e. storing a version number in the template and validating it).

            Show
            rodogu Roberto Dominguez added a comment - Yeah, try that one already... So far the only thing I've found to deal with the issue is gracefully handling it, e.g.: try { $(".stuf").append(AJS.template.load("newtemplateinnewversion").fill()); } catch (e) { alert("Ad hoc Workflows panel out of sync because of CONF-23672. Please restart server") } The issue has been there for a while... not sure when atlassian is going to look into it, so will probably make it more formal (i.e. storing a version number in the template and validating it).
            Hide
            skleinei Stefan Kleineikenscheidt (K15t Software) added a comment -

            Hey guys, seem I found a workaround. It's not nice, but seems to work http://www.k15t.com/display/~stefan/2011/10/30/Workaround+for+Web+Panels+on+Confluence+4

            Any feedback is highly appreciated.

            Show
            skleinei Stefan Kleineikenscheidt (K15t Software) added a comment - Hey guys, seem I found a workaround. It's not nice, but seems to work http://www.k15t.com/display/~stefan/2011/10/30/Workaround+for+Web+Panels+on+Confluence+4 Any feedback is highly appreciated.
            vchoy Vincent Choy [Atlassian] made changes -
            Status New [ 10034 ] Open [ 1 ]
            sruiz Seb Ruiz made changes -
            Link This issue is related to STASH-2324 [ STASH-2324 ]
            anton@atlassian.com Anton Mazkovoi [Atlassian] made changes -
            Link This issue is related to JRA-25450 [ JRA-25450 ]
            anton@atlassian.com Anton Mazkovoi [Atlassian] made changes -
            Link This issue is related to BAM-9630 [ BAM-9630 ]
            Hide
            lenzman Michael Stelzner [Communardo] added a comment -

            Hi Stefan,

            your code works for me (Confluence 4.1.6). But you should add

            Map<String, Object> defaultContext = MacroUtils.defaultVelocityContext();
            context.putAll(defaultContext);

            into getHtml to access i.e. webResourceManager.

            Michael

            Show
            lenzman Michael Stelzner [Communardo] added a comment - Hi Stefan, your code works for me (Confluence 4.1.6). But you should add Map<String, Object> defaultContext = MacroUtils.defaultVelocityContext(); context.putAll(defaultContext); into getHtml to access i.e. webResourceManager. Michael
            merickson Matthew Erickson [Atlassian] made changes -
            Remote Link This issue links to "Wiki Page (Extranet)" [ 22203 ]
            jclark@atlassian.com Joe Clark [Atlassian] made changes -
            Assignee Joseph Clark [Atlassian] [ jclark@atlassian.com ]
            Hide
            jclark@atlassian.com Joe Clark [Atlassian] added a comment -

            This was fixed in Confluence 4.3 (upgrade to Atlassian Template Renderer 1.4.0 -> 1.4.2).

            Gory details: https://ecosystem.atlassian.net/browse/ATR-35

            Show
            jclark@atlassian.com Joe Clark [Atlassian] added a comment - This was fixed in Confluence 4.3 (upgrade to Atlassian Template Renderer 1.4.0 -> 1.4.2). Gory details: https://ecosystem.atlassian.net/browse/ATR-35
            jclark@atlassian.com Joe Clark [Atlassian] made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Fix Version/s 4.3 [ 26037 ]
            Resolution Fixed [ 1 ]
            jclark@atlassian.com Joe Clark [Atlassian] made changes -
            Remote Link This issue links to "ATR-35 (Ecosystem)" [ 25591 ]
            jclark@atlassian.com Joe Clark [Atlassian] made changes -
            Link This issue is related to CONFDEV-9703 [ CONFDEV-9703 ]
            akazatchkov.adm Anatoli Kazatchkov [Administrative Account] made changes -
            Workflow Confluence Bug Workflow [ 351353 ] New Confluence Default Workflow [ 473368 ]
            mjensen Matthew Jensen [Atlassian] made changes -
            Remote Link This issue links to "Page (Pug - Confluence Dogfood)" [ 76961 ]
            mhrynczak Mark Hrynczak [Atlassian] made changes -
            Workflow New Confluence Default Workflow [ 473368 ] Confluence Cloud First Workflow [ 1108372 ]
            osanico Owen Sanico made changes -
            Workflow Confluence Cloud First Workflow [ 1108372 ] Confluence Cloud First Workflow v2 [ 1219877 ]
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Labels plugins
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Labels plugins plugin-framework plugins
            jturnquist Jonah Turnquist [Atlassian] made changes -
            Component/s Plugins [ 10580 ]
            osanico Owen Sanico made changes -
            Workflow Confluence Cloud First Workflow v2 [ 1219877 ] Confluence Cloud First Workflow TEMP [ 1346611 ]
            osanico Owen Sanico made changes -
            Workflow Confluence Cloud First Workflow TEMP [ 1346611 ] Confluence Workflow - Public Facing [ 1380612 ]

              People

              • Votes:
                9 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  3 years, 31 weeks, 3 days ago