Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Motorace on October 30, 2013, 04:10:44 PM

Title: SMF 2.06 and Google Member Map 2.6
Post by: Motorace on October 30, 2013, 04:10:44 PM
I apologize if this is the wrong location for this message.  I tried replying to the Google Member Map thread under Modifications, but the reply button is not available.

I run 8 forums, all of which were recently upgraded to SMF 2.0.6.  The upgrades went pretty smoothly, however the only package I haven't been able to get working again is the Google Member Map on some browsers.  Chrome allows users to place their pin in their profile, but when trying to view the member map on the main member map page, the map and the list of members are never rendered.

When viewing the Javascript console in chrome I get the following message:

Refused to execute script from 'http://www.yamahastarbolt.com/index.php?action=googlemap;sa=.js;count=253' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I checked on one of the sites before upgrading and did not get this message in the console.  While upgrading that site the first and only package I reinstalled was the member map just to isolate possible conflicts with other packages and I still go the message, so it appears to be 2.0.6 related.  Anyone have any ideas or suggestions?  I believe it has something to do with the header information, but I am not sure how to resolve.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Burke ♞ Knight on October 30, 2013, 04:18:18 PM
It appears that the mod has been removed from the mod site.
That in turn, locked the support topic.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Motorace on October 30, 2013, 04:46:21 PM
Well that wasn't the answer I was hoping for!  ;D
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Motorace on October 30, 2013, 04:58:40 PM
Someone already posted a fix on GitHub.  I tested it on one of my sites and its working just fine.

https://github.com/Spuds/SMF-Google-Member-Map/commit/aae763d97e025eefc004365c6f1f16db36edfeda
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: butch2k on October 30, 2013, 05:04:17 PM
Yes this fix works, it a new security option in the latest chrome version which prevent executing JS not served with the proper content type ;)
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: radu81 on October 31, 2013, 06:18:09 AM
I can confirm, it works great with smf 2.0.6. Spuds has updated the mod quickly ;)
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: GL700Wing on November 09, 2013, 05:44:46 AM
This issue also affected IE following the SMF 2.0.6 upgrade and the fix posted on GitHub also resolves the issue on IE.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: GL700Wing on November 09, 2013, 07:32:38 AM
I just downloaded and installed the latest package from GitHub but there's a bug in the installation script - it refers to a file named 'markerclusterer_packed.js' when the actual file name (in both the package zip file and GoogleMap.template.php) is 'markerclusterer_compiled.js' (this file enables the clustering of pins).
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: 3dphoto on December 10, 2013, 02:00:44 AM
Hi,


Thanks for the information on this.  I uploaded the Google Member Map 2.6 from Github (and fixed the filename typo in package-info.xml).  Once I refreshed my packages, I could see it.  I still have 2.08 active, so this shows up in parallel with that.


I tried to install it, and got the errors in the screenshot.  Any ideas what I should do?  I want to retain the map data for my members (172 have already added themselves to the map).  Is it colliding with the old version, and if so, how do I save the existing map data?


Thanks,
Jeff
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Oldiesmann on December 11, 2013, 01:41:41 AM
The problems are due to the old version - it's looking for existing code and trying to replace it with something else, but as that replacement has already been made, it can't find the code it's looking for. Your best bet would be to uninstall the old version before installing the new version. When you uninstall the old version, the existing data should be kept unless you specifically tell SMF to remove the database changes as well.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Storman™ on December 16, 2013, 05:49:05 PM
QuoteI just downloaded and installed the latest package from GitHub but there's a bug in the installation script - it refers to a file named 'markerclusterer_packed.js' when the actual file name (in both the package zip file and GoogleMap.template.php) is 'markerclusterer_compiled.js' (this file enables the clustering of pins).

As well as that one there's a few extra bugs in the version on GitHub:

GoogleMap.template.php    lines 34-36   have an incorrect closing div

<div class="centertext googleMap_Legend">
<strong>' . $txt['googleMap_bold'] . '</strong>&nbsp;' . $txt['googleMap_OnMove'] . '
</divc>';


should be

<div class="centertext googleMap_Legend">
<strong>' . $txt['googleMap_bold'] . '</strong>&nbsp;' . $txt['googleMap_OnMove'] . '
</div>';


Note that this file also has #mapWindow so you need the updated GoogleMap.css file as well with this one.

In addition, in GoogleMap.english.php (line142) the entry is now $txt['location1'] = 'location';

..whereas previously it was $txt['location'] = 'location';

Thats ok but make sure you use the newer corresponding GoogleMapIntegration.php file with it.

In essence, it's probably best to completely uninstall your existing 2.0.6 install. Then install the one from Github but make sure you correct the closing tag (as mentioned above) plus rename "markerclusterer_packed.js" (in the package-info.xml file) to markerclusterer_compiled.js

The one on GitHub needs a tidy up basically !   ;D
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: 3dphoto on December 17, 2013, 08:37:01 PM
Cool- thanks to both of you!  I've been offline a bit, but will try to get it done later this week.  Much appreciated!


Cheers,
Jeff
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: rentner on January 27, 2014, 05:57:21 AM
Hallo,

Google Member Maps 2.6 was working proper with SMF 2.0.6.

After updating to SMF 2.0.7 I missing the member pins in the side bar. The side bar is still there but without shown members.
The pins in the google map are still shown. See enclosed screenshot.

Any idea?

Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: rentner on February 03, 2014, 05:29:30 AM
Sorry to ask again, but nobody an idea or a little help?
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: TheListener on February 04, 2014, 06:30:04 PM
I take it this is a mod?

If so have you considered asking in the mods support topic?
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: rentner on February 05, 2014, 09:09:49 AM
It is a mod.

In which board I should start my request?
Please advise.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: jmil on March 06, 2014, 12:53:21 PM
This is the only thread I can find on this issue anso I am using this thread but using SMK 1.1.19

I too see the IE and Chrome Issues and I tried using some of SPUDS code to fix but to no avaial. Anyone might have a though on this for me.

Thanks and hoping for a response
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: Storman™ on March 06, 2014, 02:30:07 PM
The one on Github says that the mod is compatible with SMF 2.0.x.

There's no mention that it still works with the 1.1.x series of SMF (although yes it used to).

Note that the Google Map support topic here (http://www.simplemachines.org/community/index.php?topic=210708.0), is no longer active as the author (Spuds) no longer provides support. Spuds also hasn't been active on here for over 5 months so you are unlikley to get a response from the author.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: radu81 on April 08, 2014, 07:25:40 AM
You may try posting on github, I also did and spuds was very kind and answered quickly
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: trot12345 on April 09, 2014, 03:49:06 AM
I could validate, the item is effective fantastic with smf only two. 0. 6. Spuds provides updated the mod quickly.
Title: Re: SMF 2.06 and Google Member Map 2.6
Post by: rentner on May 13, 2014, 05:30:51 AM
I just has reinstalled it and it funktion with SMF 2.07.

Maybe it is hang-up with the update 2.07, but with the reinstalling is fixed the problem.

Sorry for confusing.