IE9中的Magento网站,原型错误 [英] Magento sites in IE9, prototype bugs

查看:73
本文介绍了IE9中的Magento网站,原型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Internet Explorer 9已于今天发布,我决定检查过去几个月中我们建立的一些Magento网站,以查看一切是否都能在新版本上正常工作.

Internet Explorer 9 was released today, and I decided to check a few Magento sites we build in the last couple of months to see if everything continues to work with the new version.

但不幸的是,事实并非如此.我遇到了一个特别的问题,该问题是由Magento随附的原型库版本1.6.0.3引起的.

But unfortunately it doesn't. I came across one particular problem that is caused by the version of the prototype library which is shipped with Magento, version 1.6.0.3.

事件处理程序中的取消事件似乎不起作用.
例如,如果您尝试登录Magento商店,并且仅将登录名和密码字段保留为空,则IE9即使存在错误也将提交表单,并且错误在刷新后消失.
所以我认为这是一个很大的问题.

It looks like the cancelling events in eventhandlers isn't working.
For example, if you try to log in to a Magento shop, and just leave the login and password fields empty, IE9 submits the form even if there were errors, and the errors disappear after the refresh.
So that's quite a big problem I think.

所以我的问题是:我们如何处理这个问题?我看到了几种解决方法:

So my question is: how can we deal with this problem? I see a couple of ways to deal with this:

  • 等待Magento发布具有修复的新版本
  • 将原型库升级到可能已经解决了该问题的最新版本
  • 在现有库中四处走走,尝试修复其中的错误

等待一个新的Magento版本不是一个好主意,因为可能要花几个星期才能发布一个新版本,并且如果您运行的是非常旧的Magento版本,还会导致很多其他问题.
升级到最新的原型库可能是最好的主意,但是Magento中的所有内容都可以继续使用最新版本的原型吗,有人对此有任何经验吗?

Waiting for a new Magento release isn't a good idea because it probably will take a few weeks before there is one, and because it will cause a whole lot of other problems if you are running a very old version of Magento.
Upgrading to the latest prototype library is probably the best idea, but will everything in Magento continue to work with the latest version of prototype, does anybody has any experience with this?

那么每个人对这个问题有何看法? 除了我还有其他想法吗?

So what's everybody's opinion about this problem? Any ideas other than mine?

推荐答案

升级原型有可能破坏Magento的许多功能(老实说,在Magento中做任何事情都有潜力破坏了Magento的许多功能),我为自己的主题创建了一个主题覆盖

As upgrading Prototype has the potential to break a lot of things in Magento (and, honestly, doing anything in Magento has the potential to break a lot of things in Magento), I created a theme override for my

app/code/design/frontend/{package}/{theme}/template/page/html/head.phtml

文件,并将以下内容作为head标记下的第一个元素:

file and slapped the following as the first element under the head tag:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

这告诉IE尽可能假装是IE 8.这样就解决了一个问题,例如,如果仅启用一种付款方式,则您将无法签出并完成付款过程,因为在IE 9中,该字段将全部显示为灰色.

This tells IE to pretend as if it is IE 8, where possible. This solved an issue where, for example, you could not check out and complete the payment process if you only have one payment method enabled, as in IE 9 the fields will all be grayed out.

请注意,它实际上必须是<head>下的第一个标签.

Note that it really must be the first tag underneath the <head>.

由于以任何方式升级Magento都有可能引起问题,因此我认为这是在短期内解决该问题的最不具侵入性的方法.

Since upgrading Magento in any way has the potential to cause problems, I feel this is the least intrusive way to solve the issue in the near term.

这篇关于IE9中的Magento网站,原型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆