6 Replies Latest reply on Aug 31, 2010 3:32 PM by j.harm

    unable to add group pages and navigation

    j.harm

      Hi,

       

      after configuring an own portal for GateIn 3.1.0.GA on JBossAS and adding some groups I tried to add pages and navigation for the groups. At the initial start of the server I get the following exception:

      11:41:27,812 ERROR [NewPortalConfigListener] NewPortalConfig error: Cannot insert page org.exoplatform.portal.pom.data.PageData@b8ecc5 as the corresponding portal /organisation/mygroup/subgroup with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      java.lang.IllegalArgumentException: Cannot insert page org.exoplatform.portal.pom.data.PageData@b8ecc5 as the corresponding portal /organisation/mygroup/subgroup with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
              at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:366)
              at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:328)
              at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:390)
              at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:41)
              at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
              at org.exoplatform.portal.pom.config.cache.DataCache.create(DataCache.java:108)
              at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:63)
              at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:201)
              at org.exoplatform.portal.pom.config.POMDataStorage.create(POMDataStorage.java:117)
              at org.exoplatform.portal.config.DataStorageImpl.create(DataStorageImpl.java:97)
              at org.exoplatform.portal.config.NewPortalConfigListener.createPage(NewPortalConfigListener.java:372)
              at org.exoplatform.portal.config.NewPortalConfigListener.initPageDB(NewPortalConfigListener.java:296)
              at org.exoplatform.portal.config.NewPortalConfigListener.run(NewPortalConfigListener.java:164)
              at org.exoplatform.portal.config.UserPortalConfigService.start(UserPortalConfigService.java:696)

       

      I haven't a clue how to solve the problem.

       

      Kind regards,

      Joerg

        • 1. Re: unable to add group pages and navigation
          j.harm

          There were some missing slashes in my portal-configuration.xml (parameter "group.configuration"). Now I get the following exception:

           

          13:14:39,905 ERROR [NewPortalConfigListener] NewPortalConfig error: Invalid owner type
                              group
          java.lang.IllegalArgumentException: Invalid owner type
                              group
                  at org.exoplatform.portal.pom.data.Mapper.parseSiteType(Mapper.java:1264)
                  at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:192)
                  at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:252)
                  at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:252)
                  at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:179)
                  at org.exoplatform.portal.pom.config.tasks.PageNavigationTask$Save.run(PageNavigationTask.java:165)
                  at org.exoplatform.portal.pom.config.tasks.PageNavigationTask$Save.run(PageNavigationTask.java:111)
                  at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:390)
                  at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:41)
                  at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
                  at org.exoplatform.portal.pom.config.cache.DataCache.create(DataCache.java:108)
                  at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:63)
                  at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:201)
                  at org.exoplatform.portal.pom.config.POMDataStorage.create(POMDataStorage.java:139)
                  at org.exoplatform.portal.config.DataStorageImpl.create(DataStorageImpl.java:116)
                  at org.exoplatform.portal.config.NewPortalConfigListener.createPageNavigation(NewPortalConfigListener.java:386)
                  at org.exoplatform.portal.config.NewPortalConfigListener.initPageNavigationDB(NewPortalConfigListener.java:304)
                  at org.exoplatform.portal.config.NewPortalConfigListener.run(NewPortalConfigListener.java:175)
                  at org.exoplatform.portal.config.UserPortalConfigService.start(UserPortalConfigService.java:696)

           

          May be, there is another missing slash somewhere.

          • 2. Re: unable to add group pages and navigation
            j.harm

            In navigation.xml I wrote

             

            {code:xml}

            <page-reference>

                 group::/organization/mygroup/subgroup::pagename

            </page-reference>

            {code}

             

            instead of

             

            {code:xml}

            <page-reference>group::/organization/mygroup/subgroup::pagename</page-reference>

            {code}

             

            Using the later form I don't get the exception anymore, but the navigation does not show up in the group menu. The referenced pages are shown in the page management. Adding pages and navigation nodes for the groups /platform/administrators and /platform/users works fine. The pages and navigation nodes configured in the main portal ("portal") are added,too. How can I avoid this?

             

            added bug report https://jira.jboss.org/browse/GTNPORTAL-1469

            • 3. Re: unable to add group pages and navigation
              hoang_to

              1. What happened if you manually create group/add navigation/ add page via UI?

               

              2. Could you post your configuration for your group?

              • 4. Re: unable to add group pages and navigation
                j.harm

                Now it works. There was a typo (organisation instead of organization) in the path of the pages.xml and navigation.xml files as well as in the parameter "group.configuration" of the NewPortalConfigListener.

                 

                To prevent the problem described in my last posting the page-reference should be trimmed while parsing the navigation.xml.

                 

                Is there a reason why the org.exoplatform.portal.config.PortalACLPlugin ignores all parameters but "super.user" and "portal.creation.roles"? Particularly, I would like to change the portal administrator groups.

                • 5. Re: unable to add group pages and navigation
                  hoang_to

                  Legacy code needs to be refactored

                   

                  The PortalACLPlugin is designed as subclass of BaseComponentPlugin. By convention, it should be configured as a plugin of the component UserACL ( something like <component-plugins><component-plugin> ). However, PortalACLPlugin is instantiated with the whole InitParams of UserACL component. That explains why the plugin does not take all parameters

                  • 6. Re: unable to add group pages and navigation
                    j.harm

                    BaseComponentPlugin just takes a name and a description. The method UserACL.addPortalACLPlugin(PortalACLPlugin) only changes the super user and the portal creation roles. There is no way to change the other attributes of the UserACL via PortalACLPlugin.

                     

                    The init parameter "portal.administrator.groups" of the UserACL is used to set the property "adminGroups" of the UserACL object. The result of a call to UserACL.getAdminGroups() is used in many places as parameter of the method UserACL.isUserInGroup(String) which expects exactly one group id. Obviously, it's not possible to configure more than one portal admin group. The names of the init parameter and the UserACL property are misleading, not to say wrong.