Optimizely/Episerver CMS 11.20导入内容时出现对象引用异常,如何查询标识70725_133679对应的内容?
Absolutely! You can track down exactly what that 70725_133679 identifier refers to by running targeted SQL queries against your EPiServer database. Let's walk through how to do this, plus some context to help you debug the import error.
The 70725_133679 format in the error is almost certainly [ContentID]_[LanguageBranchID] — Episerver uses this pairing to reference specific language versions of content items during imports/exports.
First, let's find the basic details of the content item with ContentID 70725:
SELECT c.ContentID, c.Name, c.URLSegment, c.ContentGuid, ct.Name AS ContentTypeName, c.ParentID FROM tblContent c JOIN tblContentType ct ON c.ContentTypeID = ct.ContentTypeID WHERE c.ContentID = 70725;
This will tell you:
- The name and URL of the page/block
- What type of content it is (e.g., Standard Page, Article Block)
- Its parent content ID (so you can locate it in the content tree if needed)
Next, let's confirm which language the 133679 ID corresponds to:
SELECT LanguageID, Name AS LanguageName, LanguageCode FROM tblLanguageBranch WHERE LanguageID = 133679;
This will show you if it's a specific regional language (like en-US or sv-SE) that might be missing from your acceptance environment.
To see the specific version of the content that was exported, use this combined query:
SELECT c.ContentID, c.Name, ct.Name AS ContentTypeName, lb.LanguageCode, cv.Status, cv.StartPublish, cv.ContentLink FROM tblContent c JOIN tblContentType ct ON c.ContentTypeID = ct.ContentTypeID JOIN tblLanguageBranch lb ON lb.LanguageID = 133679 JOIN tblContentVersion cv ON cv.ContentID = c.ContentID AND cv.LanguageBranchID = lb.LanguageID WHERE c.ContentID = 70725 ORDER BY cv.Saved DESC;
This returns the most recently saved versions of that content in the specified language, which helps confirm what was included in the export.
Once you've identified the content item, the object reference error usually points to one of these issues:
- The content item depends on another item (like a block, media file, or parent page) that doesn't exist in your acceptance environment. Check the content's properties and child items for references to missing content.
- The language branch
133679isn't enabled in your acceptance environment. If that's the case, you'll need to add it in the Episerver admin UI before importing. - There's a custom property on the content type that's referencing a null value, which breaks during import. Review any custom code or properties associated with the content type.
A quick note: Always back up your database before running ad-hoc queries, especially against production environments.
内容的提问来源于stack exchange,提问作者Andvik

