---
title: "Catch a removed template field in serialized Sitecore items"
description: "Two fields left a template. Each one is a file that is no longer there."
slug: "serialized-template-change-gate"
type: recipe
locale: en-US
canonical: "https://www.coremodels.io/recipe/sitecore/serialized-template-change-gate"
updatedAt: "2026-12-04T12:00:00+00:00"
last_updated: "2026-12-04T12:00:00+00:00"
---

# Catch a removed template field in serialized Sitecore items

Two fields left a template. Each one is a file that is no longer there.

Import your Sitecore content model once, then get pass or fail for each change, with the name of every field that breaks. Recorded with PLAY! Summit, the XM Cloud demo that Sitecore publishes.

- Tools: `create_project`, `import_vendor_project`, `audit_vendor_project` on https://go.coremodels.io/mcp-admin (can write, sign-in required)
- Example: PLAY! Summit, the XM Cloud demo that Sitecore publishes, https://github.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit
- Recorded: 2026-12-04

## What you get

You import your serialized templates once. After the next change, your assistant compares the new files with them and names each removed field and each changed type. The answer is a pass or a fail.

| What we did | What CoreModels answered | Time |
| --- | --- | --- |
| Imported the files of 11 October 2022 | 1 type in the model | 5 s |
| Audited the files of 18 October 2022 | **fail**: 2 errors (a field was removed) | 2 s |
| Audited the first files again | **pass**: 0 errors | 1 s |

Recorded on 4 December 2026 with PLAY! Summit, the XM Cloud demo that Sitecore publishes ([repository](https://github.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit)). In October 2022 its authors removed the fields `cssClass` and `position` from the template `FullImageSection`. Licence: MIT.

## What you need

- A CoreModels account with one project. Every plan starts with a 14-day free trial; a card is required to start.
- An assistant that can use MCP servers, for example Claude Code or Cursor.
- No Sitecore login. CoreModels reads files from public links.

## Run it

### 1. Connect your assistant

In Claude Code, run this command. Then sign in when it asks. This address can write to your projects, because an import creates a model.

```bash
claude mcp add --transport http coremodels https://go.coremodels.io/mcp-admin
```

Cursor, Claude Desktop and other clients: [connect guide](/mcp-server).

### 2. Import the version the site was built on

This is the content model of 11 October 2022, read from GitHub.

```text
Create a CoreModels project named "Sitecore example". Then call import_vendor_project on it with vendor "sitecore" and these links in artifactUrls (name: link):
FullImageSection.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection.yml
FullImageSection/Data.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data.yml
FullImageSection/Data/callToActionLink.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/callToActionLink.yml
FullImageSection/Data/content.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/content.yml
FullImageSection/Data/cssClass.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/cssClass.yml
FullImageSection/Data/position.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/position.yml
FullImageSection/Data/subtitle.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/subtitle.yml
FullImageSection/Data/title.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/db29097820d352763f4fc84148cecb5623b88f04/src/items/templates/PLAY/Legacy/FullImageSection/Data/title.yml
```

Your assistant calls `create_project`, then `import_vendor_project`. The answer we got:

`import_vendor_project (part of the answer)`

```json
{
  "success": true,
  "vendor": "sitecore",
  "datasetsAdded": 1,
  "nodesEnriched": 7,
  "errors": []
}
```

Your model has 1 type now. Each has its fields, with the type from Sitecore.

### 3. Audit the newer version

In October 2022 its authors removed the fields `cssClass` and `position` from the template `FullImageSection`.

```text
Now call audit_vendor_project on the same project with vendor "sitecore" and the newer files in artifactUrls. Tell me the gate and list every Error:
FullImageSection.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection.yml
FullImageSection/Data.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection/Data.yml
FullImageSection/Data/callToActionLink.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection/Data/callToActionLink.yml
FullImageSection/Data/content.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection/Data/content.yml
FullImageSection/Data/subtitle.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection/Data/subtitle.yml
FullImageSection/Data/title.yml: https://raw.githubusercontent.com/Sitecore/Sitecore.Demo.XmCloud.PlaySummit/a4b0629614d27a3e62b6ce4b9f417003a1aa6914/src/items/templates/PLAY/Legacy/FullImageSection/Data/title.yml
```

Your assistant calls `audit_vendor_project`. The answer we got:

`audit_vendor_project (part of the answer)`

```json
{
  "gate": "fail",
  "errorCount": 2,
  "warningCount": 0,
  "findings": [
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "5954b01b-2adb-53d6-85ee-e8408d2cc2a4.position",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "5954b01b-2adb-53d6-85ee-e8408d2cc2a4.cssClass",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    }
  ]
}
```

An audit only reads. The model still holds the first version.

### 4. Check that the gate also passes

A check that always fails is of no use. Audit the first version again.

```text
Call audit_vendor_project again, this time with the first links. The gate must be pass.
```

Your assistant calls `audit_vendor_project`. The answer we got:

`audit_vendor_project (part of the answer)`

```json
{
  "gate": "pass",
  "errorCount": 0,
  "warningCount": 0
}
```

## Now with your own project

The YAML files of your templates from `dotnet sitecore ser pull`. Run this, then give your assistant the prompt.

```bash
dotnet sitecore ser pull
```

```text
Create a CoreModels project for our Sitecore content model. Import the serialized item files of our templates (src/items/templates/**/*.yml) with import_vendor_project, vendor "sitecore". Then audit the same files and show me the gate. Keep the project id: we will audit each later change against it.
```

## In a pull request

This command gives the same answer without an assistant. It needs `jq`, a project id and an API key from Settings, API Keys. It ends with an error when the gate is fail, so a pull request check stops.

```bash
find src/items/templates -name "*.yml" | while IFS= read -r f; do jq -n --arg n "$f" --rawfile t "$f" '{($n): ($t | ltrimstr("\ufeff"))}'; done |
  jq -s '{artifacts: add, failOn: "error"}' |
  curl -sS -X POST "https://go.coremodels.io/v1/$PROJECT_ID/integrations/sitecore/audit" -H "Authorization: Bearer $COREMODELS_KEY" -H "Content-Type: application/json" -d @- |
  jq -e '.data | .gate, (.findings[] | select(.severity == "Error") | .code + " " + .subject), (.gate == "pass")'
```

The service answers 200 also when the gate is fail. Read `gate`, as the command does. If the command prints `null`, no file was found at that path.

## What it does not do

- A template that is deleted is not reported. Its fields are no longer compared.
- The answer names a template by its item id and a field by its name.
- CoreModels reads the files you give it. It has no login to Sitecore and it writes nothing back.

[Start building](https://www.coremodels.io/start)

14-day free trial. Builder $49/mo after the trial. Cancel any time.

## Sitemap

- [Sitemap in markdown](https://www.coremodels.io/sitemap.md)
