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
Provider/ISP URL sometimes does not work #13045
Comments
I would like to work on this! @Findus23 where do you click on the ISP in the web interface? |
Hi, That’s perfect! You can see the url in the visitor log and location report. https://demo.matomo.org/index.php?module=CoreHome&action=index&idSite=3&period=day&date=yesterday#?idSite=3&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog but I think the best place to fix this are the lines I linked to above. |
I found the issue here:
Removing:
will solve the problem, but I don't know if this is good long-term solution. I think it will take refactoring a bit to get the IP passed in and using gethostbyaddr() to get the url for the provider. This way, it should work no matter the url extension. @Findus23 Is there a way I can test my change by adding test providers? Are providers saved to the db somewhere? |
Pull Request made for change: #13110 |
How about changing the regex to be more specific, e.g.: This should match if there is at least a Second-level domain followed by a dot and a Top-level domain after. |
Guess the easiest way would be to use the hostname validator to check if it's a valid hostname |
Another beginner friendly bug:
When I click on the ISP
Rostelecom
it wan't to go tohttp://www.rostelecom/
as it thinks the providername is an URL ending withcom
. As many ISPs are called telecom I guess this could happen quite often:matomo/plugins/Provider/Provider.php
Lines 82 to 84 in 9243b9a
matomo/plugins/Provider/Provider.php
Lines 118 to 126 in 9243b9a
PS: This code was added in def7586 11 years ago!
The text was updated successfully, but these errors were encountered: