Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
11 replies Latest Post - ‏2013-01-23T06:57:57Z by Dennis_te_Lintelo
Dennis_te_Lintelo
Dennis_te_Lintelo
77 Posts
ACCEPTED ANSWER

Pinned topic Edit mode not working in custom Portal 8 theme

‏2012-12-20T15:29:08Z |
In our custom portal 8 theme I want to embed the edit page functionality. The link from pageModeToggle.jsp is rendered ok. When I click on the link a lot of things happen and a div is rendered showing the loading image. After that nothing happens anymore.

The dynamic and static parts of the theme reside in a single WAR file. All other parts of the theme: layout templates, skins, etc. work fine.

Any ideas on what could be wrong or could be missing in the theme?

Thanks,
Dennis
Updated on 2013-01-23T06:57:57Z at 2013-01-23T06:57:57Z by Dennis_te_Lintelo
  • Mark_Winton
    Mark_Winton
    110 Posts
    ACCEPTED ANSWER

    Re: Edit mode not working in custom Portal 8 theme

    ‏2012-12-20T16:44:03Z  in response to Dennis_te_Lintelo
    Are you able to use Firebug or another web developer tool (e.g. Chrome's built in developer tools) to see which files are being downloaded (or more to the point, which ones aren't)?

    Have you added a new language to Portal?
    • Dennis_te_Lintelo
      Dennis_te_Lintelo
      77 Posts
      ACCEPTED ANSWER

      Re: Edit mode not working in custom Portal 8 theme

      ‏2012-12-21T07:56:57Z  in response to Mark_Winton
      I used the option below to get the list of javascript files in firebug.

      com.ibm.wps.resourceaggregator.CombinerDataSource.RemoteDebug=all

      It is hard to tell which file is not loaded because there are so many! I tried comparing it to the files that are loaded by the default theme but did not find any differences.

      The HTML below is rendered with the loading image so something is happening.
      <div class="utb wpthemeOpen wpthemeLoading" id="theme-toolbar">
      <div class="wpthemeOverlay"><div class="wpthemeOverlayImg"><span class="wpthemeAltText">Loading...</span></div></div>
      <div id="utb-shelf"></div>
      </div>

      Any ideas?
      • Dennis_te_Lintelo
        Dennis_te_Lintelo
        77 Posts
        ACCEPTED ANSWER

        Re: Edit mode not working in custom Portal 8 theme

        ‏2012-12-21T09:27:21Z  in response to Dennis_te_Lintelo
        Ok, just found this in the wiki:

        The site toolbar requires the Portal 8.0 theme.

        Is there someone from IBM who can tell me why the site toolbar can only be used in the Portal 8 theme and, if possible, can show me the steps on how to integrate the site toolbar in a custom theme?

        Thanks.
        • Mark_Winton
          Mark_Winton
          110 Posts
          ACCEPTED ANSWER

          Re: Edit mode not working in custom Portal 8 theme

          ‏2012-12-21T10:12:14Z  in response to Dennis_te_Lintelo
          To clarify, is your custom theme one based on the existing ibm.portal.80Theme theme, for example created using the "Customizing the theme" steps on the wiki?

          If you use the standard IBM Portal 8 theme on a page does the toolbar load correctly, or do you get the same "Loading..." behaviour?

          Lastly, as mentioned in my previous post have you added a new language to Portal?
          • Dennis_te_Lintelo
            Dennis_te_Lintelo
            77 Posts
            ACCEPTED ANSWER

            Re: Edit mode not working in custom Portal 8 theme

            ‏2012-12-21T10:21:53Z  in response to Mark_Winton
            My custom theme is based on the existing portal80Theme. No new languages have been added to the portal.

            The toolbar loads correctly when using the standard IBM portal 8 theme.

            I wonder what they mean with this line in the wiki: "The site toolbar requires the Portal 8.0 theme." Does this mean that the site bar should also work with a copy of that theme?
            • Mark_Winton
              Mark_Winton
              110 Posts
              ACCEPTED ANSWER

              Re: Edit mode not working in custom Portal 8 theme

              ‏2012-12-21T10:39:23Z  in response to Dennis_te_Lintelo
              Our custom theme is based on a copy of the existing portal80Theme, and the toolbar is behaving correctly - that is until we added a language (en_gb) so that WCM dates would render correctly, at which point the toolbar stopped working in the manner you describe.

              When the toolbar is "loading" we'd see 404 errors for the files Resolver.js, SharedMessages.js, Theme.js, NavWidget.js, and Shelf.js - all of which are prefixed with "/js/com/ibm/bundles/nls/en/" in their path. These files are fetched via ajax when the toolbar is opened, and it was pretty clear from the javascript console that the server was returning an error code rather than sending a file. I opened a PMR for this, which is still being progressed (my understanding is that the steps for adding a new language on the wiki will be updated once the full solution is known).

              But all that's probably a moot point if you've not added a new language to Portal - which language is your browser set to use and Portal set up with in its general settings?
              • Dennis_te_Lintelo
                Dennis_te_Lintelo
                77 Posts
                ACCEPTED ANSWER

                Re: Edit mode not working in custom Portal 8 theme

                ‏2012-12-21T11:14:00Z  in response to Mark_Winton
                My portal language was set to nl-NL, changed that now to en. Browser language is set to en. Still the site toolbar is not rendered.

                In our theme it is possible to select a different language: nl, fr, en or de.

                I do not see any 404 issues in firebug. I am still wondering if I missed a few files when copying the theme but am not sure of that. Will check that again.

                Is your custom theme in webdav or is it in a seperate war.
                • Mark_Winton
                  Mark_Winton
                  110 Posts
                  ACCEPTED ANSWER

                  Re: Edit mode not working in custom Portal 8 theme

                  ‏2012-12-21T12:28:59Z  in response to Dennis_te_Lintelo
                  Our theme's split between webdav and war file - the webdav items are the copy of the IBM theme which is also available via webdav, whilst the war file contents are the "dynamic resources" (from http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=IBM+WebSphere+Portal+8+Product+Documentation#action=openDocument&res_title=Copy_the_dynamic_resources_for_your_theme_wp8&content=pdcontent).

                  It may be worth you opening a PMR with IBM to get assistance with this - they may be able to give a trace string which helps to identify which resources can't be located etc.
                  • Dennis_te_Lintelo
                    Dennis_te_Lintelo
                    77 Posts
                    ACCEPTED ANSWER

                    Re: Edit mode not working in custom Portal 8 theme

                    ‏2012-12-21T12:45:28Z  in response to Mark_Winton
                    Ok, opening a PMR might be a good option.

                    Thanks for your help.
                    • Dennis_te_Lintelo
                      Dennis_te_Lintelo
                      77 Posts
                      ACCEPTED ANSWER

                      Re: Edit mode not working in custom Portal 8 theme

                      ‏2013-01-09T10:59:14Z  in response to Dennis_te_Lintelo
                      The pageModeToggle.jsp sets the variable below:

                      <portal-mp:managedPagesEnabled var="managedPagesEnabled" />

                      If the variable is 'false' the link to edit mode is generated.

                      When I apply the default portal 8 theme to my pages the variable is 'false', the link to edit mode is displayed and I can set the page into edit mode. When I apply my custom theme, based on the default portal 8 theme, to the same pages, the variable is 'true'.

                      Does anyone know what might be missing in my custom theme in order to set this variable to 'false' and have the link to edit mode rendered.

                      Thanks.
                      • Dennis_te_Lintelo
                        Dennis_te_Lintelo
                        77 Posts
                        ACCEPTED ANSWER

                        Re: Edit mode not working in custom Portal 8 theme

                        ‏2013-01-23T06:57:57Z  in response to Dennis_te_Lintelo
                        Ok, problem solved.

                        Somehow I removed this div element below from the theme.html file.

                        <div id="layoutContainers"></div>

                        When I added this div to the theme.html the page edit mode worked just fine.