In the latest version of the Networked Planet TMCore EPiServer Module (henceforth TEM); we moved away from the model of using EPiServer page IDs to instead use a dynamically generated GUID.

EPiServer Module 1.x

In TEM 1.x each topic that represented in a page in EPiServer would have a subject identifier which was composed of a prefix (typically http://www.networkedplanet.com/2005/01/episerver/np-gen-psi/ followed by the integer ID of the page that this topic represented. The advantages of this system were:

  • The ID was persistent in EPiServer, so there were no concerns with the ID changing within an EPiServer installation.
  • The subject identifier of the topic could be easily derived from the page (just add the prefix), and vice versa.

Unfortunately this system also carried a penalty. If page data was exported from EPiServer and then migrated to a new EPiServer installation, a new ID would be assigned, usually different from the old id. This means that the link between the page and the topic was broken. In short, moving page data around between servers was very difficult and we felt we had to address this in the 2.0 release of the TEM.

EPiServer Module 2.0

In TEM 2.0 we require the definition a new dynamic property to EPiServer which is a GUID, or Globally Unique IDentifier. The GUID is then used, in combination with a prefix urn:guid:, to construct the subject identifier of the topic representing the page.

The result of this is that the GUID property of the page is unchanged throughout the life of the page, and is preserved through export operations. This therefore allows EPiServer administrators to export page data, export the XTM from TMCore and then import in to new systems and the system will work as expected.

The EPiServer page ID can still be derived from the a topic via an occurrence value on the topic, typed by the Page ID occurrence type topic, by default this a topic with the subject identifier http://www.networkedplanet.com/2005/01/episerver/pageid.

Pitfalls

Of course, nothing ever comes for free, there are few ill-considered things you can do to EPiServer which will cause problems with this new system.

The most serious of these is to delete the dynamic property from EPiServer. This causes all GUID values of pages to be destroyed. These values are unfortunately unrecoverable.

Manually setting the GUID is also unwise, not only do you risk setting the GUID to a value which will potentially clash with another page ID, but also you will put the page GUID out of sync with the topic GUID. This means that you must either:

  1. Manually set the GUID subject identifier on the topic to match the changed page GUID; or
  2. Run the TEM consistency checker which will create a new topic for the page, based on the new GUID. However, this will leave the old topic hanging around in the system, along with all its associations which may cause confusion.