安装 Umbraco 4.7.1 后加载 javascript 时出错
我正在开发一个 umbraco 4.7.0 项目,并且已从 4.7.0 升级到 4.7.1
它在我的本地主机中工作得像一个魅力,但在临时服务器上安装它后遇到问题:
当我连接到 < strong>后端,我有 javascript 错误:“Jquery(xx).mask(...):函数不存在”并且任何按键都会执行 umbraco Save 函数。
umbraco 4.7.1 中使用 jquery mask 插件将日期掩码添加到属性选项卡中的发布日期。
Jquery mask 插件是 Umbraco 4.7.1 中的新功能,由“DateTimePicker.cs”包含 [ClientDependency(ClientDependencyType.Javascript, "MaskedInput/jquery.maskedinput-1.3.min.js", "UmbracoClient")]
请参阅: https://hg01.codeplex.com/umbraco/rev/d2304aa897d4
但是,即使我在临时服务器上删除 bin、umbraco 和 umbraco-client 文件夹并将其替换为从我的本地计算机(它可以工作的地方)来看,该错误仍然存在。
但如果我改变 <编译defaultLanguage =“c#”debug =“false”batch =“false”targetFramework =“4.0”> 到 <编译defaultLanguage =“c#”debug =“true”batch =“false”targetFramework =“4.0”>
在 web.config 中然后它就可以工作了...
有人明白发生了什么吗?我怎样才能使它与编译 debug=true 一起工作?
非常感
谢法布里斯
I'm working on an umbraco 4.7.0 project and I have upgrated from 4.7.0 to 4.7.1
It's worked like a charm in my localhost but I have a problem after installing it on the staging server :
When I connect to the backend, I have the javascript error : "Jquery(xx).mask(...) : function does not exist" and any key press execute the umbraco Save function.
The jquery mask plugin is used in umbraco 4.7.1 to add a date mask to the publish date in the property tab.
The Jquery mask plugin is new in Umbraco 4.7.1 and is being included by "DateTimePicker.cs" with [ClientDependency(ClientDependencyType.Javascript, "MaskedInput/jquery.maskedinput-1.3.min.js", "UmbracoClient")]
See : https://hg01.codeplex.com/umbraco/rev/d2304aa897d4
However, even if I delete on the Staging server the bin,umbraco and umbraco-client folders and replace them with the ones from my local computer (where it works) the bug is still here.
But if I change
< compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">
to
< compilation defaultLanguage="c#" debug="true" batch="false"targetFramework="4.0">
in the web.config THEN it works...
Does someone understand what happened ? How can I make it works with compilation debug=true ??
Thank you very much
Fabrice
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于没有人回答这个问题,我在 umbraco 论坛上提问:
http://our.umbraco.org/forum/getting-started/installing-umbraco/25196-Error-loading-javascript-after-installing-Umbraco-471
答案是:
“这要归咎于过时的客户端依赖项缓存(当您在 web.config 中设置 debug=“true” 时,此缓存会根据设计关闭)。尝试简单地清理客户端依赖项缓存文件夹的内容(默认情况下为 App_Data/ TEMP/客户端依赖项)。”
As nobody answered this question, I asked on the umbraco forum here :
http://our.umbraco.org/forum/getting-started/installing-umbraco/25196-Error-loading-javascript-after-installing-Umbraco-471
The answer is :
"it's the outdated client dependency cache to blame (when you set debug="true" in your web.config this cache is turned off by design). Try simply to clean the contents of the client dependency cache folder (by default it's App_Data/TEMP/ClientDependency)."