Tag Archives: WoodWing Enterprise

WoodWing Enterprise – New features of Content Station 10

ContentStationLogo

Content Station 10 continues to evolve. The release at the end of July introduced a slew of ease of use and efficiency improvements and features to the HTML5 based tool. 

Included in the list are things like: 

  • Showing and hiding the Workflow Status of placed objects on InDesign layouts
  • Viewing of layouts in the ‘Spread View’
  • Text with a character style applied is displayed in that style
  • A new style panel for assigning styles in the text editor

You can learn more about these updates here.

As you may know Content Station is part of WoodWing Enterprise, a multi-channel content product system. You can learn more about Enterprise here or over at WoodWing.com

MacPorts and php53-apache2handler

Ok, this one slipped right by me. 

I was working on a project and added LDAP functionality to my PHP build and…. it the extension wasn’t loading! Blast!

Hmmm. After solving the problem I had I went back and did a little digging to figure out what the heck was going on. 

I checked Apache’s modules and noted that the libphp5.so file was from 2013. That told me that the php was not being compiled.

I discovered that I need to run this command in terminal, ‘php53-apache2handler’ after installing PHP 5.3. This then triggered the compile. 

It appears that the ‘php53’ port file doesn’t support the ‘+apache2’ command. Hence the need to run this command: 

sudo port install php53-apache2handler

In my case I had to remove this reference in the httpd.conf file: 

LoadModule php5_module modules/libphp5.so

and replace it with: 

LoadModule php5_module modules/mod_php53.so

Note that the command will also present you with the command to modify the httpd.conf file accordingly but will not remove the old reference. 

Guess I’m going to have to install from scratch at some point and document that. 

 

 



WoodWing Enterprise and Solr – a dead simple install of Solr

Solr is a great tool when installed in conjunction with Enterprise. Lightning fast searching, facets…good stuff.

I’ve hand installed Solr and Tomcat for years. Every now and then however, SOMETHING happens that blows up the installation of Solr/Tomcat.

I finally got tired of fixing it and thought to myself “MacPorts has all the other stuff that I need. Why not Solr?”

Here’s how to install Solr using MacPorts

Install Solr

Start up Terminal
Update MacPorts by entering: sudo port self update
Install Solr: sudo port install apache-solr3
(this is version 3.6.2 of solr)
MacPorts will do its thing. Note that the ‘Jetty’ is being installed instead of Tomcat.

Install the new schema and server config files

Download the files you need from the Community site. This is the ‘Enterprise Solr Integration’ file containing the ‘schema.xml’ file and the ‘solrconfig.xml’ file.
Navigate to here:
/opt/local/share/java/apache-solr-3.6.2/example/solr/conf
Backup the existing ‘schema.xml’ file and the ‘solrconfig.xml’ files and then replace them with the ones you downloaded.
Start Solr

Start Terminal
Type in the command: sudo solr3
Solr should start. To see if it is working navigate to this URL:

http://localhost:8983/solr/admin

Quitting Solr
In the Terminal window you started Solr in type ‘control-c’ where ‘control’ is the KEY on the keyboard and not the word.

Enterprise and Solr
Make sure to go into Enterprise’s ‘config_solr’ file and check the port that is entered at the top of the file. Make sure it matches the one that you are using with Solr.

If you have a pre-determined port you are using and the default doesn’t match the one you want to use then you’ll need to change the port that ‘Jetty’ is using.

Changing the Jetty Port

Navigate to this file:
/opt/local/share/java/apache-solr-3.6.2/example/etc/jetty.xml

Open the file in text editor

Search for ‘jetty.port’. This line should come up:


Name=”jetty.port” default=”8983″

Change the value of 8983 to the appropriate value

Save the file and restart Solr.

Mac OS X 10.6 – MacPorts installs and Drupal

Enterprise works very nicely as a production CMS that users of the system can use to ship content such as articles, images, videos and audios to Web sites (and other destinations for that matter).

If you have been looking at any of the bits that I have put up regarding MacPorts on my Mac you have a pretty good idea that the following is true (at last on my machine):

1. Standard Apache2 that ships with Mac OS X 10.6 is not used by me
2. Apache/PHP is installed on my machine and the installation location is: /opt/local
The ‘htdocs’ directory is at /opt/local/apache2/htdocs’

The problem with my dev environment is that I could not get Drupal to work when installed into the /opt/local/apache2/htdocs directory.

The admin page would work but digging deeper into the site would result in nodes displaying only raw code.

Ugh. Ugly. I got around it by installing Drupal into the standard Mac location but I wanted to install Drupal into my ‘/opt/local/apache2/htdocs’ directory.

How to accomplish this?

After much digging around I found that adding the following directive to the httpd.conf file addresses the situation:

<Directory “/opt/local/apache2/htdocs/drupal”>
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>
Drupal now works just fine.

Make sure to check your installation and settings for security, etc.

 

 

 

 

 

Mac OS X 10.6 – Setting up Apache 2.2 and SSL

Note that is part of another article that I have written. See here.

Mac OS X and SSL – Getting SSL running for Development purposes

Someone asked me the other day how to setup SSL on Mac OS X 10.6.

My answer: I have an idea but haven’t done it.

Here’s how I did it.

First of all, know that you need to have mod_ssl compiled with Apache 2.2 (in my case I have Apache/PHP installed via MacPorts. See here.) None of the steps below will be at all useful if mod_ssl is not installed.

Here are the resources that I used:

1. Apple write-up –

2. Macworld – Similiar to Apple write-up

There are two parts to this:

1. Creating the self-signed certificates and keys for mod_ssl and Apache to use

2. Configuring Apache to work with mod_ssl, the certificates and keys

================================

Self-signed certificates

================================

1. Create a directory on the Desktop called ‘KeyGen’

2. Start the Terminal application

3. In Terminal enter: cd ~/Desktop/KeyGen

4. The next step is to create a RSA Private key. The process will ask for a passphrase. During the process enter the passphrase and DON’T LOSE IT.

5. Create a RSA private key by using Terminal and entering: openssl genrsa -des3 -out server.key 1024

6. Create a Certificate Signing Request. This would normally go to a Certificate Authority.

In our case we are self-signing. The process of creating this request requires that you fill in information.

The most important bit of information to fill in is the ‘Common Name’.

This is the ‘Common Name’ of the server at THIS point in the process.

So, for instance, the ‘Common Name’ could be ‘127.0.0.1’ or it could be ‘localhost’. Those are distinct and unique names. Pick one, use it and remember that you used it.

I selected ‘127.0.0.1’.

7. To create the CSR enter into Terminal: openssl req -new -key server.key -out server.csr

8. Here’s the list of information that is requested:

Country Name (2 letter code) [AU]: (enter your country code here)

State or Province Name (full name) [Some-State]: (Enter your state here)

Locality Name (eg, city) []: (enter your city here)

Organization Name (eg, company) [Internet Widgits Pty Ltd]: (enter something here)

Organizational Unit Name (eg, section) []: (enter something here)

Common Name (eg, YOUR name) []: (this is the important one)

Email Address []: (your e-mail address)

Here is what I entered:

Country Name (2 letter code) [AU]:

USState or Province Name (full name) [Some-State]: MI

Locality Name (eg, city) []: Birmingham

Organization Name (eg, company) [Internet Widgits Pty Ltd]: My Company

Organizational Unit Name (eg, section) []: <<blank>>

Common Name (eg, YOUR name) []: 127.0.0.1

Email Address []: me@example.com


9. Now we need to create the Certificate Authority that will then allow us to sign the key.

In Terminal enter:
openssl genrsa -des3 -out ca.key 1024

Enter in a passphrase. I used the same one from above. If you use something different remember it.

10. Time to create the self-signed CA Certificate. You’ll be using the RSA key you just made.

In Terminal enter:

openssl req -new -x509 -days 365 -key ca.key -out ca.crt

NOW…you’ll be asked for the passphrase and then you’ll be asked to fill in some information…just like above.

This one is a bit different. The Common Name this time will be YOUR name and NOT the server name/ip address.

Country Name (2 letter code) [AU]:US

State or Province Name (full name) [Some-State]:MI

Locality Name (eg, city) []:Birmingham

Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company

Organizational Unit Name (eg, section) []:<<blank<>

Common Name (eg, YOUR name) []: My Name

Email Address []:me@example.com

11. Signing the server.key file with the ca.crt

As we have been progressing through the steps above files have been created in the directory we defined at the beginning of the steps…that is: ~/Desktop/KeyGen.

The next step is to sign the server.key with the ca.crt file.

We need a script to do this. That scripts name is ‘sign.sh’.

The script MIGHT be on your machine but I doubt it. So you need to go get it.

In my case I downloaded the source for mod_ssl for Apache 1.3 (Here: http://www.modssl.org/). Once the source was downloaded I looked into the following path: mod_ssl(version number)/pkg.contrib/sign.sh.

Copy the sign.sh file into the ‘KeyGen’ directory on your desktop.

Run the following command. The first will make the sign.sh file executable and the second will run the script and use the server.csr file.

In the Terminal App (don’t include the ‘Command 1:’ and ‘Command 2:’ text:

Command 1: chmod +x sign.sh

Command 2: ./sign.sh server.csr

A bunch of information will start to appear in the Terminal window.

Enter in your passphrase.

Sign the certificate by pressing the ‘y’ key.

Commit the changes by pressing ‘y’ when asked to.

================================

Setting up Apache 2.2

================================

In the above steps we created the keys and certificates necessary for using SSL with Apache.

The following is a very simple set of steps to get things running.

NOTE: NONE of this setup is for a PRODUCTION server.

1. Move the contents of the KeyGen directory into a accessible location.

My local setup looks something like ‘/opt/local/’ with ‘/opt/local/etc’

What I did is create a directory called ‘httpd’ in the ‘etc’ directory. I then added another directory inside of that called ‘ssl_key’. So the final path to where I stored things is: ‘/opt/local/etc/httpd/ssl_key/’

Copy the contents of the ‘KeyGen’ directory into ‘/opt/local/etc/httpd/ssl_key/’

2. Edit the httpd.conf file
In my case I did two very simple things:

a. Since I compiled Apache with mod_ssl I had the following line in my httpd.conf file: Include conf/extra/httpd-ssl.conf

Uncomment that line by removing the # in front of it.

b. Navigate to the following path: /opt/local/apache2/conf/extra/httpd-ssl.conf

Apache needs to know where the SSL cert is. Find this line: SSLCertificateFile. The default will be something like: SSLCertificateFile “/opt/local/apache2/conf/server.crt.

Change the path to match the location of your server .crt file. In my case the path is something like:
SSLCertificateFile “/opt/local/etc/httpd/ssl_key/server.crt”

We need to tell Apache to listen for SSL connections. Add the following line under the listen command: Listen 443

c. SSL Session CacheLastly we need to tell SSL where to cache session information.

Look for this directive: Inter-Process Session Cache

Change this line ‘SSLSessionCache “dbm:/opt/local/apache2/logs/ssl_scache” so that it is NOT commented out.

================================

Testing

================================

1. Starting and Stopping Apache2

a. Start: /opt/local/apache2/bin/apachectl -k start

b. Stop: /opt/local/apache2/bin/apachectl -k stop

c. Restart: /opt/local/apache2/bin/apachectl -k restart

2. Where to look for errors:Apache will log errors into the ‘error_log’ file located at ‘/opt/local/logs/apache2/error_log’

The only error that I ran into was this one: Invalid method in request

It had to do with the way that I had the .conf file setup. If you get that error take a look at the .conf files.

3. Hitting the server

a. After you have made your .conf file changes restart the server

b. Go to a browser and type in: http://127.0.0.1:443

c. You’ll get a request about the cert. Press ok.

d. You should see in the browser a little lock indicating that the browser is running in secure mode.

 

Mac OS X 10.6 – Installing ImageMagick and Ghostscript using Macports

Here is a bit information that I use in conjunction with my previous article about how to install Apache/PHP/MySQL using MacPorts. Remember to do the steps in the article noted above first.

In addition this post includes a bit of information on doing a brute force change to the ImageMagick plugin for Enterprise to get it to work with this combination. I should really just change the code but haven’t gotten around to that yet.

NOTE: There is one thing to keep in mind here. If you are using Enterprise and running the Server on Mac OS X for Production you should consider the SIPS plugin instead of ImageMagick.

ImageMagick and Ghostscript installation steps

Run the MacPorts ImageMagick install

sudo port install imagemagick

Run the MacPorts Ghostscript Install

sudo port install ghostscript

Once done these applications are installed at: /opt/local. This is IMPORTANT!

That’s all there is for installing ImageMagick and Ghostscript

If you want the ImageMagick plugin to work with this installation make the changes below. Remember that is my brute force method.

The ImageMagick Enterprise server plugin

Go to the ImageMagick Server Plugin located at: /server/plugins/ImageMagick

1. Open ‘ImageMagick.class.php

2. Find the line of code: self::setEnvironment();

3. Comment each line out. Should look like: //self::setEnvironment();

4. Find the function: getVersions().

5. In the function getVersions find the line: $output1 = shell_exec( “convert -version)

6. Change it to: $output1 = shell_exec( “/opt/local/bin/convert -version” );

7. Save.

8. Find the function: convertFile.

9. Comment out the line: $cmdline = “convert”;

10. Add the line: $cmdline = “/opt/local/bin/convert”

11. Go to the Admin area in your browser. Login and go to the Server Plugin page. Turn on the ImageMagick Server Plugin.

 

Mac OS X 10.6 – Installing Apache2/PHP/MySQL using MacPorts

This article will be broken down into the following:

1. Install Apache2/PHP5 using MacPorts (this article)

2. Install ImageMagick and GhostScript (see article here.)

3. Install Tomcat and Solr

4. Get the Apache2/PHP5 setup working with Komodo.

5. SSL and Apache (see article here)

——————————————————————–

Steps for installing Apache2/PHP5 + MySQL on a Snow Leopard machine using MacPorts.

——————————————————————–

In my job I do a lot of different things. Mostly software demonstrations but a bit of development here and there as well. The server part of the system that our company sells is built to run on Apache(or IIS), PHP and MySQL(or SQL Server or Oracle).

When Snow Leopard came out I was faced with a set of problems:

1. I needed Apache/PHP/MySQL installed on my machine

Well, you might ask, Mac OS X comes with all that goodness pre-installed doesn’t it?

The answer to that question is yes…but…there are some other conditions that need to be met:

 

a. The Apple-compiled versions of the software may not meet my needs either through the version installed or through, in the case of PHP, the additional modules that our application requires.

b. Apple updates to Mac OS X can and probably will blow out any changes that I might make to the stock build. That’s not good. I like to update my software.

 

What about using MAMP?

MAMP is a nice choice for development. Download, install and start. Easy. However, I don’t want to use MAMP if the machine is going to be used for Production. In my case I want to replicate the production environment as closely as possible.

So, how do we go about installing new builds of Apache2, PHP5.3 with MySQL support and all the PHP extension we need?

Use MacPorts.

There are 3 steps involved here:

1. Download and install the latest version of XCode

2. Download and install MacPorts

3. Use MacPorts to install the stuff we need.

——————————————————————–

Download and install the latest version of XCode

——————————————————————–

Note that this takes a bit of space on your machine.

This step cannot be avoided.

What is happening is that by installing XCode we are getting access to the compiler that MacPorts needs to be able to compile the stuff (Apache2, PHP, etc…) we are going to be installing.

1. Go to http://developer.apple.com

2. Download the latest version of XCode (comes as .dmg file that is quite large)

3. Install XCode by opening the .dmg file and running the installer. You don’t need to change any of the options that are selected.

——————————————————————–

Download and install MacPorts

——————————————————————–

1. Go to the MacPorts web site and download the latest MacPorts installer (a .dmg file) for Snow Leopard.

The web site address is: http://www.macports.org/install.php

There is a key point to note in the instructions. That is the point about the ‘selfupdate’ command. This command keeps the list of ‘portfiles’ on your machine up to date with the list of current ‘ports’ available.

After the installer is done go ahead and finish the installation.

Start the ‘Terminal’ application and type in:

sudo port -v selfupdate.

Press return. A request to enter a password will appear. Keep in mind that the ‘sudo’ command is overriding your standard privileges and allowing the Terminal command to act with your Administrator privileges.

MacPorts will update itself. Note that it writes out what it is doing in the Terminal window.

———————————-

Install PHP5

———————————-

In this step we are going to tell MacPorts to install PHP5 (at the time of this writing the version of PHP available via MacPorts is 5.3.2). This command will also install any dependencies that PHP5 needs. That includes, in this case, Apache2.

MacPorts will install, by default, into the /opt directory. That directory will be created at the root of your hard disk.

When you are ready enter the following commands into the Terminal window.

NOTE:

1. Each command is telling MacPorts to go out to a Internet location, download the necessary files to compile the app or extension and then perform the compile and install the app. Hence Internet access is required

2. Each command will list out what it is doing as it performs each step. Pay attention! Watch for errors.

3. It take some time to download and compile this stuff. Don’t get impatient.

—————————————————————————

Initial Terminal command to install PHP5

—————————————————————————

sudo port install php5

————————–

Install php5 MySQL support

————————–

sudo port install php5-mysql

sudo port install php5-sqlite

————————–

Install php5 support for other stuff. Your needs may vary.

————————–

sudo port install php5-sockets

sudo port install php5-mcrypt

sudo port install php5-mbstring

sudo port install php5-imagick

sudo port install php5-xdebug

sudo port install php5-xmlrpc

sudo port install php5-xsl

sudo port install php5-zip

sudo port install php5-soap

sudo port install php5-gd

sudo port install php5-exif

sudo port install php5-openssl

sudo port install php5-iconv

 

I wrote a little Javascript for Enterprise

One of our partners asked if Enterprise had a feature that allowed the user to check out all of the articles that were attached to a layout in one move.

Answer: No

BUT…we do have our friend javascript AND in addition to that we have ‘Before’ and ‘After’ Events for the Enterprise plugins

So, the script below can be used in one of two ways.

Add the script to the Script Panel in InDesign and when the user WANTS to check out all of the articles…use the script by running it.

Or it could be tied to ‘AfterOpenLayout’ event. This would check out all of the article every time a layout was checked out.

You decide.

//////////////////////////////////////////////////////////////////////////////
// Script: Checkout articles on layout
// Language: JavaScript
// Author: jag
// Company: WoodWing USA
// Date: 18 January 2010
//////////////////////////////////////////////////////////////////////////////
// Description: When this script is invoked it will check out all of the articles
// attached to the targeted layout
//////////////////////////////////////////////////////////////////////////////
try
{
// Identify the current document
var doc = app.documents.item(0);
// Access the document’s articles
var mas = doc.managedArticles;
//Count the number of managed articles
var countOfManagedArticles = doc.managedArticles.count();
if ( countOfManagedArticles > 0)
{
for( var i = 0; i < countOfManagedArticles; ++i)
{
var getTheMetaData = doc.managedArticles.item(i).checkOut();
}
}
} catch( e)
{
desc = e.description;
num = e.number;
alert( “Check out article script error ” + num + “: ” + desc );
}

Mac OS X 10.5 – Installing the latest version ImageMagick and Ghostscript using MacPorts

The caveat with this post is….I assume you know what the heck you are doing…

Download and install MacPorts

  1. Go to here: http://www.macports.org/install.php
  2. Download the Leopard (Universal) .dmg file
  3. Open the .dmg file and run the installer package.

MacPorts is command line application. There will not be any application installed directly into the /Applications directory

Make one modification to the MacPort config scripts

Macports installs itself into a directory called /opt and places a configuration file at this location: /opt/local/etc/macports/macports.conf

To make sure that both GhostScript and ImageMagick install into the correct directory so that Apache and PHP can use the applications we need to change this configuration file. Use either TextWrangler or Pico(terminal) to open this file.

Find the section of the file labeled:

# Set the directory in which to install ports
prefix /opt/local

Modify the file so that it reads:

# Set the directory in which to install ports
prefix /usr/local

Save and close the file.

Install ImageMagick

  1. Start Terminal
  2. Type into the terminal window: sudo port install ImageMagick
  3. MacPorts will grab the necessary pieces and compile, build and install ImageMagick into the following directory: /usr/local/

That’s it.

Install Ghostscript

  1. Start Terminal
  2. Type into the terminal window: suod port install ghostscript
  3. MacPorts will grab the necessary pieces and install ghostscript into the following directory: /usr/local/

Changing Issue Information in Enterprise

One of our customers was asking what the best practices were in moving assets from one scheduled issue to another. They were discussing moving layouts from issue to issue but I wanted to insure that they were prepared for using the multi-channel aspects of Enterprise.

Note that, of course, moving layouts around is easy to do…just not the best practice.

  1. Layouts can only be assigned to ONE issue. No more. Either a Print channel or Tablet Channel.
  2. All other object types such as Articles, Images, Video, etc can have ONE or MORE channel/issue combinations. These channels might include ‘Print’, ‘Tablet’, ‘Web’, ‘Facebook’.
  3. Layouts do NOT inherit the Issue of the Dossier they are in.
  4. Articles and Images WILL inherit the ‘print’ issue of the Dossier they are in.
  5. Articles and Images WILL inherit the issue of the layout they are attached to.
  6. Changing the Print issue that a dossier is assigned to WILL change the issue of the layout IF the Layout is in the same issue as the Dossier at the time of the change.
  7. If the Layout has a different Issue assignment than the Dossier then the Issue date of the layout will NOT change. The net result of this is that the ‘Issues’ column in the views will show multiple issues assigned for Articles, Images and other files.
  8. Changing the Issue of the layout will change the Issue of the attached articles and images.

Because of the above there are scenarios where a user could change the Issue of a layout in the ‘Properties’ dialog and depending on the view and filters applied in the Smart Connection palette the user may or may not see the layout (and attached objects).

The end result is that the ‘Dossiers’ should be moved between Issues and not Layouts.

Best Practices

  1. Consider Dossiers as the ‘article’ or ’section’ containers. Keep in mind that more than one layout/article can exist in a Dossier. When you start doing tablet production you may wish to have more dossier/layout combinations to help with navigation of content.
  2. Only change the Issue on a Dossier. Doing so will change the Issue on all the other objects such as layouts and articles. Following this suggestion will greatly simplify things.
  3. Use Content Station to change the Issue of the Dossier. This can be done in the Planning application by dragging the Dossier from one issue to another, by searching for the Dossier and invoking the ‘Properties’ dialog or by opening up a tab for the Dossier and using the ‘Dossier Properties’ dialog.

Examples

Example Enterprise configuration
Issue 1 -> August 20th (print channel)
Issue 2 -> Sept 4th (print channel)

We now want to ‘move’ the Dossier from ‘August 20th’ to ‘Sept 4th’.

Example 1 – Using the Planning App in Content Station

  1. Start Content Station and start the Planning app. The ‘August 20th’ and ‘Sept 4th’ issues should be listed on the left.
  2. Select the ‘Sept. 4th’ issue. The Dossier from ‘Example 1’ will be listed in the middle.
  3. Click, hold and drag the Dossier from the list in the middle to the ‘August 20th’ issue in the left hand panel. Let go of the Dossier when the ‘Issue’ listing ‘accepts’ the drag.

Result

In the planning app show the ‘issues’ column. The issue for all of the assets will be set back to Sept 4th.

Example 2 – Finding a Dossier and changing the Issue properties

  1. Start Content Station and log in. Start the ‘Search’ app. Set the popup values to the appropriate brand and current issue of the Dossier you want to change the issue on and set the ‘object type’ popup to ‘Dossier’
  2. Find the Dossier you want to change the issue on in the list.
  3. Select the Dossier and bring up the contextual menu. Select ‘Properties’.
  4. Find the ‘Publish In’ area. Select the new Issue from the list. Press Ok.

Result

The issue value will change for all the assets.

References
WoodWing Community Site