Open Kuurusch opened 7 years ago
Did you turn off "Visitor tracking" in the Admin plugin settings?
No, it is activated
@flaviocopes Any ideas, how I can debug this situation?
The functionality is all provided in https://github.com/getgrav/grav-plugin-admin/blob/develop/classes/popularity.php#L47
So you might want to add some exit();
calls in that function, to determine where in the flow it's stopping. If you reach the end, might be permission issues in saving the data under logs/popularity
So is this true, that I have to look in the user/plugins/admin/classes/popularity.php ? When I analyse in this file the function trackHit(), this function is newer be called! What could be the problem? In which file is this function called?
Hm, but this function "onShutdown()" is never called! I placed an exit just at the first line in this function, and nothing happens!
You won't see an exit because it's called after everything is sent to the browser. Put a log statement in there that will write to a file. Then you can see if it's called.
Ou, ok, I thought it's something like this. Thank you!
Okdoky, my call does not survives this "foreach" https://github.com/getgrav/grav-plugin-admin/blob/develop/classes/popularity.php#L63
But strangely, it also don't ends with a return statement, so it doesn't enter the if
@Kuurusch that's weird. Maybe dump what's the content of $this->config->get('plugins.admin.popularity.ignore')
, and when it's breaking - inside the if
, or if it enters the foreach at all.
Hm, so it's strange that in the admin-interface under "Popularity" there are two ignore patterns: "/test*" and "/modular". But if I try to delete them, they stay after I click the "safe-Button".
The foreach it enters, but it turns only ones with "/test*". Afterwards it breaks somehow.
There is an issue with removing all elements from a list. I discovered it yesterday, going to fix it now. You can check by manually removing the items in your user/config/plugins/admin.yaml
Ou cool, thanks a lot! I will try this weekend. Then I can investigate further, if the crash occures because of this second item some how. It's strange behaviour
@flaviocopes Hey, there is still a problem with removing all elements from the list! I can delete the two entries "/test*" and "/modular" in admin.yaml over the admin-interface, but in the interface itselve they stay
I think this is a problem as soon as one changes something else in the admin-interface and press the safe-button. After that these two entries are again in the admin.yaml-file!
Ok, I've found the problem with the statistic-function. I found out, that the fnmatch()-function from php is in my system not known. It's something with POSIX, so somehow it seems, OpenWRT is not fully POSIX compatible and therefore PHP has not installed the POSIX-functions. But I thought, OpenWRT is based on Debian and Debian is POSIX conform...
Hallo, I'm back with a new problem :) I've recognised, that the statistics on the frontpanel in the admin-interface does not work. It stays 0. Any idea what the problem could be or how to debug? I tested it from several other IP-destinations but nothing happens.