Locations not seen on generated Map.

9 years 11 months ago #1 by chrisc
There is a note in the FAQ on this topic which is reproduced below.

There are a few possible causes of this, but the most common is that the site is configured to use an .htaccess file which is preventing access to the mapping function, which generates the map markers. If you are using a '.htaccess' file then you need to add the following to the file:

RewriteRule ^modules\/mod_ipmapping_mapper\/map_data\.php$ - [L]


We recently encountered a problem upon a site where the above line had indeed been placed in the .htaccess file but the locations were still not displayed. Inspection of the .htaccess file, revealed that the line had been placed at the 'end' of the file. Unfortunately the way in which the .htaccess file is processed meant that the line was not being seen since an earlier directive had been invoked first.

The solution was to move the line to a much earlier position in the .htaccess file. The result was that location points were immediately seen in the generated map.

We learnt two things from resolving this problem. The first was that one cannot assume that when we ask have the instructions been followed, to which the answer was correctly yes, that we need to be more precise in our instructions. The second thing learnt was that we can not assume that people have a deep understanding of all of the aspects of their systems.

This is why we have to ask, what often seem silly questions to extract as much information as we can from people when reporting problems.

Regards

If you are using our extensions please leave a review at the JED: IP Mapping | Issue Tracker | JAudit | Password Control

Please Log in or Create an account to join the conversation.

9 years 10 months ago #2 by kwally
I also cannot see lications on the map.
I included the rewriteRule directly after the "RewriteEngine on".

I have added the API-key of IPinfoDB.com into the component (Option menu) and into the "IP Mapping Visitors Agent".

But there ar other unusual things:
1) When I look via PhpAdmin into the table #_extensipons, I see the API-Key only in the component. The API-key-field in the module is empty.
2) When I add manually an entry into the table "Locations" (via the component in the backend), I get the warning "IP InfoDB API Key not specified."
The manually added entry just consists of my own IP and a phrase.
Except this entry the table is empty even after several visitors from different countries.

The map can be seen under
www.glorious-food-glossary.com/cms/
In this non-working-state, you have to register to see it.

Any idea, what to do?



And last not least: Slashes must not be escaped in a RewriteRule:
stackoverflow.com/questions/3591452/do-y...en-using-mod-rewrite

Please Log in or Create an account to join the conversation.

9 years 10 months ago - 9 years 10 months ago #3 by geoffc
The API key only needs to be added to the component. The module will check if it is set and use it from there if present.

The warning 'IP InfoDB API Key not specified' seems to indicate that the key is not being accepted for some reason. I have seen it myself on rare occasions, (even when I know the key is correct!) but usually it resolves itself on a second save.

There are actually two mechanisms in place to determine location data. The API key is the first and the second doesn't require a key, so should work regardless although it does have some limitations.

I would expect that the location data is populated by the second mechanism even if the API is wrong.

If the locations table is not being populated by visitors, this is the second visitor agent module that needs to be looked at. It needs to be placed upon the pages where you wish to collect visitor information. This is often every page, but you may only want to collect forum visitor information for example.

I would suggest that the visitor agent is looked at first, then looking into why the location data is not added as a second step. When the location data is present then we can look at them not occuring on the map as the final step.

What version of Joomla is this, and could you confirm the version of IP Mapping in use?

Re the slashes in the RewriteRule, the stackoverflow answer says they 'do not have to be escaped'. This is correct, and is different from saying 'they must not be escaped'. In practice when using Regex the slash is used as a parameter separator so if there is a need to use the slash within the string itself, it has to be escaped, otherwise is is a normal character.

Regards
Geoff

Please Log in or Create an account to join the conversation.

9 years 10 months ago #4 by kwally
Thanks for yiu quick replay.
What means "second save" ? Should I enter it again in the component? I did it, but no markers shown neither in the map nor the table.
BTW: IPinfoDB is presenting the API with leading spaces. I did not include them.

The location table #_ipmap_location" is still not populated, except for my manually entered records. Each record has the fields countryname and countrycode NULL except one, where I entered a wrong IP. There these fields are UNKNOWN and ZZ.

The visitor agent is included and shown on all pages. I changed the title to "Our Visitors".

I have Joomla 2.5.20 and I downloadeed the most recent IP-mapping from yoiur site. It was named 1.2.2. The downloaded file has the name IP_Mapping_1_2_2.zip and the extension manager reports 1.2.2 for the component and the mapper but 1.2.1 for the Visitors agent.

Whatever the specific problem might be, one general problem is, that many parties have to work properly together. So I suggest, you include in the next version a first example record in the location table. With this, the mapper can show a marker even when all other (vistors agent, API, IPInfoDB, etc.) fail.

Please Log in or Create an account to join the conversation.

9 years 10 months ago - 9 years 10 months ago #5 by geoffc
By second save, I meant edit the IP address without location data and just save it again.

Where a location data is given as UNKNOWN and ZZ, this is usual where the IP address is within the defined private IP range. i.e. 10.x.x.x, 192.168.x.x etc. Since these could be anywhere none of the IP location services can possibly know where they are. Effectively these records can not be mapped.

The versions are fine, and indeed we use the same versions ourselves on our live site.

Have looked at the front end of your site and cannot see the 'visitor agent', in the page source. I looked at a few pages with the same result. This 'absence' would explain why the location table is not populated. If you have set the title of the module, then I would expect the title to be visible somewhere on the page(s), but nothing else, since the module is used to 'capture' information rather than display it.

Update: As a test try placing the visitor module in a more prominent location. I assume it is in a debug position, which works on other templates I have used/seen, but may not be applicable for the template your site is using perhaps?

Regards
Geoff

Please Log in or Create an account to join the conversation.

9 years 10 months ago - 9 years 10 months ago #6 by kwally
I now added the same IP-address in a new record. With "second save" I thought you are referring to the API-key.

With the Vistors module, I thought, it was public, but I saw now, I made it accessible for registered visitors. Nevertheless, it shoudl have recorded my own accesses. I made it now public. But if this module does not display anything, I would prefer to hide the title and place it later somewhere in the corner.
Currently it is in the left column below the main menu and above the Google map

And for testing, I made now also the map public on all pages.

Please Log in or Create an account to join the conversation.

Time to create page: 0.193 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries