The article describes how to avoid Sitecore Content Serialization failure when pushing SPEAK items to a Sitecore instance.
Sitecore Content Serialization (SCS) requires that you push templates first when importing serialized SPEAK items into a Sitecore instance.
Be careful when restoring SPEAK items from scratch after the SPEAK root item with its descendants and SPEAK templates have been removed. If these items have been previously serialized, restoring them at this point will fail.
To make sure that you push the SPEAK templates before all items that depend on the templates, do the following:
{
"namespace": "Project",
"resources": ["*/*.json"],
"items": {
"includes": [
{
"name": "SPEAK_Templates",
"path": "/sitecore/client/Speak/Templates"
},
{
"name": "SPEAK_Layouts",
"path": "/sitecore/client/Speak/Layouts"
},
{
"name": "SPEAK_System",
"path": "/sitecore/client/Speak/System"
}
]
}
}
The same problem exists with SPEAK apps and their items, and the same solution can be used. In the Project.module.json file, move the SPEAK_APP_Templates node to the top of the list of SPEAK app items to push:
{
"namespace": "Project",
"resources": ["*/*.json"],
"items": {
"includes": [
{
"name": "SPEAK_APP_Templates",
"path": "/sitecore/client/Sitecore/Applications/Examples/OM/Templates",
"database": "core"
},
{
"name": "SPEAK_APP_ExistingOrders",
"path": "/sitecore/client/Sitecore/Applications/Examples/OM/Fake Data",
"database": "core"
},
{
"name": "SPEAK_APP_Pages",
"path": "/sitecore/client/Sitecore/Applications/Examples/OM/Pages",
"database": "core"
}
]
}
}