Posts Tagged ‘Publisher’

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…)

Bug Blog 12: ALUI Publisher Doesn’t Work in IE9

Wednesday, June 1st, 2011

Now that we’ve picked on Plumtree Studio for a while, let’s direct our attention back to WCI Publisher for a moment, shall we?

If you are one of the 2.9% of the general population (as of April, IE9′s first full month on the market) that use Internet Explorer 9, and also use AquaLogic Publisher – a product that dates back to the Plumtree days and is in dire need of another upgrade – you’ve no doubt noticed it no longer works in IE9:

HTTP Status 404 – /ptcs/
——————————————————————————–
type Status report
message /ptcs/
description The requested resource (/ptcs/) is not available.
——————————————————————————–
Apache Tomcat/5.0.30

Why? Hell if I know. Seriously, I have no idea. Publisher’s Javascript code is some of the most convoluted I’ve seen in a while.

But, all is not lost! I spent (way) too much time with Internet Explorer’s Developer Tools, comparing IE8 and IE9 URLs and stepping through Javascript on each to tease out what the difference was between the two of them. I found that when IE9 breaks, the URL doesn’t have a CID – it shows something like:

http://portal.integryst.com/ site/integryst.i/gateway /PTARGS_0_200_347_0_0_43 /http%3B/localhost%3B7087 /ptcs/navigate.jsp

… instead of:

http://portal.integryst.com/ site/integryst.i/gateway /PTARGS_0_200_347_0_0_43 /http%3B/localhost%3B7087 /ptcs/navigate.jsp? cid=e35977c1-2df0-417d-abd9-3c3f5f56657b&fbr=1306030533426

But, the problem seems to occur in JavaScript way before the URL is actually generated in Javascript. Specifically, I kept seeing this exception when stepping through the Publisher script:

While I don’t profess to have delved into the depths that is Publisher Javascript insanity, it was clear that this line caused the page to mis-fire and show the above error.

The fix? Open up \imageserver\imageserver\plumtree\content\private\js\hablador.js and change this:

SessionVars.prototype.toString = function() {
	return this.staticVars.toString();
}

… to this:

SessionVars.prototype.toString = function() {
	try {
		return this.staticVars.toString();
	}
	catch (err) {}
}

That way, whatever crazy error it is that happens in this third level of hell doesn’t burn the rest of the code that generates the proper URL. Net result: Plumtree Publisher lives for another day in Internet Explorer 9.

Configure Publisher To Use A Network Share

Thursday, January 6th, 2011

In many larger Plumtree / WCI Publisher installations, you will have 1 “full” instance of Publisher used for authoring content, and one or more “zombie” (really, that’s what they call it in the configs!) instances serving up that content. 

See Bill Benac’s excellent diagram on this type of configuration.  Often, you’d have the publishing component of Publisher write to a network share, then use the zombie instances to proxy the content itself, or have the zombie instances redirect to a different web server configured to serve up the files.  Why two different approaches?  See this article I wrote back in ’08 for why proxying isn’t always ideal after an upgrade.

Anyway, in some instances, even with just one Publisher instance, you may want to publish to a network share, and don’t want to bother with configuring an additional Web Server to serve up that content.  In those cases, you can easily change Publisher’s own embedded Web Server (technically, it’s JBoss) to serve up this content.  Just perform the following steps:

  1. Set the Publisher Service to run as a user that has full access to the network share.
  2. Update your Publishing and Browsing targets in Publisher Explorer to use the correct paths.
  3. Update the %ALUI_HOME%\ptcs\6.5\container\deploy\jbossweb-tomcat50.sar\server.xml file, specifying your network share here:

That way, when the portal attempts to load published content via http://wci-publisher:7087/publishedcontent/, the portal will be connecting to the JBoss instance running Publisher, but the files will be coming from the network share.

Sorting News Articles in ALUI Publisher

Thursday, October 14th, 2010

Out of the box, WebCenter Interaction Publisher has a News portlet template that allows Content Managers to create News Articles, and display them in a summary portlet with a link to see the entire list of articles.  The articles themselves are:

  1. stored as Content Items under the -article_path-/ Articles folder,
  2. created based on the templates in /Portlet Templates/ _NEWS/ en/, and
  3. rendered by the “Main Page” (the portlet itself showing the top n articles) and “Index” (the list of all news articles when the user clicks “more”) Presentation Templates.

The problem is, the articles are listed based on when they were published, not when they were created or modified.  Which doesn’t make sense all the time – what if someone goes in and publishes the entire folder?  You’d end up with all news items showing up on the same day.  The fix here is to update the two Presentation Templates mentioned above to sort and display on when the “article” Content Items were modified, not published.

What you may not know is that when a user creates a portlet from a Publisher template (such as the one in /Portlet Templates/ _NEWS/ en/), Publisher creates a COPY of ALL OBJECTS into the new Publisher folder the Content Manager specifies when creating it.  The implication here is that you not only need to apply these fixes to the Content Item TEMPLATES in Publisher, but also each individual News Portlet independently.  (Or, you could use something like PublisherManager, but that’s another story entirely).

However you do it, the changes that need to be made can be found after the break. (more…)

Bug Blog 7: ALUI Publisher Port already in use?

Sunday, September 12th, 2010

This (configuration) bug has been around in Publisher for a while, and I’ve always fixed it the “wrong” way. Occasionally, you may have seen the following error crop up in %PT_HOME%\ptcs\6.x\logs\service.log when starting ALI Publisher, and Publisher fails to start:

INFO | jvm 1 | 2010/07/20 16:59:07 | 16:59:07,450 ERROR Starting failed jboss:service=Naming
INFO | jvm 1 | 2010/07/20 16:59:07 | java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
INFO | jvm 1 | 2010/07/20 16:59:07 | java.net.BindException: Address already in use: JVM_Bind

Why? Well, Publisher uses some internal JNDI services to communicate between components (I think; honestly I have no idea what this port is actually for), and if it can’t grab the port at startup, it can’t start up. Wonderful. This port has always been specified in %PT_HOME%\ptcs\6.x\settings\config\container.conf:

## [JBOSS] JNDI SERVICE
plumtree.container.jboss.jndi.port=10099
plumtree.container.jboss.jndi.rmi.port=1098

… and I’ve always fixed this problem by changing that port number and re-starting (as I write this blog, the WebCenter Interaction portal you’re reading this site on has a value of 1097 in there, indicating that at some point long ago I had this problem and fixed it this way).

Recently, though, I got a great explanation from Naman Shah at PPC: this has to do with Ephemeral Ports in Windows. The description in that article says it all:

What is not immediately evident is that when a connection is established that the client side of the connection uses a port number. Unless a client program explicitly requests a specific port number, the port number used is an ephemeral port number. Ephemeral ports are temporary ports assigned by a machine’s IP stack, and are assigned from a designated range of ports for this purpose.

In other words, Publisher can’t start because Windows is already using that port for one reason or another. So, now I know the “right” way to fix this issue: rather than playing whack-a-mole changing Publisher’s port every time the problem occurs, you should simply tell Windows not to use that port.

How? In the registry, navigate to HKLM\ SYSTEM\ CurrentControlSet\ Services\ Tcpip\ Parameters\, and add or change a line to the Multi-String value called ReservedPorts. Add in 1098-1098 on its own line, and Windows will stop using that port in the future, allowing Publisher to keep doin’ what it’s doin’.

Publisher JavaScript/JSpell Problems? Fix ‘em here.

Sunday, May 23rd, 2010

Ah, Plumtree Publisher.  We had a good run; I’ve loved you, I’ve hated you.  I’ve even tried to throw you a bone by developing a better editor to replace your terrible WYSIWYG editor in AquaLogic Publisher 6.5, and a utility to replacing glaringly absent features. But I mean, c’mon, it’s like you don’t even try any more.

If you, dear reader, have written similar missives to the oft-maligned Publisher editor, this tip is for you.  Specifically, if you’re getting JavaScript errors in various Publisher administrative pages and it seems hopelessly broken, chances are the problems are with the new jSpell spellchecker (you’ll see file names like jspellSettings_UTF-8.js in the IE error window):

This problem typically occurs when you have multiple experience definitions and are accessing your WebCenter portal with different base URLs.  The reason is that Publisher creates absolute URLs to the spell checker JavaScript files, and the portal’s link transformation seems to be broken by creating the wrong base URLs for the gateway (more on this another time; I can only rant about one thing at a time…).  Consequently, Internet Explorer refuses to run the Javascript when it’s being executed from a different base URL.

(more…)

There’s A WCI App For That 2: PublisherManager

Friday, May 7th, 2010

You’ve read about Integryst’s PublisherEditor.  You’ve seen the video and read the product page.  The product continues to evolve, and is still the best WYSIWYG editor for AquaLogic / WebCenter Publisher on the market.  This post, though, is about an additional utility that comes included with PublisherEditor, called PublisherManager.

Articles have been written about finding published content URLs and changing publishing targets, but to date there hasn’t been a safe way to do a global search and replace of text in Content Items and Presentation Templates, or generate a report on publishing targets.  PublisherManager fills that void with a clean UI and the ability to download a report as a CSV so you can identify :

PublisherManager and PublisherEditor work with WebCenter Interaction 6.0 – 10.3.0.1, and AquaLogic Publisher 6.1 – 6.5. 

Interested in a demo?  Drop me a line.

When was that PAGE modified?

Sunday, March 21st, 2010

Years ago, I had a requirement to add “Content Last Modified” text to ALUI portal pages being served as a public web site. When a portlet was updated, this text needed to automatically update and be displayed inline for each Published Content Announcement portlet. Of course, this is pretty straight-forward; we just needed to insert the following tag into the Publisher Presentation Template:

<div align=right>
  Item last published on
  <pcs:value expr="modified" format="MM/dd/yy">
  </pcs:value>
</div>

The problem is, the portal isn’t a web site – it treats each portlet as an individual component on the page, so users aren’t really looking at the “page last modified” date, they’re looking at the “content item last modified” date. Get two Publisher portlets on the same page, and it looks a little weird with the “Last Published” date associated with the portlet showing up in the middle of the page: 

Recently, I came across a similar requirement for “Content Last Modified” text, but we wanted to avoid the text showing up more than once on pages with more than one portlet. The trick? Hit that “read” link.

(more…)

Create name-value pairs in Publisher

Tuesday, March 9th, 2010

AquaLogic Publisher has a reasonably powerful scripting language for creating dynamic HTML files in the WebCenter Interaction portal.  After you define a Data Entry Template and Presentation Template, you can create Content Items to use those templates and render whatever HTML you want – or any other text-based file, like RSS (login required).

Data Entry Templates can contain fields of many types, such as text, rich text, numbers, dates, and selection lists.  But one thing it doesn’t have is the ability to create “name-value” pairs.  For example, recently I had a list of government agencies and I wanted to use the acronym for that agency in some places, and the full text in others.  I could force users to type in the text in two different fields or even provide them with two different selection lists, but since an acronym can only mean one agency, it would be easier to include both in a single drop-down list.  Drop-down lists, however, only allow plain text in them, and I needed a way to map the acronym to the agency.

So, I used the “substring” function in Presentation Templates to “fake” this.  Basically, for each item in the selection list, I allocated 10 characters to the acronym itself; the 11th character was the start of the full agency name.  In the drop-down list for the Content Items, the extra spaces are ignored and the user simply selects the agency:

publisher-content-item

… but in the Presentation Template, we use the “substring” method to grab the first 10 characters for the acronym, and anything after that for the name:

publisher-presentation-template

Agency Acronym: <pcs:value expr="substring(project.department,0,10)">
</pcs:value>
Agency Name: <pcs:value expr="substring(project.department,10)"&gt;
</pcs:value>

In this way, once published, the Content Items allow all sorts of fancy displays; in my case I used Javascript to dynamically display and filter a table based on the various agencies by name, but used the acronymn in the table itself:

publisher-published-content

There’s A WCI App For That 1: PublisherEditor

Thursday, February 25th, 2010

Special thanks to Fabien Sanglier for giving me the idea for the title of this blog feature (where’d he come up with such a catchy line!?).  Indeed, the WCI Portal has a ton of APIs that allow extensions and customizations, and there are dozens of products, code samples, and utilities that have been developed using them; if you can dream it, there no doubt IS an app for that.  The trick is finding it.

I’ll use this feature to showcase some of ‘em (admittedly, in a somewhat self-serving way).  Most will be products I’m offering or interesting throwaway apps Integryst has developed to share some ideas with you, but I am on the lookout for cool apps created by others to feature here as well.

Today’s feature is PublisherEditor 3.1, a product I’ve written over the past year that includes many features not available in the out-of-the-box Publisher Content Item Editor, resolving common issues with the out-of-the-box version of Publisher such as:

  1. Pasting content from Microsoft Word is possible without corrupting the styles
  2. Check-outs, saves, check-ins, and publishing are performed in one click, and all version history capabilities that Publisher provides are still available
  3. Styles in the rich editor are the same as the page, so there’s no guess-work on what the content will look like when it’s published
  4. Dynamically define styles, fonts, and sizes as you deem appropriate to prevent “style sprawl”
  5. Page anchor links can be created and won’t be broken on save/checkin
  6. Users don’t have to go from the HTML editor to the rich text editor to actually save content (a Publisher 6.5 bug)
  7. Images can be uploaded and actually viewed in the editor; gatewaying, relative links, and adaptive tags such as pt://images aren’t broken.
  8. Adaptive tags are not broken and are actually enhanced (rather than seeing XML you see formatted text)
  9. The HTML DOM won’t be corrupted when you’re updating the HTML
  10. Previews can be viewed in-line on the actual page the item will appear on
  11. Link to other communities, pages, and portlets by selecting them in a simple dialog box – no more copying links!
  12. Easily upload and link to files/documents for quick inclusion in the item
  13. In-line spell checker like Microsoft Word
  14. Browse existing images and files and quickly link to them
  15. Automatically refresh portlet caches so publishing items results in the content actually being updated
  16. Search, Replace, and more!

Take a look at the below video for more information, hit up the product page, and contact me if you’d like a Live Demo!