Magento1 Feefo小部件js与prototype.js发生冲突

时间:2019-02-11 08:43:12

标签: php magento widget conflict

我想在我的网站上显示Feefo Carousal小部件。为此,我生成了小部件代码,并尝试在我的magento 1.9网站上添加。但是Feefo小部件JS与prototype.js发生冲突,并在控制台中引发了以下错误,

错误1

feefo-widget.js:53 Uncaught TypeError: Array.prototype.map callback must be a function
    at Array.map (feefo-widget.js:53)
    at Array.toArray (prototype.js:1002)
    at t.exports (feefo-widget.js:48)
    at Object.<anonymous> (feefo-widget.js:41)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:41)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:48)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:48)
map @ feefo-widget.js:53
toArray @ prototype.js:1002
t.exports @ feefo-widget.js:48
(anonymous) @ feefo-widget.js:41
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:41
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:48
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:48
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:53
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:1

错误2

enter code here
feefo.js:8 Uncaught ReferenceError: feefoWidget is not defined
    at HTMLScriptElement.feefoWidgetScript.onload (feefo.js:8)

请帮助我解决此问题?我已经尝试过,但是没有找到解决方案。

1 个答案:

答案 0 :(得分:0)

Feefo的官方回应是升级原型

https://support.feefo.com/support/solutions/articles/8000062222-can-feefo-widgets-be-used-on-protype-websites-

  

使用Prototype JavaScript Framework 1.7.3的网站上支持Feefo集成小部件和轮播。

     

使用Prototype JavaScript Framework早期版本的网站可能会遇到无法预料的行为,因此我们建议您升级到最新版本。

http://prototypejs.org/

显然,这可能会引起更多问题,但它可能会解决

有一个扩展程序可能会完成工作

https://github.com/leytech/Leytech_PrototypeUpdate

我还没有亲自测试过它,但是仔细查看了似乎可行的代码。