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.

 
Mainio replied on at Permalink Best Answer Reply
Mainio
Add this to your theme's header:
<?php
$this->addHeaderItem(Loader::helper('html')->javascript('jquery.js'), 'CORE');
?>


In the very beginning of your header.
andrewjgoodwin replied on at Permalink Reply
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
Mainio replied on at Permalink Reply
Mainio
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.
hardikkotak replied on at Permalink Reply
just load bootstrap in your theme header
$this->addHeaderItem($html->javascript('bootstrap.js'));