WCM Placeholder tag – Issues with htmlencode=”true”

When content author publishes the content with single quotes or double quotes or special char in name or title causing Javascript errors (or HTML is getting break ).

We have enabled default or global htmlencode setting like below as

ISC (WAS Admin) console à Resources àResources Environment Providers àWCM_WCMConfigService , change or set “cmpnt.htmlEncodeDefault” to “true” .
NOTE: Once this setting is enabled you don’t need add the “htmlencode=true” explicitly on the tags
By setting this to true , the reserved HTML characters in the source is converted into character entities. For example, '<' is converted to '&lt;'  and ‘(single quote) to &apos ...etc. and it is working as expected for the “property tags” ..etc .
But output of the placeholder tags are not getting encoded and causing presentation break when menu or navigators uses the place holder tags like below.
<li id='[Placeholder tag="name"]'><a href="[Placeholder tag="href"]">[Placeholder tag="name"]</a></li>


                document.getElementById(‘[Placeholder tag="name"]’);

HTML or Javascript break in above example if name contains single quote.
 After doing some research found that by setting  “htmlencode=true” explicitly on the placeholder tag made the output encoded.
This supposed to fix in Portal V7 but looks like it is still a issue and placeholder tags encoding is working as expected only when you set this option explicitly.


WCM Syndication Reporting – Enable high level detail logging

Out of the box wcm syndication does provide the report of how items syndicated/attempted, how many were udpates, how many removals …etc. But it doesn’t give exact details like what are contents syndicated …etc.

To enable high level reporting of syndication to SystemOut.log on the subscriber server, set “deployment.enableReport” property with value “true”  in

ISC (WAS admin) console --> Resources --> Resource Environment Providers --> WCM_WCMConfigService --> Custom Properties.

1.        http://publib.boulder.ibm.com/infocenter/wcmdoc/v6r1/topic/com.ibm.lotus.wcm.doc_v615/wcm/wcm_syndication_troubleshooting.html

Menu Components Issue – Query Length

We had strange Problem with Menu Components after syndicating content and design elements to new WCM environment

We have lot of menu’s with following three options selected or defined in search criteria
1.       “authoring template”,
2.       “sitearea” and
3.       “categories” .  

Once we syndicate the lot stuff from lower environment to staging /prod environments , most of the times these components were not working as expected.  Some times it displays the results properly and some times no results at all. 

Enabled WCM traces to find out actual error and query details , When it is trying to execute menu’s , I see the exceptions like below in the logs 

[7/25/12 12:29:04:641 EDT] 00000045 Query         E com.ibm.icm.da.portable.query.Query openQueryCursor() Executing actual query: SELECT DISTINCT Links_4.TIID , 1 WSID , NodesTab_17.VID , NodesTab_17.CTID , NodesTab_17.UUID , NodesTab_17.COMPID , Properties_20.PROPVAL ORDERVAL21  FROM jcr.ICMSTJCRLV00001 Links_4, jcr.ICMSTJCRLV00001 Links_1, jcr.ICMSTJCRN00001 NodesTab_17, (SELECT ibmcontentwcm_18.ITEMID , ibmcontentwcm_18.VERSIONID , ibmcontentwcm_18.ATTR0000001068 PROPVAL  FROM jcr.ICMUT01580001 ibmcontentwcm_18  UNION ALL SELECT ibmcontentwcm_19.ITEMID , ibmcontentwcm_19.VERSIONID , ibmcontentwcm_19.ATTR0000001068 PROPVAL  FROM jcr.ICMUT01331001 ibmcontentwcm_19 ) Properties_20  WHERE ((((((Links_4.TCTID = ?) OR (Links_4.TCTID = ?)) AND ((Links_1.TCTID = ?) AND (EXISTS (SELECT CAST(NULL AS CHAR(1))  FROM (SELECT NodesTab_2.IID ITEMID , NodesTab_2.VID VERSIONID , NodesTab_2.UUID PROPVAL  FROM jcr.ICMSTJCRN00001 NodesTab_2 ) Properties_3  WHERE ((Properties_3.ITEMID = Links_1.TIID) AND (Properties_3.VERSIONID = Links_1.TVID)) AND (Properties_3.PROPVAL IN (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )))))) AND (Links_4.SIID = Links_1.TIID)) AND (((EXISTS (SELECT CAST(NULL AS CHAR(1))  FROM (SELECT ibmcontentwcm_5.ITEMID , ibmcontentwcm_5.VERSIONID , ibmcontentwcm_5.ATTR0000001125 PROPVAL  FROM jcr.ICMUT01580001 ibmcontentwcm_5  UNION ALL SELECT ibmcontentwcm_6.ITEMID , ibmcontentwcm_6.VERSIONID , ibmcontentwcm_6.ATTR0000001125 PROPVAL  FROM jcr.ICMUT01331001 ibmcontentwcm_6 ) Properties_7  WHERE ((Properties_7.ITEMID = Links_4.TIID) AND (Properties_7.VERSIONID = Links_4.TVID)) AND (Properties_7.PROPVAL IN (? , ? )))) AND ((EXISTS (SELECT CAST(NULL AS CHAR(1))  FROM (SELECT ibmcontentwcm_8.ITEMID , ibmcontentwcm_8.VERSIONID , ibmcontentwcm_8.ATTR0000001337 PROPVAL  FROM jcr.ICMUT01580001 ibmcontentwcm_8  UNION ALL SELECT ibmcontentwcm_9.ITEMID , ibmcontentwcm_9.VERSIONID , ibmcontentwcm_9.ATTR0000001337 PROPVAL  FROM jcr.ICMUT01331001 ibmcontentwcm_9 ) Properties_10  WHERE ((Properties_10.ITEMID = Links_4.TIID) AND (Properties_10.VERSIONID = Links_4.TVID)) AND (Properties_10.PROPVAL = ?))) AND (EXISTS (SELECT CAST(NULL AS CHAR(1))  FROM (SELECT ibmcontentwcm_11.ITEMID , ibmcontentwcm_11.VERSIONID , ibmcontentwcm_11.ATTR0000001336 PROPVAL  FROM jcr.ICMUT01583001 ibmcontentwcm_11  UNION ALL SELECT ibmcontentwcm_12.ITEMID , ibmcontentwcm_12.VERSIONID , ibmcontentwcm_12.ATTR0000001336 PROPVAL  FROM jcr.ICMUT01334001 ibmcontentwcm_12 ) Properties_13  WHERE ((Properties_13.ITEMID = Links_4.TIID) AND (Properties_13.VERSIONID = Links_4.TVID)) AND (Properties_13.PROPVAL = ?))))) AND (EXISTS (SELECT CAST(NULL AS CHAR(1))  FROM (SELECT ibmcontentwcm_14.ITEMID , ibmcontentwcm_14.VERSIONID , ibmcontentwcm_14.ATTR0000001129 PROPVAL  FROM jcr.ICMUT01580001 ibmcontentwcm_14  UNION ALL SELECT ibmcontentwcm_15.ITEMID , ibmcontentwcm_15.VERSIONID , ibmcontentwcm_15.ATTR0000001129 PROPVAL  FROM jcr.ICMUT01331001 ibmcontentwcm_15 ) Properties_16  WHERE ((Properties_16.ITEMID = Links_4.TIID) AND (Properties_16.VERSIONID = Links_4.TVID)) AND (Properties_16.PROPVAL = ?))))) AND (Links_4.TIID = NodesTab_17.IID)) AND ((Properties_20.ITEMID = Links_4.TIID) AND (Properties_20.VERSIONID = Links_4.TVID)) ORDER BY ORDERVAL21 DESC WITH UR

[7/25/12 12:29:04:642 EDT] 00000045 Query         E com.ibm.icm.da.portable.query.Query openQueryCursor() Param Marker 1: Type = Long, Value = 1580
 [7/25/12 12:29:04:652 EDT] 00000045 Query         E com.ibm.icm.da.portable.query.Query openQueryCursor() Param Marker 27: Type = Long, Value = 1
[7/25/12 12:29:04:652 EDT] 00000045 Query         E com.ibm.icm.da.portable.query.Query openQueryCursor() Actual query length: 3165
[7/25/12 12:29:04:653 EDT] 00000045 Query         E com.ibm.icm.da.portable.query.Query openQueryCursor() com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-101, SQLSTATE=54001,
By looking at query length ,felt its kind of so lengthy and started troubleshooting it from the DB2 side and realized that we didn’t run the “RUNSTATS” on DB2.
After executing the “RUNSTATS” on the DB2  and resetting WCM event log resolved the issue.

>>>db2 connect to jcrdb
>>>db2 -x -r "runstats.db2" "select rtrim(concat('runstats on table ',concat(rtrim(tabSchema),concat('.',concat(rtrim(tabname),' on all columns with distribution on all columns and sampled detailed indexes all allow write access'))))) from syscat.tables where type='T'"
>>>db2 -v -f "runstats.db2"
>>>db2 disconnect all

For WCM event log resetting
./ConfigEngine.sh run-wcm-admin-task-reset-event-log -Dlibrary="libname" -Dfix=true

NOTE : You may also need to run “reorg” for the heavily used tables and indexes .


GZIP Compression Issues - IE Developer Toolbar showing wrong Compression/Encoding Headers – IHS

As part of the portal performance tuning, have enabled the GZIP compression on IBM HTTP server by adding following lines httpd.conf and restarted the IHS.

LoadModule deflate_module modules/mod_deflate.so

#Enable GZIP Compression
DeflateFilterNote Input instream
DeflateFilterNote Output outstream

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|exe)$ no-gzip dont-vary

Mozilla is showing proper Content-Encoding response headers   but Internet explorer always returns response without compression headers when we monitor through IE Developer tool bar. 

After proper analysis realized that IE Developer toolbar is not showing the proper response header for the compression.To find out actual compression details , Add the following to httpd.conf  and restart the server

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog /tmp/logs/siva_test_compression_log deflate

Following was logged to “siva_test_compression_log when we access from IE7
GET /wps/portal/ welcome/!ut/p/b1/04_Sj9CPykssy0xPLMnMz0vMAfGjzOINjA1cLZ0MHQ0MXP0cDTwDLEN9PNxCDAxcjIAKIpEV- 4/d5/L2dBISEvZ0FBIS9nQSEh/ HTTP/1.1" 16010/71089 (22%)
"GET /mccbuilder/css/portal_editmode_widgets.css HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/dijit/themes/tundra/tundra.css HTTP/1.1" -/- (-%)
"GET /wps/contenthandler/!ut/p/digest!T/dav/fs-type1/common-resources/ibm/css/common.css HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/com/ibm/widgets/css/widgets_combined.css HTTP/1.1" -/- (-%)
"GET /wps/contenthandler/!ut/p/digest! /res/SivaTheme/themes/html/SivaTheme/css/master.css HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/styles/layout.css HTTP/1.1" 1188/3524 (33%)
"GET /SivaTestTheme/styles/wcm/wcm.css HTTP/1.1" 1129/3836 (29%)
"GET /SivaTestTheme/styles/ie.css HTTP/1.1" 160/190 (84%)
"GET /SivaTestTheme/scripts/html5shiv.js HTTP/1.1" 1083/2050 (52%)
"GET /portal_dojo/v1.4.3/dojo/dojo.js HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/dojo/nls/dojo_en.js HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/themes/html/SivaTestTheme/js/asa_cmAggr.js HTTP/1.1" 2665/7534 (35%)
"GET /SivaTestTheme/themes/html/SivaTestTheme/js/custom.js HTTP/1.1" 1596/4931 (32%)
"GET /SivaTestTheme/images/theme/page-bkg.jpg HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/scripts/displayDate.js HTTP/1.1" 233/381 (61%)
"GET /SivaTestTheme/images/theme/bannerLeftLogo.png HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/dojo/resources/blank.gif HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/alert.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/styles/wcm/alert.css HTTP/1.1" 518/1527 (33%)
"GET /SivaTestTheme/images/theme/top-menu-seperator.jpg HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/bannerRight.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/tab-menu-bkg.jpg HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/tab-menu-bkg-highlight.jpg HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/com/ibm/widgets/css/images/bwArrows.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/tab-menu-bottom-bar.jpg HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/content-bkg.jpg HTTP/1.1" -/- (-%)
"GET /wps/contenthandler/!ut/p/digest!TXuRWzXY7QQZLuFyFmUoKQ/dav/fs-type1/common-resources/ibm/css/portal/images/ButtonBackground.gif HTTP/1.1" -/- (-%)
"GET /wps/wcm/connect/e76fe831-d81b-4d3d-b383-cb028bc7ad03/CustomGlobe.png?MOD=AJPERES&CACHEID=e76fe831-d81b-4d3d-b383-cb028bc7ad03 HTTP/1.1" -/- (-%)
"GET /wps/wcm/connect/7384f79b-798b-4007-97ad-85c84ff82438/images+%289%29.jpg?MOD=AJPERES&CACHEID=7384f79b-798b-4007-97ad-85c84ff82438 HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/leftArrow.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/footerLogoTrans.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/skin/sprite32.png HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/images/theme/footerGrad.jpg HTTP/1.1" -/- (-%)
"GET /wps/menu/menu_service.js HTTP/1.1" 3507/10925 (32%)
"GET /wps_semanticTag/javascript/semanticTagService.js HTTP/1.1" 45670/186100 (24%)
"GET /SivaTestTheme/themes/html/SivaTestTheme/js/nls/theme_en.js HTTP/1.1" 22490/81943 (27%)
"GET /SivaTestTheme/themes/html/SivaTestTheme/js/theme.js HTTP/1.1" 515299/2498285 (20%)
"GET /wps/contenthandler/%21ut/p/digest%21FWMinu5Of_321wJCNoFzLA/model/service-document HTTP/1.1" -/- (-%)
"GET /portal_dojo/v1.4.3/dojo/resources/iframe_history.html HTTP/1.1" 718/1299 (55%)
"GET /mccenabler/js/com/ibm/mm/iwidget/image/progress-anim.gif HTTP/1.1" -/- (-%)
"GET /wps/contenthandler/!ut/p/digest!FWMinu5Of_321wJCNoFzLA/res/SivaTestTheme/themes/html/SivaTestTheme/js/init.js HTTP/1.1" -/- (-%)
"GET /wps/contenthandler/!ut/p/digest!FWMinu5Of_321wJCNoFzLA/res/SivaTestTheme/themes/html/SivaTestTheme/images/favicon.ico HTTP/1.1" -/- (-%)
"GET /SivaTestTheme/skins/html/SivaTestSkin/js/skin.js HTTP/1.1" 1449/3880 (37%)
"GET /wps/contenthandler/!ut/p/digest!FWMinu5Of_321wJCNoFzLA/mashup/mashup:huffman/n0wypzQB/Z2F scopeZ3DpublicZ26ampZ3BvaryZ3DnoneZ22/aw7OKMEINga6xr-u8adr_OoaP9o3 HTTP/1.1" -/- (-%)
"GET /wps_semanticTag/ui/styles.css HTTP/1.1" 1295/5334 (24%)
"GET /portal_dojo/v1.4.3/dijit/themes/tundra/images/spriteArrows.png HTTP/1.1" -/- (-%)