4

If we add new field in schema then it does not add up in the existing components which are already created in cms based on this schema, Unless we manually open and check-in each individual component.

what should be the best approach to fix it that whenever any new field is added to schema, all the components get updated with blank or default value at the same time. Only task should be to publish the items.

Does content porter has some feature to help in this case ?

4

When you opened your Schema to edit it, you got a notification indicating that your changes would not be updated in derived Components.

(in 2013 SP1 it mentions Changes to this Schema will affect all related items. together with a Show Where Used button, agreed this isn't as clear as it was stated in older versions, but I believe this is the least read message anyways, so no matter what it said, people just don't seem to be willing to read it).

Also the documentation you mentioned specified this with the following note:

Note: Existing items based on the Schema are not automatically updated. For example, if you remove a field from a Component Schema, Components based on that Schema that have a value set for the removed field will continue to contain that value. The value will only be removed when the Component is opened and saved, either in the Content Manager Explorer GUI or when using the Content Porter application.

To update all derived Components, you have to (manually) edit all those Components. On some changes, the UI will already try to fix your changes (like removing values for fields which are no longer in the Schema, or reordering fields according to the Schema), but I don't think a field rename is something that the UI can cater for (apart from the order there is no way of identifying which field you renamed).

So options you have are:

  1. Manually open all Components and fix the content.
  2. List item Write a (Core Service) script which will change the content of all affected Components

Last thing, which is not a real option perhaps, don't make the change, just change the description of the field in the Schema and leave the XML name as is.

4

To answer your question will content porter help, no it won't. The problem when you change field name, or add new field, is that tridion does validation against schema only when you open component from gui. If you renamed field, old values will be lost, so you will need to reenter them. If you want to preserve old values, you will need to use Core service for that. Via Core service you can extract entire old xml of component, map old values to new ones and update all components.

3

BINGO!! The Content Porter did it. So i had schema S1 and there are roughly 700 components based on S1, I had to add a new mandatory field in schema S1 with some default value as part of requirement change. Now it was not fair to say business authoring team that they need to open each existing 500 components manually to reflect this change. Content Porter does the job here; I export the 500 components and import back them to the same CMS and it does the job in minutes. All components got updated with the new field with specified default value.

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.