backdrop-contrib / ip_geoloc

IP Geolocation Views & Maps for Backdrop CMS.
GNU General Public License v2.0
0 stars 2 forks source link

Backdrop + IPGV&M + Views gives error #17

Open delinuxco opened 2 weeks ago

delinuxco commented 2 weeks ago

I am in the middle of a project of migrating a Drupal 7 site to Backdrop and IPGV&M is the main attraction of this site.

I have replicated the D7 site in Backdrop for the most part, but when I create a view, it gives this error:


Error
Unsupported operand types: string * float 

In Recent log I get this:

TypeError: Unsupported operand types: string * float in ip_geoloc_generator_ip_geoloc_marker_locations_alter() (line 61 of /home/latinnet/beta.latinritemass.net/modules/ip_geoloc-1.x-1.x/ip_geoloc_generator/ip_geoloc_generator.module).

If I use Geomap or Leaflet they work fine, but IPGV&M always gives this error. I am using PHP 8.3

delinuxco commented 1 week ago

Anyone have an idea on this?

AlexHoebart-ICPDR commented 1 week ago

I have never tested nor used that submodule ip_geoloc_generator as it is just for creating test data. Could you try to disable it and test the IPGV&M map without it?

delinuxco commented 1 week ago

Well, disabling ip_geoloc_generator sub-module made the error go away.the module now loads. The Location differentiator does not work, it does not offer the different color option.

I did find that the Leaflet module does do automatic marker clustering, I just did not have two locations close enough together to trigger it, even though there is no setting for it.

I have spoken with my client, they are ok with not having the differentiator but would still prefer it.

indigoxela commented 1 week ago

I did find that the Leaflet module does do automatic marker clustering

FTR: the leaflet_markercluster submodule does. If you don't want clustering, disable the submodule. As simple as that.

delinuxco commented 1 week ago

I want clustering, it is the marker differentiator that does not work in IPGV&M, unless I am missing something. In the D7 version, it had pull downs to select marker color to a differentiator, as an example, let's say youwant to have an icon for Starbucks locations, another color for Pete's Coffee, another for Phyl's etc. That portion of IPGV&M is what is not functioning, I wonder if there is a library missing or something...

AlexHoebart-ICPDR commented 1 week ago

Can you go to the module settings at admin/config/system/ip_geoloc and check the path configured for Alternative markers. It might not be set correctly, the default marker paths are mentioned in the description. Please also note that there is an pull request to make the marker differentiator work. It's not yet merged as there is an open issue, but it works for me. I'm quite busy and not the author of this module - it seems I'm the only one using this module so far, but I do use marker differentiator so I am sure we can make them work for you.

delinuxco commented 1 week ago

admin/config/system/ip_geoloc I see the markers in the directory, they are in site_root/modules/ip_geoloc-1.x-1.x/markers/ ipgv m-config

Differentiator definetly not picking them up. ipgv m-differ

AlexHoebart-ICPDR commented 1 week ago

Just put modules/ip_geoloc-1.x-1.x/markers into that empty field. I always used custom markers, so I never noticed that you have to do this.

delinuxco commented 1 week ago

Well, that is my bad, I understood it as that those listed were already being watched. The colors all show up. But I cannot save an Association, I do not get any errors when saving but when I check the logs, I get the following:

ipgv m-error

AlexHoebart-ICPDR commented 1 week ago

Did you apply the PR? You can get it as a patch here: https://patch-diff.githubusercontent.com/raw/backdrop-contrib/ip_geoloc/pull/15.patch Save this file to the module directory and then apply the patch. (Do you know how to do that?)

delinuxco commented 1 week ago

Oh yes, I remember patching from Drupal. Patch worked, I have all of the associations done. Although, I had to do one at a time, it would not allow me to add them all at one. Add one, save, go back add one, save etc. but it does work.

Looks like I am just down to figure out the clustering,but I know it works on the formater Leaflet, so it must be a setting somewhere. I will keep at it, I may be able to reproduce the D7 view after all.

thank you so much for your help!