Module Maps not working in Suitecrm 8

Hi, I have a problem with maps, in particular with the maps module.
I create a new map without problems, but if I click on the record from the listview (once created), a blank page appears.
The log does not report errors, but from the browser console this appears:


...index.php?module=jjwg_Maps&action=map_markers&display_module=Accounts&record=ca78e0dc-51c5-0cba-924d-67a0d6a5810e&current_post=session

[HTTP/1.1 404 Not Found 1157ms]

Google configuration is ok, the maps appear in the Accounts module (thanks to module_routing.yaml).

I’m working on suitecrm 8.4.2 and php 7.4

Up to Suitecrm version 7.14 the maps worked perfectly. Does anyone know how to solve it? Thanks

Maybe helpful:

SuiteCRM 8.4.2 does not support PHP 7.4. Try that first. You nded to be on PHP 8.1 or 8.2.

Also, maps do work. I have the working on SuiteCRM 8. The only problem is the cron job to update does not work.

If you add the link suggested in the documentation it fails.

If you add a full URL (like the one you click on in Geocode Counts screen) it runs successfully, but no records are updated.

This is not the behaviour in version 7.

In version 7, the documented link does not work anymore (it did work for years).

The full URL does work and runs successfully and does update the records.

Haven’t got to the bottom of that one yet.

I’d be curious if the scheduled job is working for you and if so, how did you set it up in the Scheduler?

@rsp I read the documentation you attached, but it only highlights the problem, not a possible solution.

@pstevens I know that from the compatibility table the 8.4.2 version of SuiteCRM starts from PHP 8.1, but it still manages to support the 7.4 version of PHP, in fact I have no problems with other modules or with the entire CRM.
In any case, on the local machine I also installed PHP 8.1 and the problem remains (but instead of the empty page, the XAMPP page appears, bah).
If I search for a quick address, the map appears perfectly, it is only if I click on the record of the listview that nothing appears.

Looks like redirecting issue.

Check site_url in config.php file.

Google Maps field is not supported in SuiteCRM 8.

If it is not supported, what is the MAPS module for? And why is there the possibility to configure google map in Admin? How does the quick address map work instead?

It works great in SuiteCRM 7. It hasn’t been developed in SuiteCRM 8 yet. I don’t know the answers to your questions about “why”. That’s just the way it is.

As a work around, you can return the module to legacy mode (essentially SuiteCRM 7) and it will probably work. I haven’t tested this yet, but it does work in SutieCRM 7 and you can use the iframe embed and it will probably work.

I tried to change the address on the local machine of site_url as suggested,
from
https://localhost
to
https://localhost/suite/public/legacy

now the white page no longer appears, but the message:

Last Geocode Status: INVALID_REQUEST

and in the browser console this error:

Uncaught TypeError: t[0] is undefined

jquery.iframe-auto-height.plugin.1.9.3.min.js:7:1836

@pstevens ok, I’ll try to pass the Maps module under module_routing too

Please look into the file

config/services/module/module_routing.yaml

For Example
image

The email module is rendered in legacy view
image

The accounts module is rendered in Angular UI.


You will have to clear your server cache after doing any changes

You have to run a symfony cache clear from your instance root folder.

.bin/console cache:clear

So, the email module is set up like this:

emails:
index: false
list: false
record: false

and also the Maps module (by default it is already set up like this):

maps:
index: false
list: false
record: false

so Maps should work, but it doesn’t

It should be:

https://www.MyWebsite.com:443

Considering, your web root set properly.

I tried to change the address:

https://localhost:443
https://localhost/suite:443
https://localhost/suite/public:443
https://localhost/suite/public/legacy:443

the result is always the same, this message appears:

Forbidden

You don't have permission to access this resource.

You don’t need to make the maps module legacy. Just the module you want to embed the maps in.

I have already brought the modules in which to embed the maps to legacy (Accounts and Contacts) and they work perfectly.
What I would now like is to make the Maps module work, which is already in legacy by default with the compatibility settings for version 7 of SuiteCRM

What do you mean make the maps work? How have you embeded them in the Contacts and Accounts templates?

The iframe field no longer works in SuiteCRM 8 using the generate URL. So I can’t see how this would work in SuiteCRM 8 at all.

it means that in the accounts and contcts modules I have inserted the iFrame fields and that I have inserted them in module_routing.yaml, in this way, in the detail of these two modules I can see the reference maps.
Instead, if I go to the MAPS module and set the map area, I would expect to see the map as it happened in SuiteCRM7, but I don’t see it (you are telling me that in SuiteCRM 8, this doesn’t work).

But it works, the quick radius map

The radius map will work fine and so will Google Maps. The issue is not with Google Maps. The issue is the iframe “generate URL” does not work in SuiteCRM 8. I don’t see how you’re going to get the maps to appear in Accounts and Contacts without it, unless you write your own embed code.

Could you please share code to add maps to modules, fabio?

I don’t have any code, I use SuiteCRM 7 and the iframe and generate URL. I have no idea how you would do this in SuiteCRM 8 without it.