[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.9.1.1

No permission to download
When I try the latest version, I get this and it kills the site:



Is the old version available anywhere? (I overwrote it :( )
I tracked it down... it does look like you need XenForo 2.2.8 or higher (that's when the method was introduced). So made a change so it will work, just not log geo-location data for sessions if you are using XenForo before 2.2.8.
 
Last edited:
I must be missing something since it's still not showing.

How do you enable gio-location?

It's also not retroactive (it's only for new posts, not old).
 
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.

Yup, that fixed it on mine as well!
 
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.
will this revision be in a updated version?
 
There's an internal option that stores your Cloudflare Account ID (can see it on the debug options page if you have debugging enabled).

The error you see would be because the account ID isn't set (it's important that it's set).

Normally it's all automatic, but there is a mechanism where the addon would erase the value that is set there. Specifically, if an API request is made and Cloudflare returns a 10000 error (which is an authentication error... meaning your API token credentials are not correct). The intent is that it will pick up the correct account ID once the issue resolves itself (the token has permissions to work with it).

If you set secondary restrictions on your token (for example only certain IPs can use it), you really should remove that restriction... because if your server ever makes a request from an IP you didn't whitelist, the API request will fail because you told Cloudflare to only allow the token to be used from a specific IP. It will cause nothing but problems... additionally, IP restrictions can't be used with presigned URLs unless you are whitelisting the IPs of your users (which obviously can't realistically be the case).

If it's only an issue with whatever "future post" thing you are doing, maybe somehow it's doing those from a different IP than the server normally uses (like maybe it's being pushed to a cron job that runs elsewhere). But again... save yourself future headaches and disable IP restrictions on token usage if you put one in place.
This only happened on a couple of scheduled posts, which were a few weeks out from the publishing date. I did another scheduled post a day in advance three days ago--no issues. Every other post that wasn't scheduled also had no issues. No IP addresses have changed.

For now, I'm chalking it up to a random error that happened on a few scheduled posts. But also, from here on out, I'm watching for it to happen again so I can make note of how/when/where it happened. It's a bit embarrassing for an article to appear weeks later and have all the images broken. Given how the rest of the year is going to be, I'm having to prepare and schedule some content weeks if not several months in advance.
 
This only happened on a couple of scheduled posts, which were a few weeks out from the publishing date. I did another scheduled post a day in advance three days ago--no issues. Every other post that wasn't scheduled also had no issues. No IP addresses have changed.

For now, I'm chalking it up to a random error that happened on a few scheduled posts. But also, from here on out, I'm watching for it to happen again so I can make note of how/when/where it happened. It's a bit embarrassing for an article to appear weeks later and have all the images broken. Given how the rest of the year is going to be, I'm having to prepare and schedule some content weeks if not several months in advance.
Do you have IP address restrictions on your API token?
 
Yep… Windows doesn’t support flag emojis.
Just to clarify things - it´s showing flags with latest Firefox on Win11 - Chrome and Edge don´t do it.

With FF I´m seeing " <div data-template-name="public:geo_macros::flag" class="country at" title="Austria"></div>" while Chome shows " <div class="country de" title="Germany"></div>" and so does Edge.
 
I haven't had time to check, but it's strange it would affect only two or three out of hundreds of posts I've made.

I won't worry about it unless it happens again.
It would be affected anytime your server presents a different IP to the API (maybe the server has backup network connections or something). 🤷🏻‍♂️
 
It would be affected anytime your server presents a different IP to the API (maybe the server has backup network connections or something). 🤷🏻‍♂️
True dat. I've used the host since 2018 without anything but minor issues (maybe once every year or two). That's why I'm not to worried about my issue with these posts at the moment. If it happened on every post, I'd certainly revisit all my settings with a fine-toothed comb.

I had a weird issue with using it on another couple of non-XF sites though. Had everything set up and working, and it quit working on all sites after maybe several months to a year. (I don't work with them regularly.) I ended up having to generate a new API token (or whatever it was) and that got the R2 buckets working again.

I have another Cloudflare issue but it's not directly relevant to XF. The certificate shown in Zero Trust expires tomorrow, and the "install" procedure involves, I guess, installing certs on the servers. I don't remember doing this five years ago. I only use Zero Trust to protect our Admin area and our test installations in XF and (ugh) WordPress, so I don't even know if I need to do anything other than create the new certificate. CF's documentation isn't that clear. I don't use WARP or anything else.
 
True dat. I've used the host since 2018 without anything but minor issues (maybe once every year or two). That's why I'm not to worried about my issue with these posts at the moment. If it happened on every post, I'd certainly revisit all my settings with a fine-toothed comb.

I had a weird issue with using it on another couple of non-XF sites though. Had everything set up and working, and it quit working on all sites after maybe several months to a year. (I don't work with them regularly.) I ended up having to generate a new API token (or whatever it was) and that got the R2 buckets working again.

I have another Cloudflare issue but it's not directly relevant to XF. The certificate shown in Zero Trust expires tomorrow, and the "install" procedure involves, I guess, installing certs on the servers. I don't remember doing this five years ago. I only use Zero Trust to protect our Admin area and our test installations in XF and (ugh) WordPress, so I don't even know if I need to do anything other than create the new certificate. CF's documentation isn't that clear. I don't use WARP or anything else.
Ya no idea… the addon doesn’t do anything with certificates when it adds Zero Trust protection for admin area. If you did it 5 years ago, no clue what you did. 😀
 
Ya no idea… the addon doesn’t do anything with certificates when it adds Zero Trust protection for admin area. If you did it 5 years ago, no clue what you did. 😀
As a side note, it's kind of sad that I can come here and ask a question about this and get a clear answer in minutes, vs. digging hours through Cloudflare's online docs and their support forum and still come up empty.

Or I could use the search engines' AI and get a completely inaccurate answer... 🫤

Cloudflare owes you a salary... 😁
 
As a side note, it's kind of sad that I can come here and ask a question about this and get a clear answer in minutes, vs. digging hours through Cloudflare's online docs and their support forum and still come up empty.

Or I could use the search engines' AI and get a completely inaccurate answer... 🫤

Cloudflare owes you a salary... 😁
Cloudflare support definitely could be better, but I also understand that realistically it’s going to be difficult for them to offer top level support for 20,000,000 customers that don’t pay them a penny. Just the logistics of the scale… if 20,000,000 people used this (free) addon, I promise you that support would be far worse. It’s a different thing when I have to start hiring and paying people to support users that don’t bring in any money. 😀

If you need support in a timely manner, check Cloudflare’s developer Discord. 😉
 
Cloudflare support definitely could be better, but I also understand that realistically it’s going to be difficult for them to offer top level support for 20,000,000 customers that don’t pay them a penny.
On the flip side, everyone from free customers to enterprise customers use the same features, so while they may not be able to offer support, you'd think they would at least explain a lot more of these features in the docs. It's not like any of us can afford weeks to study everything in-depth just to learn their lingo and the names of all their services. But I've used other technologies on other sites that had minimal but very helpful documentation, and had no issues.

At least there are a few customers/users out there who help others. But it's also not their job to provide support.
 
On the flip side, everyone from free customers to enterprise customers use the same features, so while they may not be able to offer support, you'd think they would at least explain a lot more of these features in the docs. It's not like any of us can afford weeks to study everything in-depth just to learn their lingo and the names of all their services. But I've used other technologies on other sites that had minimal but very helpful documentation, and had no issues.

At least there are a few customers/users out there who help others. But it's also not their job to provide support.
100% agree… their docs could be better, but they also are not the worst I’ve dealt with. Along the same lines, their entire API needs to be gutted and redesigned. Some of the **** I have to deal with (because of their API) is maddening.
 
There are Chrome and Edge extensions that can add in the country flags. I've tried to substitute the Windows emoji font in the past, but MS has it locked down in a way that any of the hacks that worked in the past no longer work. I don't know why we can't just have the ability to replace their emoji font with one of our own, and leave it up to us to try to figure out why flags don't work.
 
Do you have any records in the xf_dp_ip_geo table?

Hey buddy, I did the upgrade, checked all permissions, I get nada IP info in xd_dp_ip_geo table.

Cloudflare IP settings updated, no restrictions, XF reporting correct IP info so not sure what's happening.

And yes checked new posts. :)
 
Last edited:
Back
Top Bottom