• Resolved bobf000

    (@bobf000)


    Something is going on with the latest version update (1.42). In the referrers column “There is nothing here. Yet!” is the only thing shown. Also all “pageviews” and “visitors” have exactly the same number. That’s virtually not possible.

    edit: Just noticed it also show critical errors in the log.

    Error Details

    An error of type E_ERROR was caused in line 187 of the file /home/XXX/YYY/nastycomics.eu/public_html/wp-content/plugins/koko-analytics/src/class-pageview-aggregator.php. Error message: Uncaught TypeError: array_merge(): Argument #1 must be of type array, false given in /home/XXX/YYY/nastycomics.eu/public_html/wp-content/plugins/koko-analytics/src/class-pageview-aggregator.php:187

    Another edit:
    WordPress version 6.6.2
    Active theme: Hueman (version 3.7.25)
    Current plugin: Koko Analytics (version 1.4.2)
    PHP version 8.3.2

    • This topic was modified 1 month ago by bobf000.
    • This topic was modified 1 month ago by bobf000.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hello @bobf000,

    I’m sorry to hear that. Is this for any date range or only for data that came in after the update to version 1.4.2?

    As for the error you’re seeing in your logs; this indicates that PHP somehow has trouble reading the built-in referrer blocklist from a file that we include in the plugin package. This could be due to insufficient memory or invalid file permissions, but it’s hard to know. I’ve updated the plugin code to take unexpected errors like this into account.

    Thread Starter bobf000

    (@bobf000)

    PHP memory limit2048M WP_MAX_MEMORY_LIMIT 2048M. I guess that should do it.

    Range… yes, since the update. Older entries are unaltered/can-still-be-viewed.

    Plugin Author Danny van Kooten

    (@dvankooten)

    @bobf000 Lol, yeah, that should definitely be plenty. The file is less than 50 kilobytes large but there is a small overhead for PHP to store the data in an array. But yeah, that should all easily fit and it’s probably a permissions error instead.

    The fact that you can view older date ranges without any issues indicates that the issue is related to your stats collection being broken due to the error right now. I will push out an update for the plugin tomorrow morning in which it will be fixed.

    In the meantime, you can try making the wp-content/plugins/koko-analytics/data/referrer-blocklist readable by your webserver, if that’s anything you have control over.

    Best,
    Danny

    Thread Starter bobf000

    (@bobf000)

    The “data” folder itself exists (permissions: 755 ) but there are no files in it at all (except an htaccess).

    edit: last modified “3 days ago”. That’s when I updated the plugin…

    • This reply was modified 1 month ago by bobf000.
    • This reply was modified 1 month ago by bobf000.
    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi @bobf000,

    Thank you for checking! That explains the error…

    What’s weird is that the file exists in the plugin package (see here for version 1.4.2), so either the update somehow skipped installing this file (could be a temporary hiccup?) or something on your server deleted the file, possibly because it thinks there is malware in it? The file contains a list of domains which are known to perform referrer spam, so I can definitely see some type of malware scanner flagging this as a false positive.

    You can manually create an empty file called referrer-blocklist for now to get rid of the error, or the actual file taken from the link above. The next version of the plugin (due tomorrow) will handle file related errors more gracefully so that we don’t have to worry about this happening again.

    Best,
    Danny

    Thread Starter bobf000

    (@bobf000)

    I took referrer-blocklist from Github. Place it manually in data folder but it doesn’t work. The file will immediatly vanish into thin air. May have something to do with protection-tools I installed on my server, protecting “suspicious” actions like that.

    For now I downgraded to v.1.4.1. referrer-blocklist is now visible, and stays visible in the data folder. Immediatly noticed a google-referrer showing up so this will do for now.

    Plugin Author Danny van Kooten

    (@dvankooten)

    @bobf000 The mystery continues. I am pretty certain that in version 1.4.2 a domain was added to the blocklist that is triggering some kind of security tool running on your server which will automatically delete the file.

    I can offer no advice on how to disable this behavior but I can make sure our plugin functions without that file. This may mean some referrer spam ends up slipping through the cracks, but usually this spam is targeted anyways so it is not necessarily an issue right away.

    Anyway, happy to hear we know what’s going on now, thanks for working with me to get to the bottom of this! Version 1.4.3 will fail gracefully once said referrer-blocklist file can’t be read.

    Thread Starter bobf000

    (@bobf000)

    More insight info…

    My site is hosted at hostinger. Their mallware scanner marked the block-list as mallware. Hence the instantly deleted file. I rolled back one version but now that file seems to be permanently marked, making it very difficult to access my site (non-solvable Captcha’s and/or 403’s) as it’s now marked as “mall ware”. I explained the problem to them, directed them to the github and told those #%#$!$ to solve it as soon as possible. It’s not the first time I have issues like this with them. They promised to have a look at it, put that file on their whitelist, but I heard promises like that before…

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi @bobf000 ,
    Hah, yes, having Hostinger whitelist that file would be ideal as it’s a nice little extra protection. However, I released Koko Analytics version 1.4.3 today which will fail gracefully if said file does not exist. So you should also be able now to update to the latest version instead to get things working again.

    Best, Danny

    Thread Starter bobf000

    (@bobf000)

    Did the 1.4.3 update and it looks like everything works as intended.

    Thread Starter bobf000

    (@bobf000)

    Got a message from Hostinger:

    I want to reach out regarding previous request, the requested files has been whitelisted, please check again.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Awesome – if true! Thanks for the follow-up @bobf000, much appreciated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.