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

SitesUtil.updateLayoutSetPrototypesLinks doesn't generate page properly

    Details

      Description

      With the SitesUtil.updateLayoutSetPrototypesLinks we want to add a template site to an org site programmatically.
      We notice that after the API is used the template is added to the site but the pages aren't generate: cause a 404 if the user reach the org site.
      After an admin user access to the site page in the control panel section the 404 error resolves.

      Follow step to reproduce.

      1) Create an master organization 'B2B' (check 'create site for this org') - Org_new1.jpg
      2) Create a child organization under 'B2B' (check 'create site for this org') - Org_new2.jpg
      3) Create a non-admin user and add to the organizations - User_New1.jpg User_New2.jpg
      4) Create a site template 'B2B Document Library' with a simple page that show 'Document and Media' portlet - Site_Template1.jpg, Site_Template2.jpg, Site_Template3.jpg
      5) Use the attached code snippet to dinamically attach the site template to the child orgs - AttachTemplate2Site.java
      6) Login with the non-admin user and notice that:
      6a) the child orgs sites aren't show in the MySite menĂ¹ on the top-right - My_Sites1.jpg
      6b) if the user reach a link of the home page of any org sites get a 404
      7) Login with the admin user and enter in the 'Manage Site' of each org site

      After point 7 the non-admin user is able to view orgs sites in the MySite menĂ¹ and is able to reach the home of each site. - Manage_Site.jpg and My_Sites2.jpg

        Attachments

        1. AttachTemplate2Site.java
          2 kB
        2. Manage_Site.jpg
          Manage_Site.jpg
          140 kB
        3. My_Sites1.jpg
          My_Sites1.jpg
          128 kB
        4. My_Sites2.jpg
          My_Sites2.jpg
          128 kB
        5. Org_new1.jpg
          Org_new1.jpg
          107 kB
        6. Org_new2.jpg
          Org_new2.jpg
          94 kB
        7. Organization.jpg
          Organization.jpg
          165 kB
        8. Site_Template1.jpg
          Site_Template1.jpg
          109 kB
        9. Site_Template2.jpg
          Site_Template2.jpg
          122 kB
        10. Site_Template3.jpg
          Site_Template3.jpg
          102 kB
        11. User_New1.jpg
          User_New1.jpg
          107 kB
        12. User_New2.jpg
          User_New2.jpg
          148 kB

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 31 weeks, 6 days ago

                Packages

                Version Package
                6.2.X EE