PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-31740

As a site administrator I can check the status of propagation for for page / site templates and request propagation explicitly when necessary

    Details

    • Similar Issues:
      Show 5 results 

      Description

      The process to propagate changes from site or page templates has a mechanism to detect recurring problems and avoid trying to perform the propagation again and again in that situation.

      But there is no way currently for the site administrator to detect and fix the situation, where merge of a page / site template was skipped, because it failed too many times previously.

      The goal of this Story is to provide a UI that shows an indication of current merge fails for given layout / layout set and ideally possibility of request an propagation (resetting the internal count of failures to 0).

      1. Site Settings mockup.bmml
        6 kB
        Josef Šustáček
      2. Site Template mockup.bmml
        5 kB
        Josef Šustáček
      1. Capture.PNG
        72 kB
      2. Capture1.PNG
        91 kB
      3. Capture2.PNG
        90 kB
      4. page_template_1_before.png
        140 kB
      5. page_template_2_after.png
        144 kB
      6. site_template_1_before.png
        146 kB
      7. site_template_2_after.png
        147 kB
      8. site_template_3_after_failed.png
        148 kB
      9. Site Settings mockup.png
        41 kB
      10. Site Template mockup.png
        31 kB

        Issue Links

          Activity

          Hide
          Juan Fernández added a comment -

          Hi Josef:
          could you please:
          1) Launch and fix ant format-source
          2) rebase and resend
          3) list the steps to reproduce this so that QA can test
          4) Add two screenshots (before/after) so that PM can review
          Thanks a lot,
          Juan

          Show
          Juan Fernández added a comment - Hi Josef: could you please: 1) Launch and fix ant format-source 2) rebase and resend 3) list the steps to reproduce this so that QA can test 4) Add two screenshots (before/after) so that PM can review Thanks a lot, Juan
          Hide
          Josef Šustáček added a comment -

          Hi Juan,

          sure, I'll complete the steps a send to you i na while.

          Thanks,

          Josef

          Show
          Josef Šustáček added a comment - Hi Juan, sure, I'll complete the steps a send to you i na while. Thanks, Josef
          Hide
          Josef Šustáček added a comment -

          To test the displaying and Reset button, you have to fail some merges from site template. I'm sure there are many ways, this is what I've used for site templates testing:

          (1) start Tomcat bundle
          (2) create site based on template
          (3) change page (e.g move portlet)
          (4) reload the page in browser
          (5) merge changes from template using button under Dockbar
          (6) go to <tomcat>/temp/layou_set_prototype/, edit <uuid>.lar/manifest.xml (e.g. add some odd locale like '<header available-locales="bbb,ar_SA,...')
          (7) change page (e.g move portlet)
          (8) reload the page in browser
          (9) merge changes from template using button under Dockbar – since template wasn't changes since #5, altered LAR will be used and its import will fail on LocaleException
          (10) go to Site Template / <template> / Edit and you will see the Merge Failure Count risen and eventually (after its >= 3) warning box with Reset button will appear.

          I haven't figured out an easy manual test scenario for Page Template failures, during testing I've used altered LayoutImporter class, always throwing my custom exception when page was about to me merged.

          Show
          Josef Šustáček added a comment - To test the displaying and Reset button, you have to fail some merges from site template. I'm sure there are many ways, this is what I've used for site templates testing: (1) start Tomcat bundle (2) create site based on template (3) change page (e.g move portlet) (4) reload the page in browser (5) merge changes from template using button under Dockbar (6) go to <tomcat>/temp/layou_set_prototype/, edit <uuid>.lar/manifest.xml (e.g. add some odd locale like '<header available-locales="bbb,ar_SA,...') (7) change page (e.g move portlet) (8) reload the page in browser (9) merge changes from template using button under Dockbar – since template wasn't changes since #5, altered LAR will be used and its import will fail on LocaleException (10) go to Site Template / <template> / Edit and you will see the Merge Failure Count risen and eventually (after its >= 3) warning box with Reset button will appear. I haven't figured out an easy manual test scenario for Page Template failures, during testing I've used altered LayoutImporter class, always throwing my custom exception when page was about to me merged.
          Hide
          Jorge Ferrer added a comment -

          Hey Josef,

          I agree with the issue you mention. My only concern is that putting this in the form for the site the way you've done it will make it confusing for people creating or editing the site and not visible enough for those who care about the problem.

          One alternative I just thought of (so it might not be the best one either) is to show an smaller warning message next to the checkbox and text that says that the propagation is enabled. The text could just say "Disabled temporarily". This text would then be a link to a pop-up or an area that appears underneath which says something like "The propagation has been disabled temporarily after __ errors". Regarding the button to reset, I think it might be better to offer a button to force the propagation at that point in such a way so that we can show some more info about the error to the user.

          What do you think?

          Jorge

          Show
          Jorge Ferrer added a comment - Hey Josef, I agree with the issue you mention. My only concern is that putting this in the form for the site the way you've done it will make it confusing for people creating or editing the site and not visible enough for those who care about the problem. One alternative I just thought of (so it might not be the best one either) is to show an smaller warning message next to the checkbox and text that says that the propagation is enabled. The text could just say "Disabled temporarily". This text would then be a link to a pop-up or an area that appears underneath which says something like "The propagation has been disabled temporarily after __ errors". Regarding the button to reset, I think it might be better to offer a button to force the propagation at that point in such a way so that we can show some more info about the error to the user. What do you think? Jorge
          Hide
          Josef Šustáček added a comment -

          Hi Jorge,

          I agree that the described, smaller message is Site Settings makes sense. I've created a mock to show how I understand it.

          I've been thinking where to place the UI, whether to site administration itself, or the template administration. Both locations make sense to me, but template one a little bit more.

          (1) Instead of just forced propagation, I'd reset the counter and then invoke a regular merge using com.liferay.portlet.sites.util.SitesUtil.mergeLayoutSetProtypeLayouts() resp. com.liferay.portlet.sites.util.SitesUtil.mergeLayoutProtypeLayout(). Those methods have so much code around the actual merge (timestamps, fail counter, locking etc.) The the code in those methods would need to be refactored and new method created, which would do just the merge and throw exception in case of any error. Then we would propagate this exception to the user (site admin, who invoked Reset & Merge).

          (2) In case of Site Template, when site was changed, template is not applied any more, but Site Settings portlet does not indicate this (in comparison to Dockbar on the site, where you see the message of stopped propagation). Should the new warning message and Reset & Merge somehow reflect this (not being avaialble, or only with confirmation)?

          (3) Should I change the UI in Site Templates portlet and Page Templates portlets to be the same, smaller, as in Site Settings? I can imagine the counter being hidden, till the threshold is met. Then small warning saying "Propagation Disabled Temporarily" will show up, being a link to similar pop-up as in Site Settings. The forced merge here may be a little problematic, since there may be many sites linking the template. Should the template be pushed to all linked sites? I'd prefer to leave just the counter Reset here, then the template will be merged lazily. Also as said in #2, some site my be linked but changed, making the link inactive, so forced push of template should be up to the site admin, not the template admin.

          Thanks for your thoughts,

          Josef

          Show
          Josef Šustáček added a comment - Hi Jorge, I agree that the described, smaller message is Site Settings makes sense. I've created a mock to show how I understand it. I've been thinking where to place the UI, whether to site administration itself, or the template administration. Both locations make sense to me, but template one a little bit more. (1) Instead of just forced propagation, I'd reset the counter and then invoke a regular merge using com.liferay.portlet.sites.util.SitesUtil.mergeLayoutSetProtypeLayouts() resp. com.liferay.portlet.sites.util.SitesUtil.mergeLayoutProtypeLayout() . Those methods have so much code around the actual merge (timestamps, fail counter, locking etc.) The the code in those methods would need to be refactored and new method created, which would do just the merge and throw exception in case of any error. Then we would propagate this exception to the user (site admin, who invoked Reset & Merge). (2) In case of Site Template, when site was changed, template is not applied any more, but Site Settings portlet does not indicate this (in comparison to Dockbar on the site, where you see the message of stopped propagation). Should the new warning message and Reset & Merge somehow reflect this (not being avaialble, or only with confirmation)? (3) Should I change the UI in Site Templates portlet and Page Templates portlets to be the same, smaller, as in Site Settings? I can imagine the counter being hidden, till the threshold is met. Then small warning saying "Propagation Disabled Temporarily" will show up, being a link to similar pop-up as in Site Settings. The forced merge here may be a little problematic, since there may be many sites linking the template. Should the template be pushed to all linked sites? I'd prefer to leave just the counter Reset here, then the template will be merged lazily. Also as said in #2, some site my be linked but changed, making the link inactive, so forced push of template should be up to the site admin, not the template admin. Thanks for your thoughts, Josef
          Hide
          Josef Šustáček added a comment -

          Shows new Proposed UI in Site Settings portlet, as suggested by Jorge.

          Show
          Josef Šustáček added a comment - Shows new Proposed UI in Site Settings portlet, as suggested by Jorge.
          Hide
          Jorge Ferrer added a comment -

          Hey Josef,

          I think the mockups look very good. Please go ahead and implement it. Feel free to send me the pr for review once you are done.

          Show
          Jorge Ferrer added a comment - Hey Josef, I think the mockups look very good. Please go ahead and implement it. Feel free to send me the pr for review once you are done.
          Hide
          Robert Srisam-ang (Inactive) added a comment -

          PASSED Manual Testing following the steps below.

          1. Start Liferay and deploy the templates-breaker-portlet
          2. Create site based off template
          3. Add templates breaker portlet to site template page
          4. Move some portlets around on the page
          5. Click "Break Me" on the templates breaker portlet
          6. Navigate to Control panel and check page templates and site templates

          You will see the following screenshots (See attachments)

          Fixed on:
          Tomcat 7 + MySQL 5. Portal 6.2.x GIT ID: a5a80f983b76a15d8f86dc03897f8ad875874f5f.

          A site administrator can check the status of propagation for page/site templates and request propagation when necessary.

          Show
          Robert Srisam-ang (Inactive) added a comment - PASSED Manual Testing following the steps below. 1. Start Liferay and deploy the templates-breaker-portlet 2. Create site based off template 3. Add templates breaker portlet to site template page 4. Move some portlets around on the page 5. Click "Break Me" on the templates breaker portlet 6. Navigate to Control panel and check page templates and site templates You will see the following screenshots (See attachments) Fixed on: Tomcat 7 + MySQL 5. Portal 6.2.x GIT ID: a5a80f983b76a15d8f86dc03897f8ad875874f5f. A site administrator can check the status of propagation for page/site templates and request propagation when necessary.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Structure Helper Panel