J-BusinessDirectory - Beta testing - Listing markers on front-page map module (listing search) not showing

Support Forum

 
 

 

Before upgrading to 4.8, I had my front-page map (with search) showing with markers and all was well.

 

After upgrading, that module stopped showing the map entirely (only showed the search fields).


I can still use a menu item to view all listings, and they show properly there (with map markers)... However, using the module on the front page does not display them.

 

Therefore, I created the following new modules and they will all display the map, but it is empty (no markers):

  • - JBusinessDirectory Search
  • - JBusinessDirectory Listing Search
  • - JBusiness Maps
 

It seems that no matter how I configure these, I cannot get a map module to display the markers.
 

Anyone else having this issue too? I am not sure yet if it's a bug or just my site.
 

Here is the error in the developers console:

3 replies

Hi,

 

It seems that the jbdUtils javascript object is not created on the page that you mention.
We will check and fix this on the next version.

If you identify a code change that will fix the problem (before next official release) can you please tell me so I can have a temporary fix with the beta 4.8? I would really like to continue using 4.8 if possible for my project and this is the only *major* issue I have found so far.

Hi,

 

1. Edit {joomla}/modules/mod_jbusiness_listings_search/mod_jbusiness_listings_search.php and add the following code

JHtml::_('script', 'components/com_jbusinessdirectory/assets/js/utils.js');

$jsSettings = JBusinessUtil::addJSSettings();
$jsSettings->isProfile = 0;

if(!defined('JBD_UTILS_LOADED')) {
    $document  = JFactory::getDocument();
    $document->addScriptDeclaration('
            var jbdUtils = new JBDUtils;
            jbdUtils.construct('.json_encode($jsSettings).');
            '
    );
    define('JBD_UTILS_LOADED', 1);
}

 

2. Edit {joomla}/components/com_jbusinessdirectory/jbusinessdirectory.php and replace


$jsSettings = JBusinessUtil::addJSSettings();
$jsSettings->isProfile = 0;

$document  = JFactory::getDocument();
$document->addScriptDeclaration('
        window.onload = function()    {
            jQuery.noConflict();
        };
        
        jQuery(document).ready(function () {
            renderRadioButtons();
        });
        
        var jbdUtils = new JBDUtils;
        jbdUtils.construct('.json_encode($jsSettings).');
        '
);

 

with

$jsSettings = JBusinessUtil::addJSSettings();
$jsSettings->isProfile = 1;
$jsSettings->componentImagePath = COMPONENT_IMAGE_PATH;

$document  =JFactory::getDocument();
$document->addScriptDeclaration('
    jQuery(document).ready(function () {
       renderRadioButtons();
    });
     '
);

if(!defined('JBD_UTILS_LOADED')) {
    $document->addScriptDeclaration('
            var jbdUtils = new JBDUtils;
            jbdUtils.construct('.json_encode($jsSettings).');
            '
            );
    define('JBD_UTILS_LOADED', 1);
}

 
 
 

4 Item(s)

Show per page