Google Map block blank to guests
Permalink
Hi
Had a quick search and couldn't find an answer, hopefully a nice easy one.
Have added in a google map block, and it shows fine while logged in but then when I log out it does not show, and doesn't show on other browsers when they view the page as guests.
I have cleared the cache but that hasn't fixed it, cheers.
Had a quick search and couldn't find an answer, hopefully a nice easy one.
Have added in a google map block, and it shows fine while logged in but then when I log out it does not show, and doesn't show on other browsers when they view the page as guests.
I have cleared the cache but that hasn't fixed it, cheers.
Thanks for the reply, that has worked a treat.
Can I ask what that has done / had I done anything wrong / why it didn't work "out the box"
Thanks again
Can I ask what that has done / had I done anything wrong / why it didn't work "out the box"
Thanks again
The google maps code which initiates the map is wrapped into $()-function which will only work when $ is registered (jQuery).
When logged in, concrete5 loads already jQuery for you because the concrete5 itself loads it because it needs it.
When logged out, that is not loaded and thus google maps code will not work. This code adds jQuery to your page header loaded before the map is initialized. That should probably be loaded in the map block's controller but for some reason it is not.
When logged in, concrete5 loads already jQuery for you because the concrete5 itself loads it because it needs it.
When logged out, that is not loaded and thus google maps code will not work. This code adds jQuery to your page header loaded before the map is initialized. That should probably be loaded in the map block's controller but for some reason it is not.
just load bootstrap in your theme header
$this->addHeaderItem($html->javascript('bootstrap.js'));
In the very beginning of your header.