Archive for November, 2011

WebCenter Document Hit Counts

Tuesday, November 22nd, 2011

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 – regardless of how many times your Analytics collector dies:

SELECT     ptc.name, ptcs.CARDID, ptcs.POPULARITY, ptcs.HITCOUNT, ptcs.LASTHIT
FROM         PTCARDSTATISTICS ptcs, PTCARDS ptc
WHERE     (LASTHIT > GETDATE() - 30) AND (HITCOUNT > 0) and (ptcs.cardid = ptc.objectid)
ORDER BY HITCOUNT DESC

Interesting side note – 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.

Turn off SSL for WCI Configuration Manager

Friday, November 18th, 2011

Not happy with that extra click accepting the busted SSL certificate in the ALUI/WCI Configuration Manager? Yeah, me too – that’s like, 47 milliseconds a day of wasted time each day that I’ll never get back:

So, spend 47 seconds to activate HTTP by editing this value in %PT_HOME%\configmgr\2.0\settings\config\private.xml:

<setting name="EAS:httpEnabled">
<value xsi:type="xsd:boolean">true</value>
</setting>

Viola! You now don’t have to use SSL to access the configuration manager. In 1,000 days, your 47 second time investment of time will have paid off:

BTW, you should probably just set the “BEA AL Configuration Manager” service to manual to save a couple megamajigs of RAM – once things are set up you shouldn’t bother leaving the service running anyway.

Oh, and don’t bother wasting the additional 5 minutes trying to turn on Basic Authentication because you think all the cool kids are doing it. That janx don’t work:

<!-- Authentication type. Should be blank for none, and set to either "JAAS" or "BASIC" if enabled. -->
<setting name="EAS:authType">
<value xsi:type="xsd:string">BASIC</value>
</setting>
<!-- EAS:basicAuthUser = username of the sole user allowed to access this server. Note: This user is given the role EAS:name iff authtype == "BASIC" then this setting takes effect -->
<setting name="EAS:basicAuthUser">
<value xsi:type="xsd:string">user</value>
</setting>
<!-- EAS:basicAuthUser = password of the sole user allowed to access this server. Note: This user is given the role EAS:name iff authtype == "BASIC" then this setting takes effect -->
<setting name="EAS:basicAuthPassword">
<value xsi:type="xsd:string">password</value>
</setting>

Add SSL Certificate to Plumtree Publisher JRE

Tuesday, November 15th, 2011

Publisher has a configuration setting in content.properties that allows it to connect directly to the imageserver. Why? Well, the comment in the file describes it appropriately enough:


# JSComponents need to directly access the imageserver from the Publisher
# machine in order to obtain some configuration information. By default it uses
# the image server URL which is provided by the portal for portal end-users,
# but you may also specify an alternate image server URL to be tried first instead,
# such as in the case where the system topography prevents the Publisher
# from accessing that end-user URL.
#JSComponents.AlternateImageServerUrl=http://machinehost:port/imageserver

Problem is, it doesn’t seem to work for the diagnostic tool, and may not work when Publisher needs to load community-themes.txt (which it needs in order to provide the style sheet drop-down for header portlets). So Publisher still needs to connect to the image server – but if the image server is configured to only use SSL, you’re likely going to see an error like this:



Exception Message: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The solution – import the SSL certificate from the imageserver – is after the break.
(more…)

Viewing Experience Definition Debug Page

Saturday, November 12th, 2011

Recently we discussed the Experience Definition Debug page. It’s pretty straight-forward: turn on debug mode in Portal Administration, then click the “Show Debug Messages” link that shows up in the WCI header.

But, what if you’ve customized the portal navigation and aren’t using the out-of-the-box header bar? We’ve gotchya covered – there are actually three ways this can be done.

Add the Adaptive Tags to your own header
The following code comes from \imageserver \plumtree\portal \private\pagelayouts \basepagelayout.html. You can stick this code into any header (or footer, or portlet) to get the Debug link to show up, and it will only show up for the appropriate users.

    <pt:core.comment><!-- DCA - get the Rules Debug link; if we don't have access to the rules debug page, the variable won't exist --></pt:core.comment>
    <pt:ptdata.rulesdebugdata pt:id="rulesDebugLink" />
    <pt:logic.existexpr pt:data="rulesDebugLink" pt:key="canAccessRulesDebug"/>
    <pt:logic.if pt:expr="$canAccessRulesDebug">
        <pt:logic.iftrue>
            <pt:core.comment><!-- DCA - there should only be 1 --></pt:core.comment>
            <pt:logic.foreach pt:data="rulesDebugLink" pt:var="link">
                <li><pt:core.html pt:tag="a" target="_blank" href="$link.url"><pt:core.html pt:tag="img" src= "pt://images/plumtree/portal/private/img/icon_subportal_rule.gif" alt="$link.title"/></pt:core.html><pt:core.html pt:tag="a" target="_blank" href="$link.url"><pt:logic.value pt:value="$link.title"/></pt:core.html></li> &amp;nbsp;|
            </pt:logic.foreach>
        </pt:logic.iftrue>
    </pt:logic.if>

Access the URL
The debug Messages page is available at /portal /server.pt? open=space &name=RulesDebugMSGAS. You can just drop that URL in there and the browser should display the debug page if you have access.

Use the MemoryDebug space
Finally, the portal session object stores this information so that it can be accessed through the MemoryDebug page we’ve discussed before. Just flip your URL to /portal /server.pt /debug /memory and you’ll see something that’s a little less readable, but still a functional alternative to the above two methods:

One caveat to all of these methods is if you have Community-based rules. Because sometimes the debug page itself applies its own URL for the rules, in some cases that means you’re no longer in any communities, so that could mean you get a false-negative for that condition. Your mileage may vary.

Display an “Unsupported Browser” warning in Confluence 3.4

Wednesday, November 9th, 2011

As we continue to prepare for a Post-WCI world, you’ll see this blog starting to highlight other best-of-breed products and challenges we’ve overcome with them. Today’s post is related to the fact that Atlassian’s Confluence doesn’t support Internet Explorer 9 (in version 3.4), and how we addressed it with our client.

In analyzing our logs, fewer than 5% of our roughly 5,000 users were actually using IE9. And in our testing, most of the site worked with IE9, so we didn’t want to prevent these users from accessing the majority of the site. Finally, we didn’t want to send an email or put a message on the site that didn’t apply to the other 95% of users. The solution? A piece of Javascript in the header that would display a warning to only those users accessing the site with IE9:

(more…)

What Experience Definition is being applied?

Sunday, November 6th, 2011

In Plumtree they were called Subportals. In Aqualogic the name was changed to Experience Definitions, and they continued to evolve in WebCenter Interaction with the introduction of Adaptive Layouts.

Experience Definitions are useful constructs in the portal that allow you to customize the header/footer, navigation, and Adaptive Layouts based on Experience Rules – which can be applied based on the host IP, community, user/group, or user-agent header. So you can apply different rules based on any of those criteria and heavily customize the experience based on any of those conditions.

An useful feature that was introduced with Experience Definitions was the “Debug Mode”, which can be accessed from Administration -> Select Utility -> Portal Settings -> User Settings Manager:

When this option is selected, a new link for “Show Debug Messages” is shown in the standard topbar, or in the out-of-the-box Adaptive Layout:

From this link, you can see the “Rules Debugging Messages”, which explains each rule, whether it matched the condition, and how long the evaluation took:

There’s a WCI App For That 9: OpenerFilter (aka Office 2010 MIME Types)

Thursday, November 3rd, 2011

By now you’re probably tired of the Knowledge Directory saga related to opening KD documents in WebCenter Interaction, but it’s a pretty serious problem. I’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’t open properly because the original configuration file used non-specific MIME types.

You can view the original post for the source code and a description of how this filter works, but recently I’ve discovered that the MIME types in the original post should be updated for recent Office documents (.docx and .xlsx). Instead of “application/msword”, the config file should use the MIME types provided by Microsoft. Specifically, the configuration file for OpenerFilter should look more like the following:

<?xml version="1.0"?>
<IntegrystOpener>
 <default>
  <removeContentDisposition value="0" />
  <replaceContentDispositionWithInline value="1" />
  <fixContentType value="1" />
 </default>
 <extension-map>

  <doc value="application/msword" />
  <dot value="application/msword" />
  <dotx value="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
  <docx value="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
  <xlt value="application/vnd.ms-excel" />
  <xls value="application/vnd.ms-excel" />
  <xlst value="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
  <xlsx value="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />

  <pdf value="application/pdf" />
  <gif value="application/octet-stream" />
  <jpg value="application/octet-stream" />
  <png value="application/octet-stream" />

 </extension-map>
</IntegrystOpener>