Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

JavaScript error - regionSelect? 
 
MazeDK
Member
 
Total Posts:  68
Joined:  2008-10-21
 

Hi,

I’m getting two JavasScript errors on my onepage checkout page. According to firebug it is the following:

sdfdsf is not defined
(?)()("shipping:country_id""shipping:region""shipping:region_id"[]undefined)index.ph...n/weee.js (linje 8954)
klass()index.ph...n/weee.js (linje 51)
(?)()
onepage (linje 435)
prototype/prototype.js,prototype/validat...nslate.js,mage/cookies.js,varien/weee.js


index
.ph...n/weee.js (linje 8954)
this.regionSelectEl is null
prototype
/prototype.js,prototype/validat...nslate.js,mage/cookies.js,varien/weee.js
index
.ph...n/weee.js (linje 8954)

I think the error is the reason why I have problems with the checkout process. Does anybody have a good idea to how I can find the error and fix it? I have triede reinstalling the packages via the Magento Connect manager, but without success. Sadly, I don’t know when the error occured, because I have first installed firebug today :( The theme is quite customized, so I have maybe made a mistake somewhere, but I don’t know where to search.

Thanks in forehand!

Regards,
Mads

P.S. Have tried searching the forum, but did not find anything similar to the errors…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nick Rigby
Member
 
Total Posts:  57
Joined:  2007-09-03
 

I had a problem with this not working too (not sure if it was the same JS error) and it was to do with the HTML structure, which I had modified. Compare your code to the default theme and check the HTML structure—if I remember correctly, my problem was because I had removed the “required” class from the span that is attached to the region label. Once I put that class back in, it worked perfectly.

This might not be your exact problem but it’s worth a try.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MazeDK
Member
 
Total Posts:  68
Joined:  2008-10-21
 
Nick Rigby - 22 February 2009 02:38 AM

I had a problem with this not working too (not sure if it was the same JS error) and it was to do with the HTML structure, which I had modified. Compare your code to the default theme and check the HTML structure—if I remember correctly, my problem was because I had removed the “required” class from the span that is attached to the region label. Once I put that class back in, it worked perfectly.

This might not be your exact problem but it’s worth a try.

Well, I will give it a go smile Do you have any idea of which files I should look in? All files in the Checkout folder, ord?

Thanks in forehand.

Regards,
Mads

 
Magento Community Magento Community
Magento Community
Magento Community
 
MazeDK
Member
 
Total Posts:  68
Joined:  2008-10-21
 

YES! Found one of the mistakes :D Now I only have this one left:

index.ph...n/weee.js (linje 8954)
this.regionSelectEl is null
prototype/prototype.js,prototype/validat...nslate.js,mage/cookies.js,varien/weee.js
index.ph...n/weee.js (linje 8954)

Back to searching! smile

Regards,
Mads

 
Magento Community Magento Community
Magento Community
Magento Community
 
MazeDK
Member
 
Total Posts:  68
Joined:  2008-10-21
 

Done! The last errors was in the shipping.phtml file, and the first one in login.phtml. The one in shipping was because I didn’t update the file, and the one in login was caused by a stupid mistake made by myself smile

Thanks a lot for your help!

Regards,
Mads

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