cm sql -sql "select distinct documentType_
from Resources
where documentType_ in ('CMALXPageList', 'CMP13NSearch', 'CMSegment', 'CMSelectionRules', 'CMUserProfile', 'ESDynamicList')
order by id_"
Handle Missing Adaptive Personalization Content Types when Upgrading to CoreMedia Content Cloud 13
Learn how to handle missing content types when upgrading to CoreMedia Content Cloud 13
What you will learn
- Learn options for missing content types when upgrading to CoreMedia Content Cloud 13
Prerequisites
- CoreMedia Blueprint
Target Audience
In the CoreMedia Content Cloud 13 Blueprint, the extensions and content types related to the Adaptive Personalization feature have been removed from the Blueprint by default. Adaptive Personalization is deprecated and has been replaced by Native Personalization.
If you have used content types of the removed extensions in your actual CMCC version, you will need to handle the missing content items during the upgrade process to CMCC v13. Otherwise, the Content Server will detect the mismatch between the missing content types and the existing content items, and won’t start in order to prevent any harm to the content repository. Even just the imported Blueprint demo content causes this behavior.
Removed Extensions
The following extensions have been removed from the Blueprint in CoreMedia Content Cloud 13:
-
p13n -
alx-p13n -
lc-p13n -
sfmc-p13n -
sfmc-es-p13n
Removed Content Types
With the extensions, the following content types have been removed from the Blueprint in CoreMedia Content Cloud 13:
-
CMSelectionRules -
CMSegment -
CMP13NSearch -
CMUserProfile -
CMALXPageList -
ESDynamicList
Problem and Solutions
When you have used the removed content types, you will have entries for the content items of those types in your content servers' databases. When the content types are not part of your content type definitions, the Content Server startup will fail. You have the following options to handle this problem:
-
Remove all content items with the deprecated type from the repository before starting the Content Server without the type definitions.
-
Reactivate the removed extensions and content types.
-
Only add the missing content types to the content type definition and keep the extensions deactivated. This will allow you to start the Content Server and to handle the existing content, but you won’t be able to use the Adaptive Personalization features.
Which solution works best depends on your use case. If you have used the removed content types and want to continue, you should use the second option. If you have only imported the Blueprint demo content or want to switch to Native Personalization, you can safely remove all content items with the deprecated type from the repository before starting the Content Server.
The third option is worth considering only if you want to avoid the effort of removing the content types from the repository. This will clutter your repository and content type definitions with superfluous content. But it might be useful as a temporary solution to get the system up and running and to have the time to clean up the content repository later.
Removing the Content Types from the Repository
How to handle this issue depends on whether you are a CMCC Service or a CMCC Self-Managed customer.
CMCC-Service Customer
When you are a CMCC-Service customer, the CoreMedia team will support you during the migration process.
In general, if you have affected content types currently in use, you have two options: either clean up the content by removing the respective content items and all links to them, or keep the doctypes by re-adding the extensions that were removed with CMCC v13 (or by adding only the required content types, as described above).
For Development Sandboxes, it is recommended to export the content, start with the new CMCC version and an empty content repository, and import the content again. For the removed content types, the import will fail and your content is clean afterwards.
For Production and Pre-Production environments, the CoreMedia Services team will reach out to you during the migration process in case you have the affected content types currently in use and provide a list of content items which would need to be removed. You can then decide together with the CoreMedia team how to proceed. If you want to keep the content items, you can add the removed extensions again (or just add the required content types, see above) and start the system without removing the content items. You can then decide together with the CoreMedia team how to handle the content items in the long term.
CMCC Self-Managed Customer
In case you are a on-premise user, you have to take care of removing the content items from the database by yourself. You can use the following SQL query to find all content items that are using the removed content types:
-
Check if the content types are used in the content repository using the sql command line tool:
When there are content items, continue with the following steps and repeat them until all content items are removed:
-
Run
cm cleanrecyclebinandcm cleanversionsto remove all deleted content items from the repository and to remove old versions:cms-cm cleanrecyclebin -u admin -b yyyyMMddHHmmss cms-cm cleanversions -u admin -kd 0 -t / -
Run the following query to get all content items that are using the removed content types:
cms-cm query -u admin -cq "TYPE CMALXPageList OR TYPE CMP13NSearch OR TYPE CMSegment OR TYPE CMSelectionRules OR TYPE CMUserProfile OR TYPE ESDynamicList" -
Now run the following SQL query to get all content items of the removed types that are linked by other content items:
cms-cm sql -sql "select sourceDocument, sourceVersion, propertyName, targetDocument from Resources r1, LinkLists, Resources r2 where r1.documentType_ in ('CMALXPageList', 'CMP13NSearch', 'CMSegment', 'CMSelectionRules', 'CMUserProfile', 'ESDynamicList') and r2.documentType_ not in ('CMALXPageList', 'CMP13NSearch', 'CMSegment', 'CMSelectionRules', 'CMUserProfile', 'ESDynamicList') and r1.id_=targetDocument and r2.latestVersion_=sourceVersion and r2.id_=sourceDocument order by sourceDocument, sourceVersion, propertyName, targetDocument" -
Also check for links on the MLS by running the same query on the MLS database.
-
Now you have to do some manual work:
-
First remove all links of content items to the to be removed content items and publish the content items again. Use the results of the query in step 3.
If links originate from `EditorPreferences`content items, you might be able to simply delete the preferences content item, if the editor aggrees.
-
Then withdraw all content items of the removed content types and delete them. Use the results of the query in step 2.
-
-
Continue with step 1 until you find no content items of the removed content types anymore.
Reactivate the Removed Extensions and Content Types
In order to enable the extensions again, run the following command in the Blueprint workspace:
mvn extensions:sync -Denable=p13n,alx-p13n,lc-p13n,sfmc-p13n,sfmc-es-p13n