[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.9.1.1

No permission to download
No... the IP address for the post itself. Go to one of the posts that happened after you enabled it all, and make sure you have the IP address logged for it (normal XenForo function where you can see the IP of the post).
Thanks for hanging in there... I assume you mean here:
1738104035878.webp
I click on IP and get this:
1738104320785.webp
 
Could it be a Redis conflict?
I doubt it, but it's possible (not a conflict so much as Redis not working as expected). Specifically, if you are using a caching mechanism (like Redis) to read options from, if Redis isn't returning the option value for whatever reason it would be a problem. You could toggle Log IP address locations option on/off to force XenForo to write the value to Redis again. That's probably not what's going on, but it's really simple to try.

What I think is more likely, is that your server is configured in a non-standard way as far as IP addresses. If you go to your admin area, and go to the following URI: admin.php?tools/phpinfo, go down to the PHP Variables section. There is some basic logic about when it tries to log the location...
  1. The option to log it needs to be enabled (duh).
  2. The $_SERVER['REMOTE_ADDR'] variable needs to be set (can see it on the PHP info page).
  3. The $_SERVER['REMOTE_ADDR'] variables needs to match what was just written/logged to the xf_ip table.
So a couple things come to mind... if your setup isn't logging the exact right IP address it wouldn't work (for example if you have something that is anonymizing the last part of the IP address). This could be various proxy headers that could be interfering as well.
  • HTTP_VIA
  • HTTP_X_FORWARDED_FOR
  • HTTP_CF_CONNECTING_IP
...if I were guessing, your server is probably setup so that REMOTE_ADDR is Cloudflare's IP and HTTP_CF_CONNECTING_IP is the user's IP and you are letting XenForo handle the IP address translation? I probably should have accounted for that, but I forgot people do that. 😬
 
  1. The $_SERVER['REMOTE_ADDR'] variable needs to be set (can see it on the PHP info page).
  2. The $_SERVER['REMOTE_ADDR'] variables needs to match what was just written/logged to the xf_ip table.
The two ip addresses are different. Is it because I have Proxy enabled in Cloudflare?

Also, toggling the setting didn't change anything.
 
The two ip addresses are different. Is it because I have Proxy enabled in Cloudflare?
Ya... it's normal. And ya, that's what the issue is because I'm stupid and forgot about that "what if". It's easy enough to fix (already been fixed on this side).

If you go into the DigitalPoint\Cloudflare\XF\Entity\Ip.php file and replace two two instances of this:
PHP:
$_SERVER['REMOTE_ADDR']

with this:
PHP:
\XF::app()->request()->getIp()

...and let me know if it works for you then.
 
Ya... it's normal. And ya, that's what the issue is because I'm stupid and forgot about that "what if". It's easy enough to fix (already been fixed on this side).

If you go into the DigitalPoint\Cloudflare\XF\Entity\Ip.php file and replace two two instances of this:
PHP:
$_SERVER['REMOTE_ADDR']

with this:
PHP:
\XF::app()->request()->getIp()

...and let me know if it works for you then.
It seems to have worked. Is is supposed to just have the words or display a flag?

1738108663597.webp
 
Ya... it's normal. And ya, that's what the issue is because I'm stupid and forgot about that "what if". It's easy enough to fix (already been fixed on this side).

If you go into the DigitalPoint\Cloudflare\XF\Entity\Ip.php file and replace two two instances of this:
PHP:
$_SERVER['REMOTE_ADDR']

with this:
PHP:
\XF::app()->request()->getIp()

...and let me know if it works for you then.

I went through the same troubleshooting issues as @Semper Fidelis and I'm having the same issue. All the IP info is enabled properly and it's showing up on current visitors, and on the post... but the xf_db_ip_geo table is empty. I'm also running the absolute latest plugin version thats available.

Code:
MariaDB [databaseXX]> select * from xf_dp_ip_geo;
Empty set (0.001 sec)

We use redis for a cache, could this be the issue?

Code:
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['namespace'] = 'xfredis_';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
        'server' => '127.0.0.1',
        'port' => 6379,
        'compress_data' => 6,
        'connect_retries' => 2,
        'use_lua' => true,
        'read_timeout' => 1,
        'timeout' => 1,
        'serializer' => 'igbinary',
    ];
 
See this video about how to add Country Emojis to Windows. There is also a way to install the Tampemonkey Chrome extension in the notes.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Is this a bug or intended?
No flag icons on the first post if the thread type is article or question forums.
 
I went through the same troubleshooting issues as @Semper Fidelis and I'm having the same issue. All the IP info is enabled properly and it's showing up on current visitors, and on the post... but the xf_db_ip_geo table is empty. I'm also running the absolute latest plugin version thats available.

Code:
MariaDB [databaseXX]> select * from xf_dp_ip_geo;
Empty set (0.001 sec)

We use redis for a cache, could this be the issue?

Code:
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['namespace'] = 'xfredis_';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
        'server' => '127.0.0.1',
        'port' => 6379,
        'compress_data' => 6,
        'connect_retries' => 2,
        'use_lua' => true,
        'read_timeout' => 1,
        'timeout' => 1,
        'serializer' => 'igbinary',
    ];
See: https://xenforo.com/community/threads/digitalpoint-app-for-cloudflare-r.206176/post-1730783

Hi @digitalpoint,

Is it possible to add a user preference to allow users to turn off showing their country flags?
Thanks for the great feature.
Probably not... the intent isn't really for users to "show off", it's for mods/admins to know where someone is at. So it would be along the same lines as giving users the ability to disable them being tracked by IP address.

Is this a bug or intended?
No flag icons on the first post if the thread type is article or question forums.
It's working for me when I test it with question forums (are you looking at a question that was posted since you installed/enabled the geo-location stuff)? Article support has been added for next version.
 
  • Like
Reactions: rdn
When I try the latest version, I get this and it kills the site:

  • Error: Call to undefined method SV\UserActivity\XF\Repository\SessionActivity::getDefaultSessionActivityExpiration()
  • src/addons/DigitalPoint/Cloudflare/XF/Repository/SessionActivity.php:20
  • Generated by: Unknown account
  • Jan 29, 2025 at 5:10 PM

Stack trace​

#0 src/addons/SV/UserActivity/XF/Repository/SessionActivity.php(39): DigitalPoint\Cloudflare\XF\Repository\SessionActivity->updateSessionActivity(0, '180.149.31.49', 'XF\\Pub\\Controll...', 'Index', Array, 'valid', '')
#1 src/XF/Pub/Controller/AbstractController.php(82): SV\UserActivity\XF\Repository\SessionActivity->updateSessionActivity(0, '180.149.31.49', 'XF\\Pub\\Controll...', 'Index', Array, 'valid', '')
#2 src/XF/Pub/Controller/AbstractController.php(42): XF\Pub\Controller\AbstractController->updateSessionActivity('Index', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#3 src/addons/SV/UserActivity/UserCountActivityInjector.php(27): XF\Pub\Controller\AbstractController->postDispatchType('Index', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#4 src/XF/Mvc/Controller.php(287): SV\UserActivity\XF\Pub\Controller\WhatsNewPost->postDispatchType('Index', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#5 src/XF/Mvc/Dispatcher.php(383): XF\Mvc\Controller->postDispatch('Index', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#6 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:WhatsNewPost', 'Index', Object(XF\Mvc\RouteMatch), Object(SV\UserActivity\XF\Pub\Controller\WhatsNewPost), NULL)
#7 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserActivity\XF\Pub\Controller\WhatsNewPost), NULL)
#8 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#10 src/XF.php(512): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

Is the old version available anywhere? (I overwrote it :( )
 
Back
Top Bottom