Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jjwg_Maps&action module not working #368

Open
DBRenny opened this issue Oct 21, 2023 · 8 comments
Open

jjwg_Maps&action module not working #368

DBRenny opened this issue Oct 21, 2023 · 8 comments
Labels
Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Type: Bug Something isn't working

Comments

@DBRenny
Copy link

DBRenny commented Oct 21, 2023

JJWG Maps Action Module Not Working: No Map or Radius Map Functionality

Issue

The JJWG Maps module in SuiteCRM appears to be non-functional. While the module allows for the creation of area maps, there is no ability to interact with a map directly. Attempts to create an area map result in a page that doesn't load as expected, showing only a link at the bottom with an IFrame:URL, which doesn't seem to load.

There are several log entries indicating a "FATAL" exception, specifically related to an inability to load a template file ('file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl').

Expected Behavior

Users should be able to create and interact with maps within the CRM, including drawing area maps and viewing them.

Actual Behavior

The map functionality doesn't work as expected. Creating an area map leads to a non-functional page with an IFrame that doesn't load. Logs indicate fatal exceptions related to loading template files.

Relevant Logs


Multiple entries such as:
[FATAL] Exception in Controller: Unable to load template 'file:./custom/modules/jjwg_Maps/tpls/InfoWindow.tpl'

Possible Fix

Steps to Reproduce

  1. Navigate to the JJWG Maps module.
  2. Attempt to create an area map.
  3. Observe the resulting page and lack of interactive map functionality.
  4. Check the suitecrm.log for relevant error logs.

Context

This bug hinders the ability to use map functionalities within SuiteCRM, which is crucial for visualizing geographical data related to CRM activities.

Your Environment

  • SuiteCRM Version used: 8.4
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
  • Environment name and version: PHP 8.1.24, MariaDB 11.0.3
  • Debian GNU/Linux 11 (bullseye)

Relevant Community forum:
https://community.suitecrm.com/t/jjwg-maps-action-module-not-working-no-map-or-radius-map-functinality/90689

@DBRenny DBRenny changed the title SuiteCRM About Try for Free Download Docs profile, messages, bookmarks and preferences6 jjwg_Maps&action module not working jjwg_Maps&action module not working Oct 21, 2023
@chris001
Copy link
Contributor

Can you reproduce this issue on the online demo?

@DBRenny
Copy link
Author

DBRenny commented Oct 22, 2023

I tried, but it isn't the exact same setup. I don't have admin access using the demo account, so I had to paste the URL myself to get there.

I go here: https://suite8demo.suiteondemand.com/#/maps/quick-radius?return_module=jjwg_Maps&return_action=index

I put in an address, and I get

Last Geocode Status: REQUEST_DENIED

It doesn't seem to have geocoding setup on the demo. Mine doesn't have the same error as the demo site does.

Mine will have a link for an IFRAME that doesn't load anything at the bottom of the page. My system doesn't seem to have a problem geocoding addresses.

@chris001
Copy link
Contributor

I bet the demo site doesn't have a Google Maps javascript API key configured in the Admin page, so it's failing to geocode addresses with Google Maps, so it's not really possible to reproduce this issue on the demo site. Sigh.

DBRenny added a commit to DBRenny/SuiteCRM-Core that referenced this issue Oct 22, 2023
Problem:
The jjwg_Maps module was unable to locate custom templates due to incorrect path specification. This caused the maps functionality, particularly in the list map view, to fail loading.

Solution:
Implemented dynamic path resolution for the custom and default Smarty templates within the jjwg_Maps module. The solution checks for the existence of custom templates and falls back to default templates if custom versions are not found. This ensures that the module can always locate the necessary template files, preventing failures when attempting to load maps.

Fixes salesagility#368 error log, but full map module expected behavior is not restored.
@DBRenny
Copy link
Author

DBRenny commented Oct 22, 2023

I have what could be a partial fix @chris001. It resolves the quick radius search, but when I try to save a map - it doesn't let me view it... it just loads a blank page.

The system doesn't log any relevant errors at this point to resolve that.

Right now, I have restored the quick radius display.

Here is a potential fix - you can view my commit to my hotfix branch.

image

This view though doesn't have any useful results. It could be that I haven't defined an area yet though. There may be some minimum required information in the maps list module, that it needs to render a search?

image

Clicking on "Map Leads"
image

Results in this:
image

@DBRenny
Copy link
Author

DBRenny commented Oct 23, 2023

I did some additional error tracing, and I am outside my element here completely.

When I inspect the front end console from edge & chrome, I get these errors:

main-es2015.2d05a7aadf83a7084546.js:1 Unsatisfied version 0 of shared singleton module luxon (required =3.0.0)
t @ main-es2015.2d05a7aadf83a7084546.js:1
main-es2015.2d05a7aadf83a7084546.js:1 Unsatisfied version 12.2.13 of shared singleton module @angular/cdk/observers (required ^11.2.13)
t @ main-es2015.2d05a7aadf83a7084546.js:1
main-es2015.2d05a7aadf83a7084546.js:1 Unsatisfied version 12.2.13 of shared singleton module @angular/cdk/table (required ^11.2.13)
t @ main-es2015.2d05a7aadf83a7084546.js:1
dist_core___ivy_ngcc___fesm2015_core_js-_b2d41-es2015.b519f16cfd5cf3f012a4.js:17 Login success
3sugar_grp1_jquery.js?v=CypPcOauwQfY6l0-gHRMDQ:6 JQMIGRATE: Migrate is installed, version 3.4.0
index.php:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

sugar_grp1_jquery.js?v=CypPcOauwQfY6l0-gHRMDQ:6 JQMIGRATE: Migrate is installed, version 3.4.0
index.php:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

I enabled debugging on suiteCRM's logging, and here is a short output of it... seems to have multiple problems, one of them may be a halfway installed module (TapCRM), referring to modules not being mapped to the front end. I am waiting on someone to help with that install (separate issue).

This one seems like it may be a culprit.. but I am attaching the larger log for inspection.

Mon Oct 23 02:12:59 2023 [772][1][WARN] ModuleNameMapper | mapName | 'iFrames' not mapped to 'frontend'

suiteCRM_debug_log.txt

@chris001
Copy link
Contributor

chris001 commented Oct 23, 2023

In version 8, when you go to Admin / Repaid / Quick Repair Rebuild, and scroll to the bottom of the screen, it should give you an option to run a database command to add missing fields and tables in the database. You should run that and then see if this Maps module and the Radius Map will work.

@DBRenny
Copy link
Author

DBRenny commented Oct 23, 2023

I followed the steps, but it didn't give me an explicit option at the bottom of the repair and rebuild screen - but it did mention this in the last line:

Database tables are synced with vardefs

Interestingly enough, when I went to go check the maps module again after running the quick repair and rebuild - I get the same behavior. When I do another quick radius map, it works like in the screenshot above.. but I noticed the tack icons. I went to click one, and it says "Error: Template file not found." in the text box above the tack on the map...

I also noticed at the bottom of the screen, there is another link that says "IFrame: URL"... both of those could be symptoms of other path issues in these modules somewhere.

This seems more likely a culprit than package issues. Maybe we can add more detailed error tracing somewhere?

image

EDIT: This is what I have on some additional error logging level:

Mon Oct 23 05:00:43 2023 [714][1][WARN] ModuleNameMapper | mapName | 'maps' not mapped to 'frontend'
Mon Oct 23 05:00:43 2023 [714][1][DEPRECATED] Array
(
)

Mon Oct 23 05:00:43 2023 [714][1][WARN] Cannot find bean file for module: jjwp_Partners
Mon Oct 23 05:00:43 2023 [713][1][DEPRECATED] Array
(
)

Mon Oct 23 05:00:43 2023 [713][1][WARN] CSS File Dawn/yui.css not found
Mon Oct 23 05:00:43 2023 [713][1][WARN] Trying to get property of non-object: list view data "order by" is not defined
Mon Oct 23 05:00:43 2023 [713][1][WARN] Trying to get property of non-object: list view data "sort order" is not defined
Mon Oct 23 05:00:43 2023 [713][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Mon Oct 23 05:00:45 2023 [720][1][DEPRECATED] Array
(
)

Mon Oct 23 05:00:45 2023 [720][1][WARN] CSS File Dawn/yui.css not found
Mon Oct 23 05:00:45 2023 [717][1][WARN] ModuleNameMapper | mapName | 'maps' not mapped to 'frontend'
Mon Oct 23 05:00:45 2023 [716][1][DEPRECATED] Array
(
)

Mon Oct 23 05:00:45 2023 [716][1][WARN] CSS File Dawn/yui.css not found
Mon Oct 23 05:00:54 2023 [728][1][DEPRECATED] Array
(
)

Mon Oct 23 05:00:54 2023 [728][1][WARN] CSS File Dawn/yui.css not found

@chris001
Copy link
Contributor

Of concern in these logs:

  1. In this discussion thread, the same type of error as "ModuleNameMapper | mapName | 'maps' not mapped to 'frontend'" appeared, and was supposed to be fixed in a release not too long after that time. However it's awaiting reply from maintainers @clemente-raposo etc.
  2. Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
  3. Cannot find bean file for module: jjwp_Partners
  4. Trying to get property of non-object: list view data "order by" is not defined
  5. Trying to get property of non-object: list view data "sort order" is not defined

@johnM2401 johnM2401 added Type: Bug Something isn't working Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds labels Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants