Hi,

I've installed the module, enabled the module, enabled the text format filter, enabled the plugin for my editor (CKEditor 3.6.2.7275) and when I click on the icon in the editor interface, I get an empty pop up. Also if I click "Insert Map" it does nothing.

I've attached some screenshots to illustrate what I see.

Is there something else I should be doing?

Comments

scot.hubbard’s picture

Hi enapoleone,

Have you tried turning off the admin overlay? I suspect this may be causing this behaviour.

Scot.

enapoleone’s picture

Hi Scot,

Thanks for the reply.

Unfortunately it didn't work. I went to Admin > People, selected my User and then deselected "Use the overlay for administrative pages." Is this the procedure you are recommending or is there a more effective way of disabling Admin Overlay to correct this issue.

Thanks!

scot.hubbard’s picture

It looks like you are doing everything as it should be done, so I am a bit confused as to why it is not working at the moment.

Are you getting any Javascript errors?

enapoleone’s picture

I took a look at it and it appears that I am getting some Javascript errors, most seems to be related to JQuery. Initially I had my Drupal installation running on JQuery 1.5.. I then upgraded to 1.7 and 1.8 and the following are the errors I get:

JQuery 1.5:
Uncaught TypeError: Cannot read property 'offsetWidth' of null > jquery.min.js:16

JQuery 1.7:
Uncaught TypeError: Cannot read property 'offsetWidth' of null > main.js:28 (maps.gtastic.com)

JQuery 1.8:
Uncaught TypeError: Object function (a,b){return new p.fn.init(a,b,c)} has no method 'curCSS' > jquery-ui.min.js:358

I really do not know what I'm supposed to see in the lightbox pop-up - I assume a map. The second error leads me to believe that it and the first might be related and it is failing because it cannot read the offsetWidth property. The last error leads me to believe it's just interface issue.

scot.hubbard’s picture

hmmm.

What is main.js? It does not belong to WYSIWYG_MAP project.

I am at a bit of a loss here - I can't replicate what you are seeing.

ssherriff’s picture

I'm also getting this same error.

I believe the main.js is actually the google maps javascript file. The stacktrace of the issue starts with this line:

wysiwyg_map_getMap(null, null, null, null, null);

Then where the error actually occurs seems to be here:

wysiwyg_map_mapTokenBuilder = new google.maps.Map(document.getElementById("wysiwyg_map_selector"), mapOptions);

An the actual error is:

Cannot read property 'offsetWidth' of null

UPDATE: Okay, just posted this, but editing to add some more information. I believe the error is showing up because the actual form isn't loading into the dialog box. I'm still not sure why. So what is happening, is when the javascript goes to try to write the map to a div, that div doesn't actually exist. The div that doesn't exist is 'wysiwyg_map_selector'. But again, the main problem is the dialog isn't getting the form written to it at all.

ssherriff’s picture

Okay, sorry for all of the comments all in a row. I should have just waited until I figured it out, but I didn't realize at the time I was going to work through the issue.

This has to do with line 69 of wysiwyg_map_tokenbuilder.js:

dialogdiv.load(aurl + " .content #wysiwyg-map-tokenbuilder-form", function(){

My theme doesn't have a .content element, and probably other themes don't as well. If I changed it to this, I got data in the dialog:

dialogdiv.load(aurl + " #wysiwyg-map-tokenbuilder-form", function(){

ssherriff’s picture

StatusFileSize
new892 bytes

Okay, decided to just add a patch. I haven't done a patch in awhile for Drupal, not sure if I did it in the right format, but at least the initial work is done.

enapoleone’s picture

Hi ssheriff,

This patch worked for me.

Thanks!

scot.hubbard’s picture

Status: Active » Closed (fixed)

Many thanks for troubleshooting this issue. I have released 7.x-1.5 which includes other fixes too.