简体   繁体   English

无法在 null 参考 Umbraco 上执行运行时绑定

[英]Cannot perform runtime binding on a null reference Umbraco

Okay so I am completely stumped as to why I am getting this error.好的,所以我完全不知道为什么会收到此错误。 I am using umbraco CMS ver 7.5.14.我正在使用 umbraco CMS 版本 7.5.14。 Here is a screen shot of the error itself.这是错误本身的屏幕截图。

在此处输入图像描述

I have tried all of the obvious things that can cause this.我已经尝试了所有可能导致这种情况的明显事情。 I made sure my alias name was correct, I made sure there was content in that content node, and I tried clearing the cache.我确保我的别名是正确的,我确保该内容节点中有内容,并尝试清除缓存。 What's strange is we have a test site that has the same exact code and it works.奇怪的是,我们有一个测试站点,它具有完全相同的代码并且可以正常工作。 I am not sure when this broke but I have no idea what to do next and any help would be appreciated.我不确定这什么时候坏了,但我不知道下一步该怎么做,任何帮助都将不胜感激。 This is the block of code that the site breaks at这是网站中断的代码块

dynamic _CurrentPage = CurrentPage;
if (CurrentPage.DocumentTypeAlias == "morrellsProduct_Copy")
{
    _CurrentPage = CurrentPage.GetPropertyValue<IEnumerable<Umbraco.Web.Models.DynamicPublishedContent>>("copiedProduct").First();
} 

So apparently this was caused by us running the site on 2 separate servers.显然,这是由于我们在 2 台单独的服务器上运行该站点造成的。 The dev above me told me they figured out that much, but they never told me a solution for it.我上面的开发人员告诉我他们想出了这么多,但他们从来没有告诉我解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM