Magento: Firefox 4 Beta 8 Issue – JS Prototype Interpolate Function

Today I noticed that all of my local Magento installations kept throwing errors when ajax was happening. In the console, it was outputting:

uncaught exception: Error
port: location.port ? ':' + location.port : '' prototype.js (line 1336)

I couldn’t figure it out for a while. I found the method in prototype.js, logged the values, played around with it, and it all seemed like it should work fine. Then I threw a try catch around the issue and found this out:

TypeError: "#{protocol}//#{domain}#{port}".interpolate is not a function { message=""#{protocol}//#{domain}...olate is not a function", fileName="http://sisal.local/js/prototype/prototype.js", more...}

How could interpolate all of the sudden not be a function? I then realized that I had just upgraded Firefox to beta 8 late last week, so I tried my sites in Chrome and Safari, and it worked fine in both. So, it appears that there’s a bug in Firefox, or in the way Prototype is doing things if Firefox is using any new js technologies or something.

So, if you are using Firefox 4 Beta 8, be prepared to encounter this issue.

This entry was posted in Magento. Bookmark the permalink.

One Response to Magento: Firefox 4 Beta 8 Issue – JS Prototype Interpolate Function

  1. neb says:

    that is what could happen throught a GM script:
    Erreur : arr.in_array is not a function
    Fichier source : file:///C:/Documents%20and%20Settings/Lo/Application%20Data/Mozilla/Firefox/Profiles/w7g8263w.default/gm_scripts/silent_stats/silent_stats.user.js

    in_array() is a prototype function designed for an array object and use to worked.