<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebCenter Interaction, ALUI, Plumtree blog by Integryst &#187; Knowledge Directory</title>
	<atom:link href="http://blog.integryst.com/webcenter-interaction/tag/knowledge-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.integryst.com/webcenter-interaction</link>
	<description>WebCenter Interaction, ALUI, Plumtree</description>
	<lastBuildDate>Thu, 12 Jan 2012 22:54:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WebCenter Document Hit Counts</title>
		<link>http://blog.integryst.com/webcenter-interaction/2011/11/22/webcenter-document-hit-counts/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2011/11/22/webcenter-document-hit-counts/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 13:19:38 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=1483</guid>
		<description><![CDATA[Wondering how popular your Plumtree Knowledge Directory documents are? Sure, you could use WebCenter Analytics, but did you know that Plumtree has always captured card download metrics? Try this query to get hit counts for each card in the KD, and marvel in the awesomeness that is your popular documents &#8211; regardless of how many [...]]]></description>
			<content:encoded><![CDATA[<p>Wondering how popular your <a href="http://blog.integryst.com/webcenter-interaction/category/knowledge-directory/">Plumtree Knowledge Directory</a> documents are?  Sure, you could use <a href="http://blog.integryst.com/webcenter-interaction/category/analytics/">WebCenter Analytics</a>, but did you know that Plumtree has always captured card download metrics?</p>
<p>Try this query to get hit counts for each card in the KD, and marvel in the awesomeness that is your popular documents &#8211; regardless of how many times your Analytics collector dies:</p>
<pre class="brush: sql">
SELECT     ptc.name, ptcs.CARDID, ptcs.POPULARITY, ptcs.HITCOUNT, ptcs.LASTHIT
FROM         PTCARDSTATISTICS ptcs, PTCARDS ptc
WHERE     (LASTHIT &gt; GETDATE() - 30) AND (HITCOUNT &gt; 0) and (ptcs.cardid = ptc.objectid)
ORDER BY HITCOUNT DESC
</pre>
<p>Interesting side note &#8211; notice how all those document hit counts are a multiple of 10?  The reason for this is a scalability approach that Plumtree came up with years ago.  The idea is that rather than writing to the database every single time a document is downloaded, the code only increases the hit count 10% of the time, but increases the count by 10 each time.  So, statistically, the counts are accurate over time, but the database is written to much less frequently.</p>
<p><a href="http://blog.integryst.com/webcenter-interaction/files/2011/11/plumtree-cards-hitcount.png"><img src="http://blog.integryst.com/webcenter-interaction/files/2011/11/plumtree-cards-hitcount.png" alt="" title="plumtree-cards-hitcount" width="500" height="440" class="alignnone size-full wp-image-1484" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2011/11/22/webcenter-document-hit-counts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>There’s a WCI App For That 9: OpenerFilter (aka Office 2010 MIME Types)</title>
		<link>http://blog.integryst.com/webcenter-interaction/2011/11/03/there%e2%80%99s-a-wci-app-for-that-9-openerfilter-aka-office-2010-mime-types/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2011/11/03/there%e2%80%99s-a-wci-app-for-that-9-openerfilter-aka-office-2010-mime-types/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 17:53:07 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[App For That]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[appforthat]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[mime]]></category>
		<category><![CDATA[Office]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=1439</guid>
		<description><![CDATA[By now you&#8217;re probably tired of the Knowledge Directory saga related to opening KD documents in WebCenter Interaction, but it&#8217;s a pretty serious problem. I&#8217;ve posted several solutions, but have come across a new problem with the original OpenerFilter configuration. Specifically, for some IE and Office configurations, Office 2007 and Office 2010 documents don&#8217;t open [...]]]></description>
			<content:encoded><![CDATA[<p>By now you&#8217;re probably tired of the <a href="http://blog.integryst.com/webcenter-interaction/tag/knowledge-directory/">Knowledge Directory</a> saga related to opening KD documents in WebCenter Interaction, but it&#8217;s a pretty serious problem.  I&#8217;ve <a href="http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/">posted</a> <a href="http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/">several</a> <a href="http://blog.integryst.com/webcenter-interaction/2011/10/25/bug-blog-13-fix-broken-file-downloads-in-10gr3-part-quatre">solutions</a>, but have come across a new problem with the original <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/">OpenerFilter</a> configuration.  Specifically, for some IE and Office configurations, Office 2007 and Office 2010 documents don&#8217;t open properly because the original configuration file used non-specific MIME types.</p>
<p>You can view the <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/">original post</a> for the source code and a description of how this filter works, but recently I&#8217;ve discovered that the <a href="http://portal.integryst.com/site/integryst.i/gateway/PTARGS_0_200_548_0_0_18/integrystopener.xml">MIME types</a> in the original post should be updated for recent Office documents (.docx and .xlsx).  Instead of &#8220;application/msword&#8221;, the config file should use the <a href="http://technet.microsoft.com/en-us/library/ee309278(office.12).aspx" target=_new>MIME types provided by Microsoft</a>.  Specifically, the configuration file for OpenerFilter should look more like the following:</p>
<pre class="brush: xml">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;IntegrystOpener&gt;
 &lt;default&gt;
  &lt;removeContentDisposition value=&quot;0&quot; /&gt;
  &lt;replaceContentDispositionWithInline value=&quot;1&quot; /&gt;
  &lt;fixContentType value=&quot;1&quot; /&gt;
 &lt;/default&gt;
 &lt;extension-map&gt;

  &lt;doc value=&quot;application/msword&quot; /&gt;
  &lt;dot value=&quot;application/msword&quot; /&gt;
  &lt;dotx value=&quot;application/vnd.openxmlformats-officedocument.wordprocessingml.document&quot; /&gt;
  &lt;docx value=&quot;application/vnd.openxmlformats-officedocument.wordprocessingml.document&quot; /&gt;
  &lt;xlt value=&quot;application/vnd.ms-excel&quot; /&gt;
  &lt;xls value=&quot;application/vnd.ms-excel&quot; /&gt;
  &lt;xlst value=&quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot; /&gt;
  &lt;xlsx value=&quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot; /&gt;

  &lt;pdf value=&quot;application/pdf&quot; /&gt;
  &lt;gif value=&quot;application/octet-stream&quot; /&gt;
  &lt;jpg value=&quot;application/octet-stream&quot; /&gt;
  &lt;png value=&quot;application/octet-stream&quot; /&gt;

 &lt;/extension-map&gt;
&lt;/IntegrystOpener&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2011/11/03/there%e2%80%99s-a-wci-app-for-that-9-openerfilter-aka-office-2010-mime-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Blog 13: Fix Broken File Downloads in 10gR3 (Part Quatre)</title>
		<link>http://blog.integryst.com/webcenter-interaction/2011/10/25/bug-blog-13-fix-broken-file-downloads-in-10gr3-part-quatre/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2011/10/25/bug-blog-13-fix-broken-file-downloads-in-10gr3-part-quatre/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 14:56:23 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Coding Tricks]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Experience Definition]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=1385</guid>
		<description><![CDATA[When WebCenter Interaction 10gR3 was released, it was a complete train wreck for documents in the Knowledge Directory &#8211; the content headers were wrong, docs wouldn&#8217;t download in Internet Explorer due to the comical back-asswards Javascript file open mechanism, and links couldn&#8217;t be copied or viewed because the anchor tags were malformed. In our last [...]]]></description>
			<content:encoded><![CDATA[<p>When WebCenter Interaction 10gR3 was released, it was a complete train wreck for documents in the Knowledge Directory &#8211; the <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/">content headers were wrong</a>, <a href="http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/">docs wouldn&#8217;t download in Internet Explorer</a> due to the comical back-asswards Javascript file open mechanism, and links couldn&#8217;t be copied or viewed because the <a href="http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/">anchor tags were malformed</a>.</p>
<p>In our <a href="http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/">last post</a> in this <a href="http://blog.integryst.com/webcenter-interaction/tag/knowledge-directory/">painful series</a>, I shared some code that will resolve the ALUI / WCI Knowledge Directory links so that users can right-click and copy the links, and the files open as expected when clicked.</p>
<p>Since then, I&#8217;ve found that when an admin is in EDIT mode in the Knowledge Directory, the link calamity continues, and a completely different and incomprehensible linking mechanism is used.  So for your reading pleasure today, I&#8217;ll update that post to handle edit mode as well as browse mode.  Again, just add the following HTML to the footer used in your Knowledge Directory (depending on <a href="http://blog.integryst.com/webcenter-interaction/tag/experience-definition/">Experience Definition</a>, there may be more than one):<br />
<span id="more-1385"></span>
<pre class="brush: javascript">
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=UTF-8&quot;&gt;
&lt;pcs:value expr=&quot;text&quot;&gt;&lt;/pcs:value&gt;

&lt;pt:common.transformer pt:fixurl=&quot;off&quot; xmlns:pt=&#039;http://www.plumtree.com/xmlschemas/ptui/&#039;/&gt;
&lt;script&gt;
try
{
       // KD BROWSE Mode
       // &lt;a href=&quot;#&quot; onclick=&quot;var currentWin = PTCommonOpener.openInNewWindow (&#039;&#039;, &#039;Opener_18_1214986&#039;, 800, 600, true); currentWin.location= &#039;http://portal.integryst.com/portal/server.pt /document/1214936/DocName&#039;; return false;&quot;&gt;DocName&lt;/a&gt;
       if (document.title==&quot;Directory&quot;)
       {
              // get all links
              var anchors = document.links;
              for (x=0; x&lt;anchors.length; x++) {

                     // get only those with an onclick event
                     onclickJS = anchors[x].onclick;
                     if (onclickJS != null)
                     {
                           onclickJS = &quot;&quot; + onclickJS;
                           var locCommonOpener = onclickJS.indexOf(&quot;PTCommonOpener.openInNewWindow&quot;);
                           var locpos = onclickJS.indexOf(&quot;currentWin.location&quot;);

                           // only process links that have the broken PTCommonOpener.openInNewWindow
                           if ((locpos&gt;=0) &amp;amp;amp;&amp;amp;amp; (locCommonOpener&gt;=0))
                           {
                                  // extract the URL from the broken onclick function
                                  var url = onclickJS.substr(locpos);
                                  var locstart = url.indexOf(&quot;&#039;&quot;);
                                  if (locstart&gt;=0)
                                  {
                                         url = url.substr(locstart+1);
                                         var locend = url.indexOf(&quot;&#039;&quot;);
                                         if (locend&gt;=0)
                                         {
                                                // update the URL by clearing the onclick and setting the URL to open in a new window
                                                url = url.substring(0,locend);
                                                anchors[x].href=url;
                                                anchors[x].target=&quot;_new&quot;;
                                                anchors[x].onclick=null;
                                         }
                                  }
                           }
                     }
              }
       }

       // KD Edit Mode
       // &lt;a href=&quot;#&quot; onclick=&quot;var currentWin = PTCommonOpener.openInNewWindow (&#039;&#039;, &#039;Opener_18_1214986&#039;, 800, 600, true); currentWin.location = PTCommonOpener.getOpenerURLOpenObjID (18, 1214926, &#039;&#039;, 2); return false;&quot;&gt; DocName &lt;/a&gt;
       if (document.title==&quot;Edit Directory&quot;)
       {
              // get all links
              var anchors = document.links;
              for (x=0; x&lt;anchors.length; x++) {

                     // get only those with an onclick event
                     onclickJS = anchors[x].onclick;
                     if (onclickJS != null)
                     {
                           onclickJS = &quot;&quot; + onclickJS;
                           var locCommonOpener = onclickJS.indexOf(&quot;PTCommonOpener.openInNewWindow&quot;);
                           var locpos = onclickJS.indexOf(&quot;currentWin.location&quot;);

                           // only process links that have the broken PTCommonOpener.openInNewWindow
                           if ((locpos&gt;=0) &amp;amp;amp;&amp;amp;amp; (locCommonOpener&gt;=0))
                           {
                                  // extract the URL from the broken onclick function
                                  var url = onclickJS.substr(locpos);
                                  var locstart = url.indexOf(&quot;=&quot;);
                                  if (locstart&gt;=0)
                                  {
                                         url = url.substr(locstart+1);
                                         var locend = url.indexOf(&quot;;&quot;);
                                         if (locend&gt;=0)
                                         {
                                                // update the URL by clearing the onclick and setting the URL to open in a new window
                                                url = url.substring(0,locend+1);
                                                anchors[x].href=eval(url);
                                                anchors[x].target=&quot;_new&quot;;
                                                anchors[x].onclick=null;
                                         }
                                  }
                           }
                     }
              }
       }
}
catch (err)
{
       // ignore errors
}
&lt;/script&gt;
</pre>
<p>On a completely unrelated note, thanks to my wonderful numbering scheme of these posts, I can now <a href="http://french.about.com/od/vocabulary/ss/numbers.htm">count to four in French</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2011/10/25/bug-blog-13-fix-broken-file-downloads-in-10gr3-part-quatre/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crawl RSS Feeds with WebCenter Interaction</title>
		<link>http://blog.integryst.com/webcenter-interaction/2011/10/19/crawl-rss-feeds-with-webcenter-interaction/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2011/10/19/crawl-rss-feeds-with-webcenter-interaction/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 23:40:32 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Crawler]]></category>
		<category><![CDATA[WebCenter Interaction]]></category>
		<category><![CDATA[crawler]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[WCI]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=1345</guid>
		<description><![CDATA[I don&#8217;t know whether to file this one under &#8220;obvious&#8221; or not. On one hand, I guess most people have always known this. But on the other, it&#8217;s such an under-used feature it bears repeating: Web Crawlers in Webcenter Interaction (and even back in the ALUI days) aren&#8217;t just for web sites &#8211; they can [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know whether to file this one under &#8220;obvious&#8221; or not.  On one hand, I guess most people have always known this.  But on the other, it&#8217;s such an under-used feature it bears repeating:  Web Crawlers in Webcenter Interaction (and even back in the ALUI days) aren&#8217;t just for web sites &#8211; they can crawl RSS feeds too.</p>
<p>Configuration is identical to creating a Web Crawler.  In administration, select &#8220;Create Object: Content Crawler &#8211; WWW&#8221; and choose the &#8220;World Wide Web&#8221; Content Source:</p>
<p><a href="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-content-source.png"><img src="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-content-source.png" alt="" title="wci-rss-content-source" width="250" height="270" class="alignnone size-full wp-image-1346" /></a></p>
<p>Here, instead of entering a web site, just provide the URL of the <a href="http://rss.integryst.com/webcenter-interaction/" target=_new>RSS feed</a>:<br />
<a href="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-config.png"><img src="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-config.png" alt="" title="wci-rss-config" width="500" height="490" class="alignnone size-full wp-image-1347" /></a></p>
<p>Once the job runs, a card is created for each article in the feed:<br />
<a href="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-items.png"><img src="http://blog.integryst.com/webcenter-interaction/files/2011/10/wci-rss-items.png" alt="" title="wci-rss-items" width="500" height="400" class="alignnone size-full wp-image-1348" /></a></p>
<p>Note the created date shows when the feed was crawled, not when the original articles were written.  And in this example, only 11 cards have been created because that&#8217;s all that&#8217;s being provided on the <a href="http://rss.integryst.com/webcenter-interaction/" target=_new>Integryst RSS Feed</a>.  Both of these problems can be resolved by running your crawler job regularly, so that the dates are closer to when the posts are written, and the cards stick around after they&#8217;ve &#8220;left the feed&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2011/10/19/crawl-rss-feeds-with-webcenter-interaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Blog 6: Fix Broken File Downloads in 10gR3 (Part Trois)</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 13:03:22 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Coding Tricks]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=481</guid>
		<description><![CDATA[*sigh*.  You&#8217;ve upgraded from ALUI to WCI 10gR3, and your Knowledge Directory links got all screwed up, didn&#8217;t they?  HTML files now throw an open/save dialog, some documents don&#8217;t open, you can&#8217;t copy links by just right-clicking them and choosing &#8220;Copy Shortcut&#8221;, and IE throws a popup blocker when you click a link in the Knowledge [...]]]></description>
			<content:encoded><![CDATA[<p><strong>*sigh*.</strong>  You&#8217;ve upgraded from ALUI to WCI 10gR3, and your Knowledge Directory links got all screwed up, didn&#8217;t they?  HTML files now throw an open/save dialog, some documents don&#8217;t open, you can&#8217;t copy links by just right-clicking them and choosing &#8220;Copy Shortcut&#8221;, and IE throws a popup blocker when you click a link in the Knowledge Directory, doesn&#8217;t it? </p>
<p><a href="http://blog.integryst.com/webcenter-interaction/files/2010/06/wci-knowledge-directory-js.png"><img class="alignnone size-full wp-image-482" title="wci-knowledge-directory-js" src="http://blog.integryst.com/webcenter-interaction/files/2010/06/wci-knowledge-directory-js.png" alt="" width="666" height="201" /></a></p>
<p>You got the &#8220;To help protect your security, Internet Explorer blocked this site from downloading files to your computer&#8221; blues, huh?</p>
<p>I&#8217;ve <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/" target="_self">tried creating a Plumtree Filter</a>, and that worked pretty well, but not quite enough.</p>
<p>I&#8217;ve <a href="http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/" target="_self">tried tweaking the Portal&#8217;s Javascript files</a>, and THAT worked pretty well, but again, not quite well enough.</p>
<p>So, today, my friend&#8217;s, third time&#8217;s a charm:  rather than trying to fix this on the server side, we&#8217;re going to knock out this issue once and for all on the client side.  Check out those previous blog entries for a more detailed description of the problem, but basically, it&#8217;s because the portal uses a crazy convoluted way of opening documents via javascript. </p>
<p>What we&#8217;re going to do today is stick some javascript in the footer of the page.  This JavaScript is going to simply find all those back-asswards links and replace them with NORMAL &lt;a href=xxx target=_new&gt; links.  If you add it to the footer of your site (specifically, the footer used for the KD, but the code is smart enough not to do anything if it&#8217;s on all pages), it should be able to take care of the rest.  Just make sure you add it to the Presentation Template and not the Content Item, because you-know-who only knows what a <a href="http://blog.integryst.com/webcenter-interaction/category/publisher/" target="_self">mess the out-of-the-box rich text editor is</a> with javascript and adaptive tags.</p>
<p>The code after the break should be self-explanatory, but as always, if you&#8217;ve got a question or comment, feel free to post it here.  Also note that this code only fixes the download links; it doesn&#8217;t kill that &#8220;Open/Save&#8221; dialog box for things like HTML files.  For that you&#8217;ll still need the <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/" target="_self">Plumtree Filter</a>.<span id="more-481"></span>
<pre class="brush: javascript">

&lt;pt:common.transformer pt:fixurl=&quot;off&quot; xmlns:pt=&#039;http://www.plumtree.com/xmlschemas/ptui/&#039;/&gt;
&lt;script&gt;
try
{
       // only run in the KD
       if (document.title==&quot;Directory&quot;)
       {
              // get all links
              var anchors = document.links;
              for (x=0; x&lt;anchors.length; x++) {

                     // get only those with an onclick event
                     onclickJS = anchors[x].onclick;
                     if (onclickJS != null)
                     {
                           onclickJS = &quot;&quot; + onclickJS;
                           var locCommonOpener = onclickJS.indexOf(&quot;PTCommonOpener.openInNewWindow&quot;);
                           var locpos = onclickJS.indexOf(&quot;currentWin.location&quot;);

                           // only process links that have the broken PTCommonOpener.openInNewWindow
                           if ((locpos&gt;=0) &amp;amp; &amp;amp; (locCommonOpener&gt;=0))
                           {
                                  // extract the URL from the broken onclick function
                                  var url = onclickJS.substr(locpos);
                                  var locstart = url.indexOf(&quot;&#039;&quot;);
                                  if (locstart&gt;=0)
                                  {
                                         url = url.substr(locstart+1);
                                         var locend = url.indexOf(&quot;&#039;&quot;);
                                         if (locend&gt;=0)
                                         {
                                                // update the URL by clearing the onclick and setting the URL to open in a new window
                                                url = url.substring(0,locend);
                                                anchors[x].href=url;
                                                anchors[x].target=&quot;_new&quot;;
                                                anchors[x].onclick=null;
                                         }
                                  }
                           }
                     }
              }
       }
}
catch (err)
{
       // ignore errors
}
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/06/20/bug-blog-6-fix-broken-file-downloads-in-10gr3-part-trois/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Blog 4: Fix Broken File Downloads in 10gR3 (Part Deux)</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/#comments</comments>
		<pubDate>Mon, 03 May 2010 06:12:05 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Coding Tricks]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=344</guid>
		<description><![CDATA[Last week I provided portal filter code to fix some elements of opening documents in WebCenter Interaction&#8217;s Knowledge Directory (and Search and Snapshot Queries).  This week is another follow-up on that theme, and I&#8217;ll provide another piece of code to continue cleaning up the mess that is the Knowledge Directory Downloading Clusterf*ck (in IE at least). Ever gotten [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I provided <a href="http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix…loads-in-10gr3/" target="_self">portal filter code</a> to fix some elements of opening documents in WebCenter Interaction&#8217;s Knowledge Directory (and Search and Snapshot Queries).  This week is another follow-up on that theme, and I&#8217;ll provide another piece of code to continue cleaning up the mess that is the Knowledge Directory Downloading Clusterf*ck (in IE at least).</p>
<p>Ever gotten this little present after doing an upgrade to 10gR3, when trying to open a document in the Knowledge Directory using IE7 or IE8?</p>
<p> <a href="http://blog.integryst.com/webcenter-interaction/files/2010/05/wci-ie-blocked-download.png"><img class="alignnone size-full wp-image-348" title="wci-ie-blocked-download" src="http://blog.integryst.com/webcenter-interaction/files/2010/05/wci-ie-blocked-download.png" alt="" width="496" height="176" /></a></p>
<p>Ah, the old &#8220;To help protect your security, Internet Explorer blocked this site from downloading files to your computer.&#8221;  What&#8217;s even more ridiculous, if you &#8220;accept&#8221; the download, it STILL doesn&#8217;t work because IE tries to reload the page, and WCI is very stupid about how it opens this popup window (see how that address bar shows &#8220;about:blank&#8221;?).  It seems this only happens in IE, and only if you have adaptive layouts disabled with &#8220;open documents in new window&#8221; enabled, so it doesn&#8217;t affect everyone.  But I die a little on the inside every time I see that stupid thing: yes, my friends, I am an empty, hollow shell of a consultant.</p>
<p>Fortunately, I decided to seek redemption for WCI and myself by proxy, and checked out the HTML source for a typical file open link.  It&#8217;s kinda hilarious:</p>
<pre class="brush: html">

&lt;a href=&quot;#&quot; onclick=&quot;var currentWin = PTCommonOpener.openInNewWindow(&#039;&#039;, &#039;Opener_18_1322446&#039;, 800, 600, true); currentWin.location= &#039;http://server/portal/server.pt/document/1322446/slide_1&#039;; return false;&quot;&gt;Doc Name&lt;/a&gt;
</pre>
<p>Whhaaaaaaa&#8230;!?  Sure I know there are dozens of ways you can open a document in a popup window, and many have their advantages (for example, by using JavaScript you can control the size and layout of the window), but I&#8217;d be hard-pressed to come up with a worse way to open a document.  I&#8217;ve always hated the fact that you can&#8217;t just hover over the link to see the URL, and can&#8217;t right-click and copy the shortcut to mail to someone later. (Tip: use adaptive layouts and these problems go away!).  Or they could have at least just done a window.open method in that onclick event.  OK, so they wanted to use a wrapper method &#8211; that&#8217;s fine &#8211; but the PTCommonOpener.openInNewWindow actually takes a URL paramater, so they could have just passed the URL into that function, rather than creating a new, EMPTY document and then trying to use Javascript to load the document into that window.  At very least they could have put the document URL in the &#8220;href&#8221; parameter so it&#8217;d work without JavaScript (and be <a href="http://www.section508.gov/" target="_blank">508-compliant</a>) and users could copy the links with a simple right-click.</p>
<p>OK enough rambling.  On to a solution:<span id="more-344"></span></p>
<p>It&#8217;s clear looking at the above code that while Microsoft&#8217;s security controls can sometimes be oppressive, this blocked transfer kinda makes sense:  IE blocks downloads that <a href="http://msdn.microsoft.com/en-us/library/dd565669(VS.85).aspx" target="_blank">weren&#8217;t initiated by the user</a> (i.e., were initiated by JavaScript).  The problem is, given the brain-dead way that documents are opened in a new window (by creating an EMPTY window first, then trying to download the document later), when you accept the download, the browser reloads the about:blank() page instead of the actual file.</p>
<p>Using a <a href="http://blog.integryst.com/webcenter-interaction/2010/04/21/cool-tools-5-net-decompilers/" target="_self">.NET decompiler</a> (I used dis# because I needed to search the entire portaluiinfrastructure.dll for the text string &#8220;openInNewWindow&#8221;), I found the code in com.plumtree.portaluiinfrastructure.opener.PTOpenerLinks:</p>
<pre class="brush: csharp">

public static string GetJSOpenInNewWindow(string _strURL, string _strWindowName, string _strWindowWidth, string _strWindowHeight, bool _bIsWindowFancy)
        {
            com.plumtree.openfoundation.util.XPStringBuilder sbOpenerJS = new com.plumtree.openfoundation.util.XPStringBuilder(300);
            sbOpenerJS.Append(&quot;var currentWin = &quot;);
            sbOpenerJS.Append(&quot;PTCommonOpener.openInNewWindow&quot;);
            sbOpenerJS.Append(&quot;(&#039;&#039;, &#039;&quot;);
            sbOpenerJS.Append(_strWindowName).Append(&quot;&#039;, &quot;);
            sbOpenerJS.Append().Append(&quot;, &quot;);
            sbOpenerJS.Append(_strWindowHeight).Append(&quot;, &quot;);
            sbOpenerJS.Append(_bIsWindowFancy);_strWindowWidth
            sbOpenerJS.Append(&quot;);&quot;);
            sbOpenerJS.Append(&quot;currentWin.location=&quot;).Append(_strURL);
            return sbOpenerJS.ToString();
        }
</pre>
<p>Ideally, I&#8217;d change the code to something like this:</p>
<pre class="brush: csharp">

public static string GetJSOpenInNewWindow(string _strURL, string _strWindowName, string _strWindowWidth, string _strWindowHeight, bool _bIsWindowFancy)
        {
            com.plumtree.openfoundation.util.XPStringBuilder sbOpenerJS = new com.plumtree.openfoundation.util.XPStringBuilder(300);
            sbOpenerJS.Append(&quot;var currentWin = &quot;);
            sbOpenerJS.Append(&quot;PTCommonOpener.openInNewWindow&quot;);
            sbOpenerJS.Append(&quot;(&#039;&quot;);
            sbOpenerJS.Append(_strURL);
            sbOpenerJS.Append(&quot;&#039;, &#039;&quot;);
            sbOpenerJS.Append(_strWindowName).Append(&quot;&#039;, &quot;);
            sbOpenerJS.Append().Append(&quot;, &quot;);
            sbOpenerJS.Append(_strWindowHeight).Append(&quot;, &quot;);
            sbOpenerJS.Append(_bIsWindowFancy);_strWindowWidth
            sbOpenerJS.Append(&quot;);&quot;);
            return sbOpenerJS.ToString();
        }
</pre>
<p>(or even better, figure out how to change this to a normal link like &lt;a href=&#8221;http://url&#8221; target=_new&gt;docname&lt;/a&gt;)</p>
<p>&#8230; but recompiling decompiled code &#8211; especially in a .NET library as large as portaluiinfrastructure &#8211; well, that just wasn&#8217;t going to happen.</p>
<p>So we can&#8217;t change the HTML that generates this terrible link, but is there at least a way to fix the problem where we can get the browser to open the link in a new window in one step instead of two?  Fortunately, the answer is yes.  I&#8217;ll leave the analysis of this hack to you, but basically it creates a global object and allows both of those calls (open the window and set the URL) to be made before actually calling the open window method.</p>
<p>Open the PTHOME\imageserver\plumtree\portal\private\js\ptcommonopener.js file and change:</p>
<pre class="brush: javascript">

PTCommonOpener.openInNewWindow = function(_strURL, _strWindowName, _strWidth, _strHeight, _bIsFancyWindow)
{
 return PTCommonOpener.JSUTIL_VERSIONOBJ.PTWindowUtil.openWindow(_strURL, _strWindowName, _strHeight, _strWidth, _bIsFancyWindow);
}
</pre>
<p>&#8230; to:</p>
<pre class="brush: javascript">

var newwin = {location:&#039;&#039;, _strWindowName:&#039;&#039;, _strWidth:&#039;&#039;, _strHeight:&#039;&#039;, _bIsFancyWindow:&#039;&#039;};
PTCommonOpener.handlePopup = function() {
 PTCommonOpener.JSUTIL_VERSIONOBJ.PTWindowUtil.openWindow(newwin.location, newwin._strWindowName, newwin._strHeight, newwin._strWidth, newwin._bIsFancyWindow);
}

PTCommonOpener.openInNewWindow = function(_strURL, _strWindowName, _strWidth, _strHeight, _bIsFancyWindow)
{
 if (_strURL != &quot;&quot;)
  return PTCommonOpener.JSUTIL_VERSIONOBJ.PTWindowUtil.openWindow(_strURL, _strWindowName, _strHeight, _strWidth, _bIsFancyWindow);

 newwin.location=_strURL;
 newwin._strWindowName=_strWindowName;
 newwin._strWidth=_strWidth;
 newwin._strHeight=_strHeight;
 newwin._bIsFancyWindow=_bIsFancyWindow;
 window.setTimeout(&quot;PTCommonOpener.handlePopup();&quot;,50);
 return newwin;
}
</pre>
<p><strong>Update 7/17/2010</strong>: Thanks to Joel Collins for helping out with some of the code here and building the solution&#8217;s binaries!  Hopefully you find them useful so you can just deploy the .DLL without having to compile it yourself.  Download <a href="http://blog.integryst.com/webcenter-interaction/files/2010/07/DisplayFilter.zip">DisplayFilter.zip</a> for the binaries (source and config files included).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/05/03/bug-blog-4-fix-broken-file-downloads-in-10gr3-part-duex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Blog 3: Fix Broken File Downloads in 10gR3</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 09:27:17 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Coding Tricks]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=332</guid>
		<description><![CDATA[Wow, was WebCenter Interaction 10gR3 a step backwards in opening documents, or what?  I&#8217;ve seen wide-spread problems opening docs in the Knowledge Directory, Search Results, and Snapshot Queries, and even written two posts on the topic already. There are two main problems: poorly implemented document open handlers (which I&#8217;ll discuss in my next post), and [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, was WebCenter Interaction 10gR3 a step backwards in opening documents, or what?  I&#8217;ve seen wide-spread problems opening docs in the Knowledge Directory, Search Results, and Snapshot Queries, and even written <a href="http://blog.integryst.com/webcenter-interaction/2010/01/21/fix-kd-handling-of-html-docs/" target="_self">two</a> <a href="http://blog.integryst.com/webcenter-interaction/2010/02/14/opening-excel-documents-from-the-wci-knowledge-directory/" target="_self">posts</a> on the topic already.</p>
<p>There are two main problems: poorly implemented document open handlers (which I&#8217;ll discuss in my next post), and that pesky Content-Disposition header that tries to force the browser to throw up an &#8220;Open/Save&#8221; dialog instead of just opening inline (which is definitely useful for HTML and Office files in particular, where users just want to view the documents in their browser without having to save &#8216;em first).  A third but ancillary issue is that occasionally the portal gets the MIME type of the document wrong in the Content-Type header, which is typically using application/octet-stream and doesn&#8217;t give the browser any clue about what type of file it is.</p>
<p>In the <a href="http://blog.integryst.com/webcenter-interaction/2010/01/21/fix-kd-handling-of-html-docs/" target="_self">past</a> <a href="http://blog.integryst.com/webcenter-interaction/2010/02/14/opening-excel-documents-from-the-wci-knowledge-directory/" target="_self">posts</a> I&#8217;ve described using BigIP iRules to remove the Content-Disposition header, but I ran into another client issue recently where just killing this header isn&#8217;t enough.  Take the following response headers for a document transfer that is NOT using the iRule to kill the Content-Disposition header:</p>
<p><a href="http://blog.integryst.com/webcenter-interaction/files/2010/04/bad-content-type.png"><img class="alignnone size-full wp-image-333" title="bad-content-type" src="http://blog.integryst.com/webcenter-interaction/files/2010/04/bad-content-type.png" alt="" width="269" height="198" /></a></p>
<p>This PowerPoint file, when clicked on in the portal, will throw the open/save dialog, but what if we wanted it to give the browser the option to open in-line?  We&#8217;d get rid of that Content-Disposition header.  Here&#8217;s the problem:  if we do that, the portal is returning a Content-Type of application/octet-stream.  Which means, without the file extension in Content-Disposition, the browser has no idea what type of document this is, so it throws up a &#8220;FIND PROGRAM/Save&#8221; dialog box instead of an &#8220;OPEN/Save&#8221; dialog box.</p>
<p>The solution to this problem would be to drop the Content-Disposition header, but use the file extension to fix the Content-Type while we&#8217;re at it (to application/vnd.ms-powerpoint).  But now our iRules are getting complicated, and not everyone has BigIP anyway.  Fortunately, <a href="http://blog.integryst.com/webcenter-interaction/2010/04/17/webcenter-patch-and-hotfix-round-up/" target="_self">my love/hate relationship</a> with support.oracle.com shifted much more to the former when i found this: <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=HOWTO&amp;id=971003.1" target="_blank">How to Eliminate the &#8216;Save/Open with&#8217; Prompt when Opening HTML Files [ID 971003.1]</a>.  Then, of course, it shifted back to the latter when I realized that I found this article by complete dumb luck navigating the terrible interface, and the article is nowhere to be found searching through Google. But that&#8217;s another story.</p>
<p>At any rate, a solution was clear: you can write a .NET or Java FILTER to manipulate headers before they&#8217;re returned to the browser!  As such, I took the code from that article and expanded on it with a .NET filter of my own, which will:</p>
<ol>
<li>Remove the Content-Disposition header selectively on different file types</li>
<li>Change the Content-Disposition header to use &#8220;inline&#8221; instead of &#8220;attachment&#8221; instead of just deleting the header (this seems to work with some browsers; a brief discussion on the differences is <a href="http://dotanything.wordpress.com/2008/05/30/content-disposition-attachment-vs-inline/" target="_blank">here</a>)</li>
<li>Fix the Content-Type header if the file name extension doesn&#8217;t map the MIME type the portal thinks it is</li>
<li>Do all this through a filter and a dynamically loadable varpack that allows different configurations based on the type of file being served.</li>
</ol>
<p>So while it&#8217;s a bit optimized in the sense that it only looks at responses being gatewayed through the portal, it&#8217;s still kind of a hack because personally, I think this should be an option in the portal in the first place rather than adding the additional overhead of a filter.</p>
<p>But, nonetheless, it seems to work well, and you can download the code <a href="http://portal.integryst.com/site/integryst.i/gateway/PTARGS_0_200_549_0_0_18/disposition.cs" target="_self">here</a> and the varPack file <a href="http://portal.integryst.com/site/integryst.i/gateway/PTARGS_0_200_548_0_0_18/integrystopener.xml" target="_self">here</a>.</p>
<p>If you&#8217;d like assistance with actually building and deploying this, or porting to Java &#8211; <a href="http://www.integryst.com/site/integryst.i/page/contact_us/206" target="_self">drop me a line</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/04/29/bug-blog-3-fix-broken-file-downloads-in-10gr3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replacing uploaded documents without breaking the URLs</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/03/01/replacing-uploaded-documents-without-breaking-the-urls/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/03/01/replacing-uploaded-documents-without-breaking-the-urls/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:46:18 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[cards]]></category>
		<category><![CDATA[document respository]]></category>
		<category><![CDATA[files]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=165</guid>
		<description><![CDATA[Ross Brodbeck has written some excellent posts on how the Document Repository works in the ALUI / Plumtree portal (which is still accurate in WebCenter Interaction 10gR3), so I won&#8217;t rehash those details here. Instead, I&#8217;ll give you a quick tip to answer what should be a relatively simple question: How do I replace an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hross.net/blog/" target="_blank">Ross Brodbeck</a> has written <a href="http://hross.net/blog/2007/06/deconstructing-the-document-re.html" target="_blank">some</a> <a href="http://hross.net/blog/2007/06/deconstructing-the-document-re-1.html" target="_blank">excellent</a> <a href="http://hross.net/blog/2007/06/deconstructing-the-document-re-2.html" target="_blank">posts</a> on how the Document Repository works in the ALUI / Plumtree portal (which is still accurate in WebCenter Interaction 10gR3), so I won&#8217;t rehash those details here.</p>
<p>Instead, I&#8217;ll give you a quick tip to answer what should be a relatively simple question: How do I replace an existing document that has been uploaded to the WCI Knowledge Directory? At first glance, it&#8217;d seem you should just upload a new document and delete the old one. The problem is, especially if your site is large or exposed publicly on the Internet, someone may have linked to the original URL. This URL contains the Object ID of the card in there, so the new file &#8211; even if it has the same name &#8211; will have a different link. This is even true, for the most part, with Friendly URLs that were introduced in ALUI 6.5 and expanded in WCI 10gR3.</p>
<p>The bad news is that there is no way through the UI to change the file itself; the good news it&#8217;s an easy file swap that can be done on the server containing the Document Repository. Just open the properties page for the file, and look at the &#8220;Document Upload DocID&#8221; field (and the &#8220;Document Upload Repository Server&#8221;). Then, take your new document, rename it exactly as shown in the properties, and put replace the file in that directory. In the example below, this file would need to be called &#8220;D004783E.ACT&#8221; in the DR folder at &#8220;documents/ptupload/active/F0080AF6/&#8221;:</p>
<p><img class="alignnone size-full wp-image-155" title="doc_properties" src="http://blog.integryst.com/webcenter-interaction/files/2010/02/doc_properties.PNG" alt="doc_properties" width="584" height="485" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/03/01/replacing-uploaded-documents-without-breaking-the-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Blog 2: Give the Guest user access to KD Root</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/02/17/bug-blog-2-give-the-guest-user-access-to-kd-root/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/02/17/bug-blog-2-give-the-guest-user-access-to-kd-root/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 02:48:27 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Bug]]></category>
		<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[Guest User]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=132</guid>
		<description><![CDATA[The Guest user in the Plumtree &#8211; and ALUI, and now WCI portal &#8211; is a mixed bag.  On the one hand, I usually advise my clients to never give this user &#8211; or the EVERYONE group &#8211; access to anything in your portal if you don&#8217;t want your information showing up somewhere it shouldn&#8217;t. [...]]]></description>
			<content:encoded><![CDATA[<p>The Guest user in the Plumtree &#8211; and ALUI, and now WCI portal &#8211; is a mixed bag.  On the one hand, I usually advise my clients to never give this user &#8211; or the EVERYONE group &#8211; access to anything in your portal if you don&#8217;t want your information showing up somewhere it shouldn&#8217;t.</p>
<p>On the other hand, this advice can bite you.  Have you ever gotten an &#8220;Error displaying Dropdown menu tabs&#8221; error in the nav bar when using the JS drop-down menus?</p>
<p><img class="alignnone size-full wp-image-133" title="error-displaying-dropdown" src="http://blog.integryst.com/webcenter-interaction/files/2010/02/error-displaying-dropdown.PNG" alt="error-displaying-dropdown" width="317" height="39" /></p>
<p>Well, in at least one case the problem is simple:  Give that EVERYONE (or at least the respective GUEST users) access to the root directory of your Knowledge Directory.  No need to give that user access to any cards or folders &#8211; just the root directory itself.  It seems the code in 10gR3 chokes if it can&#8217;t read this directory when trying to display the Directory drop-downs.  In fact, this is similar to <a href="http://blog.billbenac.com/blog/" target="_blank">Bill Benac&#8217;s </a>Bug about missing footers in 10gR3 <a href="http://blog.billbenac.com/blog/2009/08/clean-up-footers-before-runnin.html" target="_blank">breaking the page</a> (incidentally, I&#8217;ve run into the same problem with headers) &#8211; it seems 10gR3 isn&#8217;t quite as &#8220;forgiving&#8221; as previous versions were regarding error handling.</p>
<p>This quick fix should restore your menu:</p>
<p><img class="alignnone size-full wp-image-134" title="displaying-dropdown" src="http://blog.integryst.com/webcenter-interaction/files/2010/02/displaying-dropdown.PNG" alt="displaying-dropdown" width="474" height="53" /></p>
<p>&#8230; but there are other reasons you can run into this error.  I&#8217;ve got another post pending on some other root causes of this problem (spoiler alert: give SELECT privileges to the EVERYONE group for your headers!); in it I&#8217;ll offer some instructional advice on how to diagnose the root cause of problems like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/02/17/bug-blog-2-give-the-guest-user-access-to-kd-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opening Excel Documents from the WCI Knowledge Directory</title>
		<link>http://blog.integryst.com/webcenter-interaction/2010/02/14/opening-excel-documents-from-the-wci-knowledge-directory/</link>
		<comments>http://blog.integryst.com/webcenter-interaction/2010/02/14/opening-excel-documents-from-the-wci-knowledge-directory/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 15:19:41 +0000</pubDate>
		<dc:creator>Matt Chiste</dc:creator>
				<category><![CDATA[Knowledge Directory]]></category>
		<category><![CDATA[BigIP]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://blog.integryst.com/webcenter-interaction/?p=117</guid>
		<description><![CDATA[I had a client report this strange issue with Excel file handling in IE7 and IE8 (and Office 2007).  Basically, every time someone would open a document, it would get cached by IE.  But the next time the person would try to open the same document, they’d get a “file is locked by user” message.  [...]]]></description>
			<content:encoded><![CDATA[<p>I had a client report this strange issue with Excel file handling in IE7 and IE8 (and Office 2007).  Basically, every time someone would open a document, it would get cached by IE.  But the next time the person would try to open the same document, they’d get a “file is locked by user” message.  It seemed IE was caching the file in the Temporary Files folder, then when the user would click the link a second time there was a conflict between the existing file in that folder and the new one IE was trying to bring in.  I found some <a href="http://excel.tips.net/Pages/T003046_Ignoring_Other_Applications.html" target="_blank">articles</a> and <a href="http://www.tek-tips.com/viewthread.cfm?qid=749302" target="_blank">discussions</a> on the topic, but most came back to making changes on the client-side, which is never easy to do in an enterprise.  Even if it&#8217;s a little trickier to execute, you should always try to make changes on the WebCenter Portal side.</p>
<p>In this case, after downloading the Excel file the first time, I confirmed it was in my Temporary Internet Files folder:</p>
<p> <img class="alignnone size-full wp-image-118" title="Temp Files" src="http://blog.integryst.com/webcenter-interaction/files/2010/01/temp_files.PNG" alt="Temp Files" width="484" height="101" /></p>
<p>I was also able to verify that the portal was returning a &#8220;Not-Modified&#8221; header when the user tried to open this Excel document again:</p>
<p><img class="alignnone size-full wp-image-119" title="not-modified" src="http://blog.integryst.com/webcenter-interaction/files/2010/01/not-modified.PNG" alt="not-modified" width="685" height="226" /></p>
<p>The fix I applied here?  Another BigIP iRule that turns off caching of Excel files &#8211; after the jump.<span id="more-117"></span></p>
<p>The BigIP iRule is:</p>
<pre>if { [HTTP::header Content-Type] contains "ms-excel"} {
    HTTP::header replace "Expires" "-1"
    HTTP::header remove "ETag"
 }</pre>
<p>&#8230; and as you can see, the HTTP headers now make sure the content isn&#8217;t cached, which prevents Excel from failing when opening cached documents:</p>
<p><img class="alignnone size-full wp-image-121" title="No Cache" src="http://blog.integryst.com/webcenter-interaction/files/2010/02/no-cache.PNG" alt="No Cache" width="669" height="268" /></p>
<p>This fix doesn&#8217;t feel like the best approach, but it has worked for me.  Have you had this problem yourself?  Got a better resolution/workaround?  Let us know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.integryst.com/webcenter-interaction/2010/02/14/opening-excel-documents-from-the-wci-knowledge-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

