Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Upon testing my site in IE (7&8), I realised that the maps aren't working - the controls appear (though somewhat mangled) and the map area is the right size, but the 'map' part is blank...
IE spits out an 'Unspecified error' for line 599, char 208 of openlayers.js.
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#55 | openlayers_ie8.png | 35.84 KB | BWPanda |
#32 | openlayers-ie-load-event-609092.patch | 1.31 KB | zzolo |
#3 | openlayers-609092-3.patch | 259 bytes | BWPanda |
Comments
Comment #1
BWPanda CreditAttribution: BWPanda commentedCould be related to this: http://reganbj.blogspot.com/2009/08/more-open-layers-frustrations.html?
Comment #2
BWPanda CreditAttribution: BWPanda commentedUpdate: Just tested in IE6 - same problem.
Also, my pngfix images work properly on all pages except those with a map. IE mustn't be reading any scripts after the problem one.
Not sure if that helps fix it or not...
Comment #3
BWPanda CreditAttribution: BWPanda commentedHere's a hacky patch I made. It works (maps now visible in IE) but I'm sure there are problems with it...
Hopefully a step in the right direction to getting this fixed properly ;)
Comment #4
tmcw CreditAttribution: tmcw commentedHi BWPanda,
Check out this book page, which talks about the problem you're likely having. I just backported a fix/workaround (the closest we have to a clean fix) in the Openlayers 1.x branch, so try updating to a nightly and see if that helps at all. The workaround you came up with does battle the problem, but makes the Drupal Behaviors framework we use in 2.x and 0.x impossible.
Comment #5
spydmobile CreditAttribution: spydmobile commentedI did CVS update this am and I still have this probem.
Strange tho becuase when I go and look at openlayers demos on the openlayers site I see them with no problems, also I can go to Alans page here:
http://sandbox.zzolo.org/openlayers-views-example
And it works fine, but there is no google involved in this demo.
This is happening to IE on my site with the latest OL Module.
It is not theme related. Older versions of the module DO NOT have this problem.
Ok, so to be clear, you mention a workaround, but it does not seem to be helping me if it is in the latest dev.
Can we repoen this?
Comment #6
spydmobile CreditAttribution: spydmobile commentedOk, Complex.
First, this issue: http://drupal.org/node/478238 was part of the problem. I had to disable the fivestar module, to be able to get the map to render. Now it renders, but errors out on adding behaviours to the map.
it stalls out on this line in openlayers/js/openlayers.js line 681: error: Expected Identifier
if you cancel the error, it will keep on rendering.
Comment #7
phayes CreditAttribution: phayes commentedComment #8
tmcw CreditAttribution: tmcw commentedReopening.
Comment #9
phayes CreditAttribution: phayes commentedAlright.
Fullscreen functionality:
- I've done a fix on the fullscreen behavior. http://drupal.org/cvs?commit=280986 . Now works perfectly in chrome, IE8.
- Half-works in IE7. Goes fullscreen, but z-index is buggy. I tried to debug but I give up. *#^$& internet explorer.
- Does not work in ie6, but doesn't break map either. I'm not even going to bother trying to fix this one.
General Map Functionality:
Seems to work fine in all browsers except ie6. ie6 works haphazardly - eg. works fine with WMS, works fine with Virtual Earth, half works with google (gphysical works, gsat, map and hybrid do not).
Do we want to support IE6? My inclination is to say "no, but willing to accept patches" - what are other's opinions?
Comment #10
phayes CreditAttribution: phayes commentedIf anyone runs into any specific IE issues please post them here with whatever map config you have set up. I realize that my testing above was less than exhaustive, so any more cases of IE breaking should be reported here. I am leaving this issue open for now.
Comment #11
zzolo CreditAttribution: zzolo commentedI would definitely say "no" on supporting IE6. I am so done with supporting IE6 for any projects where I am able to make that decision. It just isn't worth the time anymore. I think if we specifically stop support, then we need to put something on the project page. Patches are always welcome.
Please note that I don't have any consistent way to test IE, so I cannot really help out either way.
Comment #12
phayes CreditAttribution: phayes commentedSince maps are working in IE for everything I've been able to test, marking priority as normal, and needs review (ie more testing).
Comment #13
spydmobile CreditAttribution: spydmobile commentedI have made a simple preset in my module
I then applied this template to my simple custom content type
when I view the node or I edit/create a node
The map fails to render in IE giving an error Invalid Argument line 597: Pointing to code in the openlayers.js from openlayers.org
breaking on the second line
module looks like so:
Comment #14
spydmobile CreditAttribution: spydmobile commentedI disabled the theme I was using and lo and behold the map rendered.
The theme is Pixture Reloaded and it uses the suckerfish or superfish menu for javascript menus. I am pretty sure that this is part of the problem and may be why some folks have the issue and some dont, I think that its related to drop down menus and IE crap....
Working around this problem by setting the theme to something simple with little or no javascript.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedI've been struggling with this issue all day today. I've stripped all the javascript from my theme and disabled all modules that add javascript. Only OpenLayers is adding scripts. I still can't get the map to display in IE7, and it's stopping at the same lines mentioned in #13.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedThe patch in #3 doesn't have any effect on the problem, so this is still active.
FWIW, I cannot visit http://sandbox.zzolo.org/openlayers-views-example and see a map, but I don't know what version of the module this site is running.
Comment #17
tmcw CreditAttribution: tmcw commentedbangpound, which version of OpenLayers are you using (or how old is your dev version) and what source are you using for the OpenLayers javascript? This issue should be fixed by this revision of the 1.x branch and recent OpenLayers.
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm running current CVS DRUPAL-6--1 of OpenLayers module and OpenLayers 2.8 javascript. I have that line in my openlayers.js script.
Comment #19
zzolo CreditAttribution: zzolo commentedI know how ridiculous IE JS debugging can be, and I am not sure what your environment is, but maybe there is some way to get some real debugging information:
http://notetodogself.blogspot.com/2008/08/debug-javascript-in-ie.html
Otherwise, its just kind of shooting in the dark. Also, the example at my sandbox is fairly old.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm trying with the newer debugger listed in the article from zzolo. I'll be back.
Comment #21
Anonymous (not verified) CreditAttribution: Anonymous commentedI have a semi working map by adding:
xmlns:olv="urn:schemas-microsoft-com:vml"
To my page.tpl.php html element.
Still not 100% though. And it took me ALL DAY to set up that Microsoft whatsit Express, and it is the best JavaScript debugger I've ever used.
Comment #22
Anonymous (not verified) CreditAttribution: Anonymous commentedOk. Here's my complete fix:
1. Add olv namespace to your page template. xmlns:olv="urn:schemas-microsoft-com:vml"
2. Add this style to your IE or general stylesheet.
(The backslash colon asterisk is important!)
The OpenLayers javascript was failing in OpenLayers.Renderer.VML initialize function, which tested for the existence of the olv namespace. If it didn't exist, it would create it and add few styles to a new stylesheet. My script was failing on the attempt to create a new stylesheet.
Comment #23
zzolo CreditAttribution: zzolo commentedSo, what's the best way to handle putting this into the module? The CSS is simple enough (though so hackish), but the template stuff gets a little more difficult to do well.
I suppose, we just include that information in the README.txt?
Comment #24
BWPanda CreditAttribution: BWPanda commentedI just updated to the latest dev version and tested in IE without applying any patches - it seems to be working...
Comment #25
tmcw CreditAttribution: tmcw commentedCan everyone post which IE and which OpenLayers version they're using?
At least from everything I've seen, IE8 doesn't have the difficulties with VML that IE7 and IE6 has, and that the newer version of the OpenLayers library (dev, sadly there is no 2.9 release yet) has fewer problems with the VML rendering than 2.8.
Also, there's an inconsistency in the code that I think has a serious effect on this: between internal and external openlayers sources, the Javascript is included in different ways
I think that this ends up with the OpenLayers.js code being included first in some cases and after openlayers.js in other cases, thus making the document.namespaces; trick sometimes work and sometimes fail.
There's some documentation on this in the handbook page and more in the openlayers FAQ.
Comment #26
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm using IE7 and OpenLayers 2.8 hosted in my Drupal site not from openlayers.org.
Comment #27
BWPanda CreditAttribution: BWPanda commentedI was testing both IE7 and IE8, and my OpenLayers.js is taken from their website (and hosted there).
Comment #28
zzolo CreditAttribution: zzolo commentedSo, what is best solution for this problem. It seems like it is something that has to go in the page.tpl.php, if I understand this correctly?
If so, we can't automate it this in the module, and will just have to have good documentation in the installation file and on the project page.
This seem right?
Comment #29
tmcw CreditAttribution: tmcw commentedThe eventual solution here is probably to move the OpenLayers initialization from the onReady handler, which is provided by Drupal's behaviors stack, to another stack based off of simple jQuery callbacks and runs on onLoad. The problem at its core is that Drupal is making us run this before page load, when the VML stack is not ready in IE, and thus we're practically the only consumers of the OpenLayers library who have this problem and can't fix it by just relocating the code.
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedPerhaps drupal_set_html_head() can be used to add OpenLayers whether the script is hosted on the drupal site or on openlayers.org? This would deal with another issue I've found... the javascript aggregator isn't told not to aggregate the openlayers library, and i think at a few hundred kilobytes, it's definitely not well suited for it.
Comment #31
phayes CreditAttribution: phayes commentedI agree that moving thing to drupal_set_html_head is a good interim solution. It isn't the 'drupal way', but the drupal way isn't working for us at the moment.
tmcw, eventually I would like to be able to call up maps using ajax or ahah (which as far as I know needs to use drupal behaviors to trigger javascript) - how do you think moving things to jquery would affect this eventual goal?
Comment #32
zzolo CreditAttribution: zzolo commentedJust to note why openlayers is included in two ways: it is because drupal_add_js() does not allow for external JS.
Does this problem exist in 2.x? I would assume so.
So, for the ideal solution, in my opinion, we continue to use Drupal behaviors, but we need to test to see if the event is the onReady event, and not do any OpenLayers processing. This will take care of the error, then we can just do regular jQuery onLoad event that calls the Drupal behavior. This way we are still utilizing Drupal behaviors, but ensuring that processing happens at the right time. This is assuming we can somehow determine that the event is the onReady event within the Drupal behavior function. If not, maybe we can do a simple counter which looks for the first behavior trigger (this definitely seems hackish).
I have made a patch for this for 1.x-dev.
Also, if we move the processing to the window load event, then we are waiting for lots of things that could be pretty annoying. We could always just do this just for IE.
But looking at the "hack" in http://drupal.org/node/613002, I feel that it is a more simpler work around. If this works, I would rather use this workaround.
I am not really able to test the IE stuff all that consistently, so any help is appreciated.
Comment #33
tmcw CreditAttribution: tmcw commentedThis doesn't seem feasible. If we delay map rendering to the onload event, then we need to delay all other behaviors till after that, since all of them depend on a map object existing and functioning. And with the proposed workaround, all behaviors will be called twice, including those not in the OpenLayers behaviors stack. Having some kind of simple jQuery method for calling OpenLayers behaviors would avoid these problems.
You mean waiting for the page to finish loading? I suppose so, but the difference, I'd guess, is pretty minor, and I really don't think it's very significant. The bottlenecks of OpenLayers performance are mostly in its own rendering process, not in when its called.
By using a recent version of OpenLayers and the document.namespaces hack, I've been able to avoid this problem in recent sites. You can see for yourself if it works in IE7, the new afghanistan site is using OpenLayers 2.0 (well, 0.x-ish).
Somewhat, this would give you a stack you could invoke at a different time than pageload, although I think it's also pretty feasible to just build something from scratch to do AJAX loading of new maps.
Yeah, that's exactly what I would suggest. And, OpenLayers is one big, big library, and it's best to run a minimized version anyway, I really wonder how Drupal's javascript aggregator stacks up versus jsmin / closure compiler. I suppose the big thing that you'd lose going with all set_html_head is that the aggregator framework might gzip contents? Or maybe not, if it's caching...
Comment #34
zzolo CreditAttribution: zzolo commentedtmcw, thanks for the detailed information.
If we consider this a bug with IE, I would definitely vote for the current namespsaces hack. It does not seem right to bend so much, just for a browser bug, when a small hack can fix it.
If it is an actual architectural issue problem with Drupal.behaviors and the OpenLayers library, then going with tmcw's suggestion on abstracting the behaviors model with jQuery.
But, from what I understand (and I could be wrong), this is a bug in IE.
Comment #35
kaakuu CreditAttribution: kaakuu commentedKeeping myself subscribed as I am having 'openlayers is undefined' error and map not showing in IE 7.
For me IE 7 was working okay but had a disc format and downloaded the latest IE 7 from MS site today, and now I am having problem. FF is okay - no problem.
I will do more test with IE 7 and the fixes suggested here, making these notes to keep myself subscribed.
I am also trying to read the latest on this http://74.125.153.132/search?q=cache:DqK1_uOSLzAJ:trac.openlayers.org/ti... at openlayers site but the site seems to be down.
Comment #36
zzolo CreditAttribution: zzolo commented@kaakuu, what specific version of openlayers are you using?
Comment #37
kaakuu CreditAttribution: kaakuu commented@zzolo, Thanks for the query. I am at my wit's end as to what is happening (curse IE)
So far I have been using 6.x-1.0-beta3, and with the Internet Explorer 7 version I was having I had no problem. Now I have the IE 7 latest version downloaded from MS and problems started (explaining why some friends also could not see in IE 7) - that 'undefined' error message.
Now I upgraded to 6.x-1.0-beta4. The error message is gone, geo-location entered per node is okay but the Views Tracker that shows all or multiple nodes as 'round orange points' is NOT seen in IE. Refresh, clean cache, disk clean - still not seen! But manually change zoom (just minutely slide the +/- slider slightly) they can be seen again. Do a page refresh - revisit page, they are gone. Gone means invisible, but apparently they are there as map shows up (map setting has been done not to show empty map). PLease help !
So, to sum up, using latest Openlayers beta, latest Drupal 6.15 and latest stable Views, IE no longer shows error message but also no longer shows multiple node locations compositely on a map as those 'round orange points'.
Comment #38
zzolo CreditAttribution: zzolo commented@kaakuu
Are you uisng FF wtih Firebug, are there any JS errors. I have seen this before, but it usually caused by some other bad JS on the page.
--
zzolo
Comment #39
zzolo CreditAttribution: zzolo commentedMoving to new ticket, as this has now become a support request: #680516: IE7 having issues displaying features consistently
I believe the IE part of this has been resolved and therefore closing. Re-open if we should not be using the hack solution.
Comment #40
netrom CreditAttribution: netrom commentedI followed the instructions as described in #22. And the maps are actually now showing in IE.
BUT when adding polygons, points etc. they don't show in IE (in FF they do). It seems that they are registered as they appear in the WKT field but they do not show on the map.
Context: I use the 2.8 hosted version on D6.14.
Any one who knows how to solve this?
Comment #41
kaakuu CreditAttribution: kaakuu commented@netrom - this is the problem I am facing too. I need to do more tests as soon as I get some time.
I was not having this problem with old version of I E 7 but the latest (and safest!) version of I E 7 is giving me the same problem as discussed by you. I think you should join this issue now #680516: IE7 having issues displaying features consistently with details like what version of IE, any other JS, firebug output etc. We really need some quick workaround or solution for this.
Comment #43
tmcw CreditAttribution: tmcw commentedReopening. A solution wasn't found, and at the very least, we need thorough documentation.
Comment #44
zzolo CreditAttribution: zzolo commentedIs this something that affects all branches?
Comment #45
zzolo CreditAttribution: zzolo commentedImplemented redraw fix in 1.x branch: http://drupal.org/cvs?commit=330102
Some related notes here: #680516: IE7 having issues displaying features consistently
Comment #46
zzolo CreditAttribution: zzolo commentedOh yeah. Please note that I dont have any version of IE readily available, so if someone can test this out, that would be very appreciated.
Comment #47
zzolo CreditAttribution: zzolo commentedpahyes pointed out that I forgot about the window load.
http://drupal.org/cvs?commit=330170
Comment #48
phayes CreditAttribution: phayes commentedThis appears fixed for me running with the latest commit (#47). Marking as fixed.
Comment #49
netrom CreditAttribution: netrom commentedI am using the hosted openlayers 2.8. I see no changes and still having the problem of points not showing in IE (6, 7, 8).
Comment #50
tmcw CreditAttribution: tmcw commentednetrom: are you using the latest 1.x release or the dev version? Can you give any more information about your setup, or an error message?
Comment #51
phayes CreditAttribution: phayes commentednetrom,
Please open a new issue, detailing the specific problem you are having, with as much detail as possible.
Comment #52
netrom CreditAttribution: netrom commentedI am having the problems as mentioned in my comment at #40 in this thread.
I am using openlayers: 6.x-1.0-beta4
And also, as mentioned I, am using the hosted version which means, I guess, that the .js file used is not the one in the module but the one hosted (?).
Should I use the 1.x-dev instead?
Comment #53
zzolo CreditAttribution: zzolo commented@netrom, can you update to latest 1.x-dev, please, as this should have the IE fix in it.
Comment #54
netrom CreditAttribution: netrom commentedI have now updated to the 1.x-dev., cleared cache, run update.php etc.
But, the problem (see #40) is still there.
Comment #55
BWPanda CreditAttribution: BWPanda commentedI too am also still experiencing this issue.
I'm using the 6.x-1.x-dev (Feb 19th) version with the OpenLayers source: http://openlayers.org/api/OpenLayers.js
I've attached a screenshot of this issue with the error message showing (my site with this issue is: http://brat.info)
The map itself doesn't show, but takes up the right amount of the screen (width & height), and the controls show but not properly.
Tested in IE8 (with and without compatibility mode) (screenshot is from IE8 without compatibility mode).
Marking as critical and setting back to 'needs work'.
Comment #56
alexpottI'm experiencing some really interesting IE issues (in IE7 and IE8 and using my site's openlayers.js version 2.8)
Originally I installed 6.x-1.0-rc1 and was getting the missing argument error on line 597 in IE
So I found this issue and read through all the comments and thought... ok lets install 6.x-1.x-dev as of 2010-Mar-03 as the patch has been committed
Then I got a new error this time not in the openlayers.js (from openlayers) but in sites/all/modules/openlayers/js/openlayers.js - i.e. js provided by the Drupal module - the error was on line 19 Error: not implemented... line 19 is
So I went and checked out http://drupal.org/node/613002 and it mentions broken images... so I checked the page for broken images - there were none.
Then I reread a lot of the above comments and implemented the suggestions from #22 (add IE xml namespace and some CSS) which still did not work...
So I reverted back to 6.x-1.0-rc1 (leaving the changes from #22 in) and now it works
Comment #57
zzolo CreditAttribution: zzolo commentedThis is a change I did. I was running things through JSLint and it gives notices because this is not really a valid JS command. If you have time, you can probably just use the dev version, but revert that line to:
Comment #58
tmcw CreditAttribution: tmcw commentedYeah... why was that line changed anyway? In 2.x, it's just
document.namespaces;
Comment #59
zzolo CreditAttribution: zzolo commentedLike I said, JSLint complained because it is not a valid JS statement, so I figured I would make it a valid statement. Obviously it causes problems in IE (though not in FF). I'll take it out of 1.x this weekend.
Comment #60
alexpottYou're right...
Changing that line make openlayers maps appear in IE7 fine...
But I still required half of #22 to get it working... the css isn't needed but if I don't have xmlns:olv="urn:schemas-microsoft-com:vml" in the tag I get the missing argument on 597 in openlayers.js...
Perhaps something needs to go into the README.txt file to tell people to add this to their page.tpl.php?
Comment #61
zzolo CreditAttribution: zzolo commentedAlright, @alexpott, I have put it back:
http://drupal.org/cvs?commit=337836
As far as the other issues in this ticket, I am closing this ticket and creating a new one. Please don't comment on this ticket. It is way too broad and seems to encompass different versions. Create a new more specific issue if you are having problems.
@BWPanda, your issue is here: #734552: Geometry Undefined