Magento Forum

The good, the bad, the ugly about prototype.js 1.7 with Magento 1.4.2
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

So, kind of a long story…

Our users checking out with IE9 couldn’t select a credit card type.  So I found that prototype.js was the issue and needed to be updated to 1.7.  Easy enough, right?  After that, checkout worked great in IE9, but there were some side effects of the upgrade seen in the admin panel.  Images could not be uploaded to new items.  With a little research here in the forum, I found that changing some code in product.js easily fixed that problem.  But now I’ve found an issue that cannot be resolved with a quick search through the forums…

The latest issue:

In the admin panel, when adding an item and trying to choose its subcategories, the subcategories do not drop down from the anchor categories--instead, the + sign disappears and it would appear that the anchor category has no subcategories.

Does anyone know how to fix this?  The only fix I know of at the moment is to downgrade my prototype.js and product.js files and that would break my checkout again for IE9 users.

Any help is greatly appreciated!!

PS
We’ve made too many modifications to Magento 1.4.2 to simply upgrade to the latest and greatest, so that isn’t an option right now… I just need to fix what I have.  Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrBaseball34
Sr. Member
 
Total Posts:  164
Joined:  2011-06-07
 

Did you ever get an answer to this? We are having issues with IE8.

Internet Explorer8 gives me this error:

Object doesn’t support this property or method prototype.js Line 4081:
element.fireEvent(event.eventType, event);

How do I debug this to figure out what is causing it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

I ended up reverting back to prototype 1.6.0.3 and reverted any changes to product.js.  Then I just used the ‘bandaid’ fix by placing the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=8" /> in head.phtml (app/design/frontend/base/default/template/page/html/head.phtml) at line 27 ABOVE the title tag.  I guess you might want to make yours compatible with IE7?  So your meta tag would be:  <meta http-equiv="X-UA-Compatible" content="IE=7" /> Once you have the meta tag added (site cache and javascript cache flushed), go to your website and view the source to make sure it comes immediately after the head tag.  If there is something else, like script, above the tag, it won’t work.  I had a problem with Google Analytics script placed at the top, thanks to the application addon from CloudFlare (which I highly recommend, by the way).  So I removed that app addon in my CloudFlare account and just used Magento’s Google API for Analytics and that solved it for me.  The down side is that anyone using IE9 doesn’t get to see all my fancy CSS3, just the stripped down IE8 version--but at least checkout works for them, so I’m happy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pdubb
Jr. Member
 
Total Posts:  10
Joined:  2010-12-22
 

I used the Best Standards code in the .htaccess file on my server. Fixed all issues with prototype being out of date.
When i changed my prototype to the new updated file, I couldn’t do certain things in the backend of my website so I had to revert back also.

This code should solve most peoples problems with certain elements not working properly on the website in IE9. This code basically takes whatever version of IE is being used (IE7, IE8, IE9) and uses the IE8 standards to display and view the website.

Put in .htaccess folder in the root of your server

#########################################
##Prototype.js run in IEcomp mode

BrowserMatch MSIE best-standards-support
Header set X
-UA-Compatible IE=8 env=best-standards-support

Hope this helps.

P

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrgoodfox
Member
 
Avatar
Total Posts:  69
Joined:  2009-05-11
Dallas, TX
 
stevewasnick - 23 January 2012 08:39 AM

I ended up reverting back to prototype 1.6.0.3 and reverted any changes to product.js.  Then I just used the ‘bandaid’ fix by placing the meta tag: <meta http-equiv="X-UA-Compatible" content="IE=8" /> in head.phtml (app/design/frontend/base/default/template/page/html/head.phtml) at line 27 ABOVE the title tag.  I guess you might want to make yours compatible with IE7?  So your meta tag would be:  <meta http-equiv="X-UA-Compatible" content="IE=7" /> Once you have the meta tag added (site cache and javascript cache flushed), go to your website and view the source to make sure it comes immediately after the head tag.  If there is something else, like script, above the tag, it won’t work.  I had a problem with Google Analytics script placed at the top, thanks to the application addon from CloudFlare (which I highly recommend, by the way).  So I removed that app addon in my CloudFlare account and just used Magento’s Google API for Analytics and that solved it for me.  The down side is that anyone using IE9 doesn’t get to see all my fancy CSS3, just the stripped down IE8 version--but at least checkout works for them, so I’m happy.

Adding the code to head.phtml took the error away but the objects on our page that uses Prototype stopped working

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

I finally found a fix that seems to work.  I’ve got the change on my dev site right now, I plan to do a lot more testing, but so far so good.

Here is the solution:

1. Download prototype.js 1.7 and rename it (prototype-front.js was the suggested name, so I named it the same).

2. Place it in the same directory as prototype.js--do not remove your current version of prototype.js, this is what the admin will use.

3. Open page.xml and change the link to point to prototype-front.js instead of prototype.js

4. Flush the cache and refresh all cache types.  Then test it out.

Here is the link to the solution I found, if you are curious:

http://www.linkedin.com/groups/In-IE-9-checkout-sometimes-2083430.S.107313763

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

Although, this caused some issues with ie8 for me.  So I put this at the very top of my external javascript links on page.xml and it has fixed the issues for me.  Still testing, however, but thought I would post before I forget for a year wink

<action method="addItem"><type>js</type><name>prototype/prototype.js</name><params/><if>lte IE 8</if></action>

 
Magento Community Magento Community
Magento Community
Magento Community
 
iresqkeith
Jr. Member
 
Total Posts:  18
Joined:  2010-10-22
 
stevewasnick - 12 March 2013 11:48 AM

Although, this caused some issues with ie8 for me.  So I put this at the very top of my external javascript links on page.xml and it has fixed the issues for me.  Still testing, however, but thought I would post before I forget for a year wink

<action method="addItem"><type>js</type><name>prototype/prototype.js</name><params/><if>lte IE 8</if></action>

Are you sure it is “Ite IE 8” and not “It IE 8” in there?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

I did lte IE 8 because I needed all IE versions up to and including 8 to use the old prototype.js and ignore using prototype-front.js.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

I have a new problem that may or may not be related to prototype 1.7.  The problem is with FireFox version 20 and version 20.0.1.  My javascript seems to be ignored completely by the latest version of FireFox.  My users can’t register because the State dropdown doesn’t work, and the top links are not displaying at all.  If anyone is aware of this issue and has a solution, please let me know!

PS
My version of FF 20 has javascript enabled, so it should be working.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattilathehun77
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-07-15
Minneapolis, MN
 

Solution here: http://www.magentocommerce.com/boards/viewthread/346698/

 
Magento Community Magento Community
Magento Community
Magento Community
 
iresqkeith
Jr. Member
 
Total Posts:  18
Joined:  2010-10-22
 

Here is another solution that worked for me regarding the Firefox 20.0.0 for OS X and 20.0.1 for Windows:
http://www.magentocommerce.com/boards/viewthread/347447/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top