Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 0.7.6.6, cMap, javascript
- This topic has 9 replies, 2 voices, and was last updated 10 years ago by
Steven Zahm.
-
AuthorPosts
-
05/22/2013 at 2:51 pm #260716
MJA
ParticipantHi
My Google map isn’t showing and I’m getting the following error:
Error: TypeError: g(“#map-” + j).goMap is not a function
Source File: ……./wp-content/plugins/cmap/cmap.min.js?ver=3.0.1
Line: 5Any ideas?
thanks
05/22/2013 at 4:31 pm #260733Steven Zahm
Keymaster@ MJA
If the following file is not loaded, which I suspect it is, you would get that error.
/wp-content/plugins/connections/js/jquery.gomap-1.3.2.min.js?ver=1.3.2
I suspect the cause is actually an error in another javascript belonging to the theme or another plugin. Can you share a link to your directory?
05/22/2013 at 5:20 pm #260735MJA
ParticipantThank you for your reply.
You’re right – the file doesn’t load.The strange thing is, it works perfectly fine on my localhost. It is only a problem on the live server and all plugins etc are on the same version as my localhost.
I don’t see any other js errors that would prevent the file from loading. Are there any settings that would prevent the loading? I couldn’t spot any. My settings are also the same between localhost & live server so it doesn’t make sense.
I’ve tried unchecking and checking the Google Maps & Javascript checkboxes in Connections > Advanced. At the moment they are both checked.This is where it is happening:
http://www.technopark.org.za/directory/business-directory/name/afriland05/22/2013 at 8:40 pm #260765Steven Zahm
Keymaster@ MJA
Well, it’s always something new. All the other scripts are loading just fine and of course they are all being called and loaded in the same sections of code but yet neight the gomap or the Google Maps API script are being loaded.
Can I get a temp admin account so I can take a closer look? Details can be posted here as a private reply.
05/23/2013 at 3:25 am #260775MJA
ParticipantThis reply has been marked as private.05/23/2013 at 11:21 am #260789Steven Zahm
Keymaster@ MJA
Something within the site’s configuration , another plugin, the theme, I don’t know for sure, was absolutely preventing that Google Maps API from being loaded in the site’s footer.
The change I made was on the Connections : Settings admin page under the Advanced tab; uncheck the JavaScript option and saved the setting.
I then had to modify the cMap to enqueue the the API in the site’s header.
It now works fine. However, the API is now loaded on every page rather than just when needed for Connections. Generally that’s the avenue other plugins take any way so there’s no real harm.
05/23/2013 at 1:51 pm #260794MJA
ParticipantThank you very much!
I was thinking a last resort could be to just manually include the files in my theme’s header or footer. I still don’t understand why the same code & setup would work on my localhost though. Anyway, I’m very happy it is working now.
The changes that you made to cMap to enqueue the API in the header, is that something that I will lose if I update in the future?
If so, can you please tell me exactly what you change, so that I can add it again if need be.05/23/2013 at 2:11 pm #260803Steven Zahm
Keymaster@ MJA
You can safely upgrade Connections without losing the change. However, upgrades to cMap will overwrite the change.
To redo the the change, open the cmap.php file found here:
../wp-content/plugins/cmapAdd this line of code:
wp_enqueue_script( 'jquery-gomap-min', CN_URL . "js/jquery.gomap-1.3.2.min.js", array( 'jquery' , 'cn-google-maps-api' ), '1.3.2' );
Within the
is_admin()
if statement in the__construct()
method. Right under this line will do:add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueueCSS' ) );
05/23/2013 at 2:14 pm #260804MJA
ParticipantWonderful, thank you very much for your help!
05/23/2013 at 3:06 pm #260808Steven Zahm
KeymasterNo problem…
If you have a couple moments, I’d love a review.
http://wordpress.org/support/view/plugin-reviews/connections -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.