预览模式从旧的 dll 中读取
Preview mode reads from old dll
我已将我的文档类型别名从 authenticateWithNemid 更改为 authenticateToCreateProposal 并更改了与之相关的代码,当然还有我的 modelsBuilder 模型 (Dll模式)。对于查看者来说,页面上的一切都正常,但是当我尝试预览它时,我收到一条错误消息:
ContentTypeService failed to find a content type with alias "authenticateWithNemid" (old value) .. This usually indicates that the content cache is corrupt; the content cache has been rebuilt in an attempt to self-fix the issue.
但随后显示了我试图在我的 c# heper 中访问它的代码行 class。
public static IPublishedContent AuthenticateWithNemidPage =>
CreateProposalPage.FirstChild(c =>
c.IsDocumentType("authenticateToCreateProposal"));//(new value)
这怎么可能?!怎么回事?!
P.S:我不认为它是相关的,因为它试图读取错误的值,但由于它在错误中指出我已删除 umbraco.config 并再次重新发布整个站点并好吧,它没有帮助。
:哦
我发现了问题。正如我在描述中提到的,我已经更改了文档类型名称,显然页面内容仍然认为它来自旧类型,但在预览模式下找不到它。
我是怎么找到它的?
我试着逐个读取数据,也许我能找到抛出异常的部分。所以我写道:
var x=CreateProposalPage.Children();
我也遇到了同样的错误。所以我尝试发布子页面,然后问题就解决了!
我也有点惊讶,因为我删除了 Umbraco.config 并重新发布了整个网站。但显然重新发布并没有达到您的预期
我已将我的文档类型别名从 authenticateWithNemid 更改为 authenticateToCreateProposal 并更改了与之相关的代码,当然还有我的 modelsBuilder 模型 (Dll模式)。对于查看者来说,页面上的一切都正常,但是当我尝试预览它时,我收到一条错误消息:
ContentTypeService failed to find a content type with alias "authenticateWithNemid" (old value) .. This usually indicates that the content cache is corrupt; the content cache has been rebuilt in an attempt to self-fix the issue.
但随后显示了我试图在我的 c# heper 中访问它的代码行 class。
public static IPublishedContent AuthenticateWithNemidPage =>
CreateProposalPage.FirstChild(c =>
c.IsDocumentType("authenticateToCreateProposal"));//(new value)
这怎么可能?!怎么回事?!
P.S:我不认为它是相关的,因为它试图读取错误的值,但由于它在错误中指出我已删除 umbraco.config 并再次重新发布整个站点并好吧,它没有帮助。
:哦 我发现了问题。正如我在描述中提到的,我已经更改了文档类型名称,显然页面内容仍然认为它来自旧类型,但在预览模式下找不到它。
我是怎么找到它的?
我试着逐个读取数据,也许我能找到抛出异常的部分。所以我写道:
var x=CreateProposalPage.Children();
我也遇到了同样的错误。所以我尝试发布子页面,然后问题就解决了!
我也有点惊讶,因为我删除了 Umbraco.config 并重新发布了整个网站。但显然重新发布并没有达到您的预期