[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.8

No permission to download
@digitalpoint

Getting this error when trying to use the spam cleaner from the front end with the check IPs option enabled. Seems everything else runs fine prior to the error.

Error Log

Code:
Server error log

    ErrorException: [E_DEPRECATED] Use of "parent" in callables is deprecated src/addons/DigitalPoint/Cloudflare/XF/Pub/View/SpamCleaner/CheckIps.php:40

    Generated by: Admin Sep 11, 2024 at 12:43 PM

Stack trace

#0 [internal function]: XF::handlePhpError(8192, '[E_DEPRECATED] ...', '/home/xf/p...', 40)
#1 src/addons/DigitalPoint/Cloudflare/XF/Pub/View/SpamCleaner/CheckIps.php(40): is_callable('parent::renderJ...')
#2 src/XF/Mvc/Renderer/AbstractRenderer.php(92): DigitalPoint\Cloudflare\XF\Pub\View\SpamCleaner\CheckIps->renderJson()
#3 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('XF:SpamCleaner\\...', 'public:spam_cle...', Array)
#4 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Json->renderView('XF:SpamCleaner\\...', 'public:spam_cle...', Array)
#5 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#6 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#8 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#9 src/XF.php(806): XF\App->run()
#10 index.php(23): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(31) "/spam-cleaner/member.277/"
  ["referrer"] => string(52) "https://sub.domain.com/members/member.277/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["_xfToken"] => string(8) "********"
    ["check_ips"] => string(1) "1"
    ["no_redirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(26) "/members/member.277/"
  }
}

Console

View attachment 310736
If you replace this:

PHP:
if (is_callable('parent::renderJson'))

with this:

PHP:
if (method_exists(get_parent_class($this), 'renderJson'))

Does it work as expected?
 
The url works when you click on it but it doesn’t show on my forum. That’s the issue know what I mean? It just doesn’t load on my forum but clicking on the image link will show it.
 

Attachments

  • IMG_2821.webp
    IMG_2821.webp
    37.8 KB · Views: 6
Ya, probably need to look in the dev tools network tab or something to get the exact URL that isn't working... or maybe right click on the broken image and inspect it?
 
This is what I get when I inspect the broken image. Is that what you meant?
<img class="newsView-newsThumbnail-header" src="/data/news_thumbnails/0/248.jpg?1726088307" alt="Berlin's Border Controls Spark Migration Debate Amid Far-Right Surge in Germany" title="Berlin's Border Controls Spark Migration Debate Amid Far-Right Surge in Germany">
 
Try disabling it and see if it still happens.

But ya, my guess is they might not be using XenForo’s abstracted file system, and assuming files are in the default location.
 
Try disabling it and see if it still happens.

But ya, my guess is they might not be using XenForo’s abstracted file system, and assuming files are in the default location.

Ok great so I asked and according to the add on developer the News Publisher thumbnail already XenForo’s abstracted file system.
——————

I wonder where things went wrong. Even in regular threads and posts that aren’t associated with the add on the image will appear on the thread but won’t in the upload box. This all started after the tranfer to R2.

IMG_2834.webp
 
How many addons do you have installed? Seems that there is one somewhere that’s changing the behavior of the attachment upload process and not applying the abstracted filesystem URL to thumbnails.

I have a few of andy’s, dragon’s social groups, xen porta, news publisher, blog by xenaddonas. I mean I can disable them one by one and see if that fixes the issue. I’ll do that now.
 
I have a few of andy’s, dragon’s social groups, xen porta, news publisher, blog by xenaddonas. I mean I can disable them one by one and see if that fixes the issue. I’ll do that now.
Check ones that do anything to the attachment upload process (the first ones to disable to check anyway).
 
Installed this plugin for someone else. That person invited me so I have all the needed permissions.

Created the API key and installed the add-on. everything works, accept for "Access":
Code:
9999: access.api.error.not_enabled: Access is not enabled. Visit the Access dashboard at
https://dash.cloudflare.com/ and click the 'Enable Access' button.

Any idea how I can solve that?

Edit:
Looks like I need to configure Zero Trust first. And for that I need payment info (even though I choose the free tier).
On hold :)
 
Last edited:
I have a few of andy’s, dragon’s social groups, xen porta, news publisher, blog by xenaddonas. I mean I can disable them one by one and see if that fixes the issue. I’ll do that now.
If you happen to have developer mode enabled, and you can see the Development menu in the admin area, check Admin -> Development -> Class extensions.

Chances are high that the issue exists in a class that extended one of these:

XF\Pub\Controller\Attachment
XF\Entity\Attachment
XF\Entity\AttachmentData
Installed this plugin for someone else. That person invited me so I have all the needed permissions.

Created the API key and installed the add-on. everything works, accept for "Access":
Code:
9999: access.api.error.not_enabled: Access is not enabled. Visit the Access dashboard at
https://dash.cloudflare.com/ and click the 'Enable Access' button.

Any idea how I can solve that?

Edit:
Looks like I need to configure Zero Trust first. And for that I need payment info (even though I choose the free tier).
On hold :)
Must be a new thing. But even if you enable it, it shouldn’t necessarily cost anything. It’s free for the first 50 users defined in Access. Maybe you need to enable it in case you go over 50? 🤷🏻‍♂️

 
Back
Top Bottom