I just discovered on my site using magento 1.3.2.2 that on a bundled product, when adding different options the price does not change in internet explorer. It works fine in all other browsers however.
In internet explorer I get the error message.
Message: Object doesn't support this property or method
Line: 34
Char: 9
Code: 0
URI: /skin/frontend/my_new_interface/design2/js/bundle.js
So I checked out line 34 and found
parts = selection.id.split('-');
I verified that selection.id is a string. I'm not a javascript expert and I'm not familiar with prototype.
On a lark I decided to split up the line as:
var parts = selection.id;
parts = part.split('-');
Well that fixed the problem. Furthermore I went back and just reduced to:
var parts = selection.id.split('-');
Which still worked as well. I don't think this is a file I should be messing with though. I'm assuming this javascript class should work fine in ie without me having to change anything.
I'm hoping someone has an idea of why this might have fixed the problem or what I can do to find out what the real problem is. Do you see any problem with me leaving this fix the way it is?
It's very possible that you hit an ID in the other case that didn't exist, and therefore it was attempting to split an undefined variable. If the fix works for you, stick with it, but you may want to consider upgrading your Magento installation. The series is onto 1.4 now, and there are huge numbers of fixes in every release.
Hope that helps!
Thanks,
Joe
Related
I'm using vis.js library to graphically display a network. I read the documentation and I need to use the hierarchical layout. It works fine until I use the sortMethod='directed' option. In this case I end up with a blank page. There's no Javascript error. Every other options combination works fine, but I need the directed option. I followed the documentation and it doesn't seem that I need to add further information to the network: it should all work with the 'from' and 'to' edges properties. What could it be?
Thank you all.
It seems to be a bug. I have been using this feature for months and suddenly it stopped working. I get the same behaviour as the one you describe. All options seem to work except the sortMethod='directed'. I cannot tell for sure which version introduced this bug but I found it out at 4.12.0.
We probably need to raise an issue to let their dev team know about it.
Hope that helps. It is not exactly a solution to your issue but rather a verification of this bug since I have the same issue.
EDIT:
I tried both 4.11.0 and 4.10.0
4.11.0 : I get the same buggy behaviour.
4.10.0 : Works as expected. No issues.
H ey there,
I am developing small web-application based on a lot of PHP and JS code and by chance opened the current index.php in Firefox instead of Chrome (my main dev browser).
I was rather shocked to see that one of my main components, a chart (made with amCharts), was not rendered at all. Strangely enough, the watermark of amCharts is shown...
Now I thought it just a hickup and opened the IE to have another browser for comparison, however, same problem there.
I went back to Chrome and everything is still fine there. This really confused me and made me think that it's a code problem, e.g. an unclosed parenthesis somewhere. So I copy pasted my code into several PHP / JS / HTML validators and none had any hits.
In addition I downloaded the Firebug addon for Firefox hoping to find some kind of error, but there is none to be found.
What I also tried to inserting some "console.log" passages in my code to see whether the code execution stops at some point, no luck either. All log messages are shown with their correct values.
Right now I am kinda at my wits end...
Does anyone have an idea / had a similar problem and knows how to solve this or what causes this or how I could find out what causes this?
Any help you can provide would be greatly appreciated.
best regards,
daZza
EDIT:
I fine-tuned the console.log commands and basically backtraced every single step. I now have found the problem, but don't know the source of it. Basically my whole view of logic in programming is breaking apart now... One and the same command returns a different result in another browser, what the hell?!
Here's are some code snippets from the problem area:
xmlData = xmlHttp.responseXML;
var x=xmlData.getElementsByTagName("row");
xmlRowCount = x.length;
console.log("Rowcount: " + xmlRowCount);
for (i=0;i<xmlRowCount;i++)
{
do something with every row in the source xml file
}
Now the problem is that in Chrome the rowcount is correctly returned as 417. FF returns 0 (I guess IE as well).
How can that be possible? How can a predefined command return different values? I just don't get it...
Edit2: To make the browser test complete, I also downloaded and tested Opera. It works fine there, which makes this whole thing even stranger. What is the difference between IE/FF vs. Chrome/Opera?
PS: Here's two screenshots (Chrome and FF) to visualize the problem:
Can you try to use the below code
var x=xmlData.body.all.tags("row");
or
var x=xmlData.all.tags("row");
Hope it helps.
I have the strangest issue I have probably ever seen in coding. I use phpMyAdmin (in this case version 3.5.2.2). For 6 months everything has worked as I have always experienced with phpMyAdmin. But just in the last week, certain features stopped working, like inline editing and auto submit after selecting a dropdown.
There have been no changes in the code.
There have been no changes in the environment.
There have been no changes in the browser.
It is so weird. But just like that certain functions (which I imagine are JavaScript functions) stopped working.
I tried updating to version 4.1.13, but that brought a whole other weird issue in that it will load the page, but it is just a white screen. Sure you'd assume it is a PHP or environment error. My initial thought too. But when I view the source, it actually renders a full set of HTML, but displays none of it.
While the 4.1.13 was a weird issue, my main objective is just to get inline editing and dropdown features restored.
I do get three weird console errors but all my searching has produced nothing:
Uncaught SyntaxError: Unexpected token ILLEGALUncaught ReferenceError: PMA_getImage is not definedevent.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Any suggestions on where to look? I have spent hours trying myself and finally turning to you guys.
I think I figured this out. 3 Steps. I guess I should mention that I was trying to do phpMyAdmin over SSL.
Step 1 - Config
ADD: $cfg['ForceSSL'] = true
Step 2 - /js/get_image.js.php
In the very last line there is a blank link. Mine is around line 137. Comment it out with //
Step 3 - /js/functions.js
Search for 'jsversioncheck' - mine was around line 100 in a mimified line of code
Put that function on it's own line and then comment it out. You will lose the ability to have an automated message about most recent phpMyAdmin versions. But frankly, I'll take the SSL over that message any day.
Ultimately I think the issue JavaScript features failing (like inline edit and dropdown select) is that JavaScript itself was failing after bugs that were unrelated to the feature. These bugs were related to doing phpMyAdmin over SSL - which suprises me significantly that more people don't do and that this issue seems to be relatively unreported.
Hopefully this helps.
This has been asked already, but the solution there did not help me. What does this mean exactly? My regular HTML page uses a "script" tag to load my main_script.js file, where the first thing I do is:
var internetExplorerSucks = 30;
The variable used be be called FPS, but I thought it might have been taken by some random default global, so I renamed it to something that obviously isn't already taken. Still it fails to work. I get this error in the IE debug console:
SCRIPT5039: Redeclaration of const property
main_script.js, line 1 character 1
I tried making it a global by taking out "var", still didn't work. It should be noted that this is not in any function, just literally the first line of code in the file.
Some background: All of this code works perfectly in Chrome, Firefox, and Safari on Windows, OS X and Linux. IE is the only browser this does not work on. This project involves using an HTML5 canvas, which I got to at least display in IE 9 (I am using version 9), but this code does not immediately pertain to the canvas at all. In fact, I cannot seem to declare any variables whatsoever in my main_script.js file. I am able to, however, create functions without running into an error. Is that what I have to do? Put everything in a function (that would involve a lot of moving things around)?
Anyway, thanks for the help.
P.S. Internet Explorer is a nightmare.
I had the same problem in my code and it turn out that IE show wrong line were the redeclaration appear. In my case it was history I use later in the code. You should check whole code for redeclaration of the constants. You can try to comment out part of the code and see when it throw that error.
I have a script which appends a newly-created div to the body element onload. I need to keep a reference to that div throughout the application, so I store it in my main global object.
var oMyObj = {};
window.onload = function () {
oMyObj.eDiv = document.createElement("div");
document.getElementsByTagName("body")[0].appendChild(oMyObj.eDiv);
};
Nothing particularly ground-breaking, I'm sure you'll agree. Anyway, it worked absolutely fine until I started testing in IE9. All of a sudden I get an error message saying "オブジェクトの呼び出しが無効です" (I'm currently working in Japan), which sort of translates to "the object call was null/invalid". Not sure what the precise English version of the error message is.
Anyway, I searched and found (http://d.hatena.ne.jp/wang-zhi/20110503/1304361114 - sorry, also in Japanese) that it was due to the RealPlayer DivX plugin. After disabling the plugin, it worked fine. It also works fine if I use a meta tag to force IE9 to run as IE7. So it is not a major problem. But I would like to know if there is a "correct" way to do what I am trying to do so that it will work in IE9 as IE9. I can only assume that what I am doing now is not what I'm supposed to be doing.
Any ideas?
Okay, well I have confirmation that it was the DivX (not RealPlayer; no idea why I mixed them up) Plugin causing the problem. The plugin overwrites some of the core DOM functionality, including appendChild, which seems insane to me, but whatever. DivX acknowledged the bug and are apparently going to fix it in the next update. Yay, I guess.