Store Locator Plus® for WordPress › Forums › Store Locator Plus › Store Locator: Pages – Map is not showing
Tagged: location pages map
- This topic has 28 replies, 5 voices, and was last updated 8 years, 6 months ago by Cici.
-
AuthorPosts
-
March 31, 2016 at 8:52 PM #40075DmitriyParticipant
Hi,
I have installed SLP and SLP:Pages. Map is showing fine on general Locations Page here:
http://talentfitness.com/thesimplegreek2/index.php/locations/
But no maps are showing on any of the SLP: Pages generated.
Here is code used for Pages:
<span class=”storename”>[storepage field=store]</span>
[storepage field=image type=image]
[storepage field=address]
[storepage field=address2]
[storepage field=city] [storepage field=state] [storepage field=zip]
[storepage field=country]
<h1>Description</h1>
[storepage field=description]
<h1>Contact Info</h1>
Phone[storepage field=phone]
Fax[storepage field=fax]
[storepage field=email type=mailto]
[storepage field=url type=hyperlink]
[storepage map=location]Can you please let me know how to fix it. Screenshot with environment is attached.
Thank you!
Attachments:
You must be logged in to view attached files.April 2, 2016 at 3:30 PM #40139CiciKeymasterYour Store Pages locations urls have error messages, i.e. failed to load resources.:
You have a conflict with your theme or the content added on the Store Pages added on the individual store pages another plugin added to those store pages by the looks of it.
the individual store pages are failing i.e json response due to the callback, Is Your theme or another plugin forcing a jquery call back? FAILED ERR NAME NOT RESOLVED https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Ftalentfitness.com%2Fthesimplegreek2%2Findex.php%2Fstore-page%2Fhighland-park%2F&callback=jQuery111305662721395339256_1459628627295&_=1459628627296
Use Firefox debugger or the WP debugger to find the plugin causing the errors, Instructions can be found under Troubleshooting, there is also a tutorial on the SLP You tube channel if you need to review on how to debug using Firefox
P.S. You have a low version of PhP, WP recommended versions are 5.6 .
April 3, 2016 at 8:43 AM #40151PianiParticipantWhen updating PHP go for PHP 7 direct. Its faster and no errors. Works like a charm with WordPress and Store Locator Plus.
I also use the syntax
[storepage map=”location”]
with ” “, and that is different from what you use. Bit I use this with no problem on my site to display the map.
April 4, 2016 at 9:32 AM #40170DmitriyParticipantHi Cici, Piani
Thank you for your reply(s). The link you provided does not work. Unfortunately Javascript / jquery and their debugging is beyond level of my expertise. I have tried reverting to another basic WP theme with no success. I have tried location with “” and without. I don’t think PHP is a problem. In working with other paid themes’ authors if I ever had any issues they would give me a snippet of code or CSS that would correct any issues I might have had when trying all components to work together. What does it take for you to review my site and let me know how to correct the issue? Should I buy premium support? The answer above is very generic. Thank you!
April 4, 2016 at 3:22 PM #40177CiciKeymasterDmitry,
Yes if you need the Developer to Troubleshoot and/or logon to your site you can request with Paid Support.
But beware, he can point you in the right direction, give you specifics but if it is someone else’s Plugin or your theme he will not be able to “fix it” . You might need to ask your theme developer to update the theme (you mentioned you paid him to create?)
As far as finding out where the error is coming from using the WordPress Debugger , there is a tutorial on that, as well as a Tutorial on using the Firefox Debugger.
Excerpt from our Troubleshooting page:
- Plugin Errors, any plugin that does not load properly and does ANYTHING with page header output will break and thus cause a domino effect prevent the Store Locator Plus PHP JavaScript component from loading.
In many cases the cause of the maps not loading is because our PHP JavaScript file could not load. We can often detect this and pop-up the “PHP JavaScript connector did not load” warning. However we cannot catch all errors.
One of the best tools for searching for errors in the HTML page headers is to use Firefox with the Firebug plugin. Turn on the console and check the responses tab for any errors. We have resolved many client installation and map problems with this plugin. More often than not we are finding errors in other plugins, themes, or server configuration settings on the servers. No, our plugin is not perfect and is not 100% bug free (we wish it were) but we are no longer finding bugs in our plugin as the primary culprit in broke installations.
The PHP JavaScript page header is a critical part of a working Store Locator Plus installation. Since it loads very late in the page creation process it is susceptible to failures from almost anything else you may be loading on the page or your WordPress site. The the map is not loading and you are receiving this message get some page debugging/tracking tools like Firebug and isolate any plugins that are generating coding/output errors.
Unfortunately there is no work around for PhP versions. S LP updated to 4.4.36 recently and Lance had to “degrade” SLP to work with lower versions of PhP so if you could update again if you havent recentlly .
Word Press has a basic form letter to send to your hosting server at the link I provided you, here it is again
April 4, 2016 at 3:56 PM #40178ShadParticipantCheck to see if your Map Height Units is set to %. Try changing to px and see if Pages map loads.
April 4, 2016 at 4:11 PM #40179DmitriyParticipantWould not that be odd that map loads successfully on All Locations page and not on individual pages?
April 4, 2016 at 4:22 PM #40180ShadParticipantI had a similar issue and that solved it… and even now on a dev site, if I change map Height Units to a %, Pages will no longer display map. Your environment may differ from mine, but its a quick test and possible solution.
April 4, 2016 at 4:25 PM #40181DmitriyParticipantAlso, when I add [SLPLUS] to any page or post of the site it loads just fine. However, if I add that to the store page post that is created by your plug in, I get Store Locator Plus did not initialize properly. To me it looks like however this store page is built (dynamically by your plugin) it is built differently from regular Pages / Posts on the site.
Attachments:
You must be logged in to view attached files.April 4, 2016 at 4:32 PM #40183DmitriyParticipantChanged map height / width to px – not it…
April 4, 2016 at 4:33 PM #40184ShadParticipantI am not the author of plugin, just a long time user of the SLP products. Saw the post about Pages Map not displaying and thought I would share my experience.
April 4, 2016 at 4:35 PM #40185DmitriyParticipantI understand! Thank you for input! Talking to Cici here 🙂
April 4, 2016 at 5:16 PM #40189CiciKeymasterWhoa, back up., maybe I am understanding…Are you trying to add shortcode SLPUS]] to the individual store pages? The plug in cant work that way. It is fighting with itself and getting confused.
That is the ingredient we are missing in solving what is going on with your site. Please paste the full page template you have crafted
See this Post about Pages shortcodet in the forum and the links and explanation.
The developer further explained :
” Appears you now have an issue with Store Pages,
You have an issue with how your Pages template is constructed.
………….. be advised that WordPress changed how shortcodes handle quotes. It cannot handle shortcodes with quotes for attributes within an HTML element that has quotes. There has been a lot of controversy over this move by WordPress but they refuse to change their position citing security concerns. It may require some creative templates to do what you want, but let’s start with pasting your Page template setting here.”
April 4, 2016 at 5:23 PM #40190DmitriyParticipantThis is not my intention to add [SLPLUS] to an individual store page. I was just experimenting adding it to various regular pages / posts (not generated by plugin) and map displays with all locations. I was curious to add it to a store page to see behaviour and it does not load. The exact content of my store page is posted in my first message above.
April 4, 2016 at 7:17 PM #40191CiciKeymasterOk Dmitry..got it
Well your test showed that it wouldn’t work , so that is consistent with what we expected….so that goes back to the error messages I saw.
Unless I looked at it when you were fooling around with that. I inspected one store page , more closely and
Something is blocking the map from loading because of the errors. I just noticed you have a contact and share form on the same page as the Store Pages and that can be interrupting the store Page, you cant have those on the Store Pages in place of some of the template elements because where the map is supposed to load is being overtaken Not sure which Plugin if it is a social plugin or a special theme and someone added some special call methods but it is messing with the JSON call : See this error…
Error : cdn.api.twitter url <b>https://cdn.api.twitter.com/1/urls/count.json?</b>
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
If that is part of your theme you may need to get someone to clean that up.
..if you do need the developer to log on (as Shad mentioned Lance was able to find his issue by troubleshooting)
You can send the info as you described it in the first section under Paid Support , there is something unique to your site and I cant replicate the issue at this time. Sorry you are having trouble with this.
April 4, 2016 at 10:26 PM #40194DmitriyParticipantI removed both, Share and Contact form and got the page to its most basic form – still not there…
April 5, 2016 at 12:46 PM #40204PianiParticipantHere is my complete code that works perfect. If this still not work the we have confirmed you have a problem with your site and not SLP.
<font color="#008000"><b>Adress</b></font> <span class="storename">[storepage field="store"]</span> [storepage field="address"] [storepage field="zip"] [storepage field="city"] <br> Random text. <br> <font color="#008000"><b>Kontaktinformation</b></font> Telefon <font color="#008000"><b>[storepage field="phone"]</b></font> E-post [storepage field="email" type="mailto"]</a> Webbsida [storepage field="url" type="hyperlink"] <br> [storepage map="location"]
April 5, 2016 at 1:29 PM #40205DmitriyParticipantThank you all for suggestions!
After contacting theme author it appears that the theme does not cooperate well with Store Page Map loading. I ended up coding map directly on Store Page.
If anyone has this problem in the future, here is code I used to add to each store page to get the map to appear:
<style>
#map {
width: 500px;
height: 400px;
}
</style>
<div id=”map”></div>
<script>
function initMap() {
var mapDiv = document.getElementById(‘map’);
var map = new google.maps.Map(mapDiv, {
center: {lat: 44.540, lng: -78.546},
zoom: 8
});
var marker = new google.maps.Marker({
position: {lat: 44.540, lng: -78.546},
map: map
});
}
</script>
<script src=”https://maps.googleapis.com/maps/api/js?callback=initMap”
async defer></script>You can style it and adjust lat/lng based on your needs. Hope it helps someone.
April 5, 2016 at 4:09 PM #40216CiciKeymasterHey Dmitry,
if you wouldn’t mind, what was your theme? Or was it customized for you? I would like to put a note somewhere in Troubleshooting about conflicts, especially since I will forget about this issue if someone asks two months from now.
There are so many WP plugins, and themes , and customizations, not to mention the evr changing codex in WP that keeps everyone on their toes.. it is impossible to catch all the nuances.
As the developer always tells me when something doesn’t work the first and most obvious to users is that the Map doesn’t appear, its in your face and obvious…so they pretty much assume that he broke something in SLP
Not like that’s never happened. ..
🙂
Thanks everyone , for contributing and taking time out to help your SLP community.
April 5, 2016 at 4:14 PM #40217CiciKeymasterOn a side note, I guess my first suggestion on the very first post about a conflict with your theme was the right answer.! That’s almost a first for me on this subject matter.
April 5, 2016 at 4:19 PM #40218DmitriyParticipantThe theme I have is Ronneby Theme. It was not customized for me.
April 5, 2016 at 5:22 PM #40220CiciKeymasterThanks for getting back to us and for the solution. If you feel you received fair and timely support and the base plugin is fantastic, please”
If you like Store Locator Plus please leave a ★★★★★ rating on WordPress.org. A huge thank you from Lance and his fellow code geeks!
”
April 7, 2016 at 2:45 PM #40295Lance ClevelandKeymasterYes, you can force your own map on any page using code like that you posted her but it will NOT update if you ever change your location data. That lat/long is fixed at the position you set.
The other issue is that you are now loading a script “inline” versus using the WordPress enqueue commands. This is not recommended and can have all kinds of side effects as WordPress has zero information about the script and how it may impact others.
This technique works but mileage may vary and future updates can be problematic for WordPress, Store Locator Plus, your WordPress Theme and other plugins.
The reason your Pages map was not loading normally is because your WordPress theme (or another plugin) is loading the Google Maps JavaScript on EVERY PAGE versus just the pages it needs to render a map on. That is also against WordPress best practices; however I understand that some themes are just too cool to pass up regardless of what bad habits they may bring with them.
April 7, 2016 at 3:01 PM #40296Lance ClevelandKeymaster@Dimitiri – FYI – Pages requires WordPress 4.4 with the REST API enabled. If you disable the REST API your pages will not pull data properly which means no location details and not map. On one of the URLs above it appears the wpjson REST interface is disabled or has been relocated.
April 7, 2016 at 7:53 PM #40302DmitriyParticipantHi Lance,
Thank you for your reply! I wish I got this kind of explanation and insights to my initial message. It would have saved me time. Considering what you said about negative effects of forcing map on each page, I am thinking about switching to a different theme altogether. Any themes you would recommends (contemporary / widescreen / with sliders) that you know of, that your product works well with. I am currently considering X-The Theme.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.