Showing posts with label Themes. Show all posts
Showing posts with label Themes. Show all posts

DOJO Templates parsing is failed because of WebSeal Junction Cookie


PROBLEM: DOJO failed to load the page , i.e. failed to parse the template  

REASON: we have dojo templates name " sometemplate-name.html " and webseal junction that we use have junction cookie enabled (created junction with -j  option)

Webseal is adding following (junction cookie in the script block) to all .html pages, caused DOJO widget templates also got this script block added at end and failed to parse the template.
SCRIPT language="JavaScript">
<!-- 
document.cookie = "IV_JCT=%2Ftestjunct1; path=/";
//--> 
</SCRIPT>

Solution : Simplest solution we tried is rename the template file name to "sometemplate-name.txt"  (used ".txt" instead of the ".html")

Sync PageBuilder Layout Changes to portal pages


Some times changes to layout templates made in WebDAV may not affective immediately (even if you restart the server). 

Login portal admin console --> Manage Pages --> Click on the Refresh Icon



Sometimes even the above one does not help , then apply the following i.e. Login portal admin console --> Manage Pages --> Page properties --> expand “Type of Page” --> select check box for the “Synchronize layout model with this layout template”


WebDAV Problems : Conflicts with implicit login filter – 302 redirect issue


We had the implicit login filter (authentication filter) setup on portal and it internally redirects different portal pages based on the user login and it works fine. But when we tried to access the WebDAV through any of the WebDAV clients none them are able to connect .  I made sure all setting and access points and security properly set as in my old post but still had problem.

After analyzing the WebDAV request and response properly , figured out the there  is 302 redirect response from server when we try to access the WebDAV . Initially I suspected the problem might be causing because of HTTP Basic Trust Interceptor as mentioned in below IBM support article but didn’t help.


After analyzing further more on the WebDAV request and responses , figured out each WebDAV request sent from the client is trying make login by sending credential through basic auth and causing the portal’s implicit login filter is intercepting the WebDAV request.  

Page Builder theme issues with IE9 - WP7


Basically Dojo 1.4 doesn’t support the IE 9 ( DOJO 1.4 Browser Support ) but Portal 7.0.0.0 or Portal 7.0.0.1 uses dojo 1.4.3 as default causing the page builder theme may not work properly in IE9 i.e. Symptoms are like portlets doesn’t show up , navigation menu may not behave proper ..etc



There are few ways we can overcome this issue


1.       Changing or adding any one of following line in the out of the box page builder theme head section

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />

2.       Manually change the “Document Mode” or the “Browser Mode” using the IE developer tool in IE9


Note : It showing page default as IE8 in above picture because I have already set the EmulateIE8 meta tag in page builder theme.

Additional Info
1.       Dojo support for Microsoft Internet Explorer 9.0 is provided with Dojo 1.6.1
2.       Portal 7.0.0.2 support DOJO 1.6.1
3.       Existing PageBuilder2 themes using Dojo 1.4.3 (i.e. WebSphere Portal V7.0.0.0 and 7.0.0.1), but you can upgrade DOJO version alone to 1.6.1
4.       Internet Explorer Related
a.       All browsers needed two modes: quirks mode for the old rules, strict mode for the standard.
b.      Browser Mode determines the document mode and it’s chosen before IE request web content. Browser mode sends User-Agent (UA) string  to servers. Site(page) response will define the document mode.

Content Value
Details
IE=7
Display in IE7 Standards mode; Already supported in the IE8 Beta 1 release
IE=EmulateIE7
Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode

Resources:

Page Builder - Creating Custom Page Layouts WP7


Lotus wiki article (Click Here)  didn’t provide the complete details on how the custom layout works in page builder theme. Following article tries to explain the internal details on how the custom layouts works in page builder theme .

Create custom layout (1Row3ColumnEqualFooter) using HTML DIV tags that looks like below



Step 2: copy the out of the box “customLayout” folder from the “layout-templates” to you local drive

Step 3: Rename the folder copied in above step to “1Row3ColumnEqualFooter”and also update the following files in it i.e. update the icon.gif with new icon.gif (looks like above) and also update the localized_en.properties file with title as (1Row3ColumnEqualFooter).

Step 4: Copy “1Row3ColumnEqualFooter” folder back to the http://localhost:10039/wps/mycontenthandler/dav/fs-type1/layout-templates

Step 5: Now you can see this custom layout on portal(may need to re login if doesn’t work) , ActionsàEditPageà CustomizeàChangeLayout . Now you should able to see the layout




Above steps explained in the wiki article also , but this isn’t yet solved the entire problem.

How to change the layout.html that re-presents the layout in above icon.

Step 1: Need to edit the layout.html and layout.css under the “1Row3ColumnEqual Footer” folder in webDAV

Step 2: Copy the following lines into the layout.hml (replace existing content)
<div class="hiddenWidgetsDiv">
<!-- widgets in this container are hidden in the UI by default -->
       <div class="component-container hiddenWidgetsContainer ibmDndRow" name="ibmHiddenWidgets"></div>
       <div style="clear:both"></div>
</div>
<div class="component-container ibmRow ibmDndRow" name="ibmMainContainer"></div>
<div  class="component-container ibm3Col ibmDndColumn" name="left"></div>
<div  class="component-container ibm3Col ibmDndColumn" name="middle"></div>
<div  class="component-container ibm3Col ibmRightCol ibmDndColumn" name="right"></div>
<div class="component-container ibmRow ibmDndRow" name="footer"></div>

Step 3: Copy the following lines to layout.css

.ibmClearRow { clear:both; }
.hiddenWidgetsContainer{ display:none; margin-bottom:10px; }
.ibm3Col {  float:left; width:32.5%; margin:0 .8% 2px 0; overflow:hidden; position:relative; }
.ibm_rtl .ibm3Col { margin:0 0 5px .8%; }
.ibmRow { width:100%; overflow:hidden; margin-bottom:10px; }
.ibmRightCol { margin-right:0px; margin-right:0%; }

Step 4: Update these files on the webDAV  “1Row3ColumnEqualFooter” folder

Step 5: To see the changes , create a portal page and apply the page builder theme.

Step 6: To apply the custom layout for that page, access portal pageà actionsà edit page à customize àchange layout à choose “1Row3ColumnEqual” and click save.

Step 7: Go back to administration and click “edit” icon for the page now it look like below and add portlets to containers and click “done”.

Step 8: Access the page to see the layout

 

Relation or Mapping between the <DIV> tags in layout.html and layout containers

It looks so simple to add the new layout but the page builder theme does following things to indetify what portlets need display under what <DIV> tag.

Once we select the layout in the page customization and click on it to save , then it actually update or adds lot of metadata to page.  XML for the above page as follows

<?xml version="1.0" encoding="UTF-8"?>
<content-node action="update" active="true"
       allportletsallowed="true" content-parentref="Z6_000000000000000000000000A0"
       create-type="explicit" domain="rel" objectid="Z6_S11VAVH4089E00IPA0S69O20I1"
       ordinal="5800" themeref="ZJ_CGAH47L000CS30IAH1044E1KJ5" type="staticpage"
       uniquename="TestCustomLayout">
       <localedata locale="en">
              <title>TestCustomLayout</title>
       </localedata>
       <parameter name="com.ibm.portal.IgnoreAccessControlInCaches" type="string" update="set"><![CDATA[false]]></parameter>
       <parameter name="com.ibm.portal.bookmarkable" type="string" update="set"><![CDATA[true]]></parameter>
       <parameter name="com.ibm.portal.layout.template.ref" type="string" update="set"><![CDATA[dav:fs-type1/layout-templates/1Row3ColumnEqualFooter]]></parameter>
       <parameter name="com.ibm.portal.remote-cache-expiry" type="string" update="set"><![CDATA[86400]]></parameter>
       <access-control externalized="false" owner="uid=wpsadmin,o=defaultWIMFileBasedRealm" private="false" />
       <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I5" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined">
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I3" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined" />
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20I7" ordinal="500" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[ibmHiddenWidgets]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow hiddenWidgetsContainer]]></parameter>
              </component>
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A0" ordinal="600" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[ibmMainContainer]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow ibmRow]]></parameter>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A3" ordinal="100" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20A7" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20A7" />
                     </component>
              </component>
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A6" ordinal="700" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[left]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmDndColumn]]></parameter>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q0" ordinal="100" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q4" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q4" />
                     </component>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O2060" ordinal="200" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O2064" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O2064" />
                     </component>
              </component>
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A1" ordinal="800" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[middle]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmDndColumn]]></parameter>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q2" ordinal="100" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q6" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q6" />
                     </component>
              </component>
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A4" ordinal="900" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[right]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibm3Col ibmRightCol ibmDndColumn]]></parameter>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q1" ordinal="100" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q5" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q5" />
                     </component>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O2062" ordinal="200" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O2066" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O2066" />
                     </component>
              </component>
              <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20A5" ordinal="1000" orientation="H" skinref="undefined" type="container" width="undefined">
                     <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[footer]]></parameter>
                     <parameter name="css-classes" type="string" update="set"><![CDATA[ibmDndRow ibmRow]]></parameter>
                     <component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="Z7_S11VAVH4089E00IPA0S69O20Q3" ordinal="100" skinref="undefined" type="control" width="undefined">
                           <portletinstance action="update" domain="rel" objectid="Z5_S11VAVH4089E00IPA0S69O20Q7" portletref="Z3_CGAH47L008LG50IAHUR9Q330H1" shareref="Z5_S11VAVH4089E00IPA0S69O20Q7" />
                     </component>
              </component>
       </component>
</content-node>
  
  1. Names of DIV tags in layout.html are added in container component node level parameters.
  2. CSS classes of DIV tags in layout.html,  are also added at container component node level parameters to arrange the containers positions or alignment
FAQ’s
  1. What is the main purpose of the page builder theme custom page layouts ?
Ans: Page builder theme helps to separate the page layout design with page administration  by separting the “layout” from the portal page by keeing it webDAV.

  1. Why there is nothing called custom layouts in the standard portal theme ?
Ans: As standard portlet theme uses the out the box layout tools , Page “Editors/Admins” can modify the layout directly in page “edit layout”.  It has flexibility to arrange the containers in any layout.

  1. Difference between PageBuilder Theme custom page layout vs Portal Theme out of box page layout?
Ans: In starndard portal theme page layout gets generated by using the HTML table cell structure . Layout containers uses the table structure to arrange the portlets on the page. But page bulder theme uses the Div layouts to generate the page structure.

  1. Can we create the DIV layout structure using the standard portal theme?
Ans: Yes, but need to use the custom CSS styles to move the portlets to arrange the layout.