What would be the best way to generate differences between items(component content,folders etc) in 2 environments (Development and Testing) for a publication considering the blueprint structure is same.


I'll guess it depends on the kind of problem you're trying to solve.

If the environments must be the same but aren't, I would consider to make a database backup from one environment and restore it to the other environment. You might loose some information...

If the environments are different and you suspect a problem with (a few of) the differences, you can (manually) use the Search in the SDL Tridion UI to look for certain schema's or components.

If the differences are too much, you can use the CoreService to programmatically list all folders in the two environments and compare them. You can continue or extend this with Components, Schemas, et cetera.

| improve this answer | |
  • 1
    From 1 Core Service app running on your desktop (or any server) you can have configure it to point to both CMS systems, and then get lists of items per folder and compare the lists (date/time, etc) and also open a specific component and compare the XML or the source of the text (maybe using an online compare service...) – robrtc Aug 19 '13 at 14:47

You could use the content porter to export items from both environments, unzip the packages and compare the contents using winmerge.

However, be aware that some differences like creation times etc may not be relevant.

| improve this answer | |

If you're trying to do something like a diff between files, then you can do this by browsing Tridion via WebDAV using Windiff on multiple files.

| improve this answer | |
  • 2
    Good one, Nick! Be aware though that webdav does not expose all data, just a selection. E.g. only the binary data of a multimedia component, only the content of a template, et . – Quirijn Aug 19 '13 at 15:48


For an out-of-the-box way to compare items, searches and virtual folders are a quick way to see what's newer, compare counts, and get high-level differences. Nick also mentions WebDAV as another quick way to compare. If you use navigation based on a SDL Tridion-generated XML, you can easily compare that file to see Structure Group and page differences.

Get Details

Since you mentioned "generate," consider a Core Service script to get the details. There are plenty of examples online, but you'll basically want a recursive list of items, getting whatever details you want to compare. Be sure to save/output paths rather than tcm-ids.

For example, I'll use something like the following to grab folders for documentation. Add a parameter for "indent level" if you want nesting.

void GetSubOrgItems(OrganizationalItemItemsFilterData orgItemfilter, string tcmid)
    var orgItem = _core.Read(tcmid, DefaultReadOptions) as OrganizationalItemData;
    // do something with folder
    var subItem = _core.GetListXml(tcmid, orgItemfilter);
        foreach (XElement item in subItem.Nodes())
            var idAttribute = item.Attribute("ID");
            if (idAttribute == null) continue;
            GetSubOrgItems(orgItemfilter, idAttribute.Value);

Tip: I'd look at the Item Selector extension for good Core Service examples of recursing Tridion lists.


With your systems documented, I'd recommend then using your favorite "diff" tool. Up to you if you'd want to do it in code, but even Word works to get differences between text files.

| improve this answer | |
  • I am stuck at comparing the compoent xmls for finding out the differences. What would be the best way to compare the components xmls and pin point the differences leaving tcm id changes as those will always be different across environments. – Guest19876 Aug 23 '13 at 5:39
  • I'd say it depends on the use case, what will you do with the difference? If using a generic "XML diff" approach, you'll have to ignore the tcm id differences (or somehow configure it in the tool, if possible). You can always output just field names, though--it doesn't have to be XML. Otherwise I'd take Quirijn's suggestion to compare Content Porter packages, especially since they resolve managed IDs into paths afaik. – Alvin Reyes Aug 23 '13 at 14:55
  • We need to show the differences in a report which would ease which items needs to be ported. – Guest19876 Aug 28 '13 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.