jjwg_Maps&action module not working - no map or radius map functinality?

I see that there are maps features in the CRM, but I have yet to find any useful function for it.

I found in the admin panel, a way to invoke the maps menu in the top-bar. From there, it let me create area maps… it wasn’t there by default.

I was expecting to be able to interact with a map, but I was not able to… Another module did let me draw an area map once, but invoking the pointer tool was not straightforward - we may want to consider adding help text.

Does the Maps module work, or are there known issues with it?

Relevant screenshots:

image

When I try to create an area map, it doesn’t load the page, it just has a link at the bottom, with an IFRame:URL. I guess this may be a formatting issue, or a maps API issue or something. The IFrame does not seem to be getting loaded.

If you inspect the URL, it is interesting that it doesn’t pass a full address (just part of it). Could that be part of the issue?

IFrame: URL

And for simplicity, here is the end of the link so you don’t need to inspect the URL:

'/legacy/index.php?module=jjwg_Maps&action=map_markers&quick_address=555+main+street&display_module=Accounts&distance=250&unit_type=mi&submit=Process+It%21'

Here are the relevant logs:

Fri Oct 20 02:50:12 2023 [781][1][FATAL] Exception handling in /bitnami/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Fri Oct 20 02:50:12 2023 [781][1][FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'
Fri Oct 20 02:50:12 2023 [786][1][FATAL] Exception handling in /bitnami/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Fri Oct 20 02:50:12 2023 [786][1][FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'
Fri Oct 20 02:50:15 2023 [787][1][FATAL] Exception handling in /bitnami/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Fri Oct 20 02:50:15 2023 [787][1][FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'
Fri Oct 20 02:50:16 2023 [790][1][FATAL] Exception handling in /bitnami/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Fri Oct 20 02:50:16 2023 [790][1][FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'
Fri Oct 20 02:50:33 2023 [795][1][FATAL] Exception handling in /bitnami/suitecrm/public/legacy/include/MVC/Controller/SugarController.php:397
Fri Oct 20 02:50:33 2023 [795][1][FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'

I also have google maps key, and it is geocoding addresses… so that probably isn’t the issue.

Environment

  • SuiteCRM Version used: 8.4
  • Browser name and Version: Google Chrome 118.0.5993.88 (Official Build) (64-bit)
  • Environment name and version: PHP 8.1.24, MariaDB 11.0.3
  • Debian GNU/Linux 11 (bullseye)
  • Bitnami Installation

You found a bug. It’s trying to get the file from ./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl, however, the file is really located at ./modules/jjwg_Maps/tpls/InfoWindow.tpl. You should raise a bug issue on the github ASAP so they could fix it right away.

The code seems to be written to deliberately look for a file in custom, and then when it fails, grab the non-custom one:

But that is using the @ operator to suppress errors; so I am guessing that the problem is coming from this PHP 8 change:

This would explain why the code has been this way for years, but only now is generating complaints.

This should be updated for PHP 8 to handle those Fatal Exceptions. Then it would probably render the radius map on the page.

It can be surrounded with a try / catch with nothing inside the catch.