Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-69386

Updating existing Site Template logo causes continuous image removal and creation



      The issue can be solved by https://github.com/matethurzo/liferay-portal/pull/1574 on master.

      The root issue is when create user by using site template (personal site), user site's s layout (modifiedDate>the last-merge-time value of typeSettings field in layout table). When the user login (after step 16), propagation (export/import) executes, this will remove last-merge-time value of settings_ field in layoutset table. And it further cause any view layout request will do export/import process (for example, layout is loading and logo continues delete/update). You can check the user's settings_ field value of the layoutset table. It is broken about site template propagation function, when invoke mergeLayoutSetPrototypeLayouts(), it will be treated as new site created (importData = true).

      Steps to reproduce:

      1. Control Panel > Sites > Site Templates
      2. Create a Site Template (MyProfileTemplate)
      3. On the Site Templates pane, next to "MyProfileTemplate" click the tricolon (⁝) icon > Manage > Look and Feel > Logo > Change > Select a logo file > Done > Save
      4. Assert that the logo directory will be created
        in <LIFERAY_HOME>/data/document_library/0/0/<Logo_A>
      5. Go into Control Panel > Users > Users and Organizations
      6. Create a user (e.g. user1)
      7. Grant user1 Administrator role
      8. Under user1's account information > User Information > Personal Site Template > My Profile > choose the MyProfileTemplate created in step 2
        (Enable propagation of changes from the site template)
      9. Change user1's password as we will be signing on with the user shortly
      10. Assert that a new logo directory will be created
        <LIFERAY_HOME>/data/document_library/0/0/<Logo_A'> (named "34636.png")
      11. Log in as user1
      12. Go to My Profile page - Assert that the page is displayed successfully
      13. Go to Control panel > Sites > Site Templates
      14. Under MyProfileTemplate click the tricolon (⁝) symbol > "Manage" > Look and Feel > Logo > Change > Select a new logo file > Done > Save
      15. Assert that the new logo directory will be created
      16. Go to user1's My Profile page

      Actual Result:
      Repeated deletion and recreation of a file (user1 site's logo) is observed.

      <LIFERAY_HOME>/data/document_library/0/0/34636.png will be deleted.

      Expected Result:
      <LIFERAY_HOME>/data/document_library/0/0/34636.png won't be deleted because we don't set layout.set.prototype.propagate.logo=true in portal-ext.


          Issue Links



              hai.yu Hai Yu
              hai.yu Hai Yu
              Participants of an Issue:
              Recent user:
              Enterprise Release HU
              0 Vote for this issue
              0 Start watching this issue


                Days since last comment:
                5 years, 37 weeks ago


                  Version Package
                  7.0.X EE