-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hits per Page no longer works #380
Comments
Hi, Thanks for your reply! Yes I have a value in |
Can you please tell me where and which line did you put the |
I put the var_dump here: File
But I just noticed that there is a test on the api prefix in
I think the problem is here, because when I remove my function |
Weird, worked fine with that function to change the REST API prefix! Let's try changing the priority of the hook or move it to a different place, |
The head of my Child Theme functions.php:
In your test do you use a child theme? |
I changed the REST API Prefix by that function through the child-theme, worked fine! You need just to update the Permalink by pressing the Save Changes button. |
Ok so similar to my case... I think I will test on clean installation and add parent theme, child theme and extensions one by one to test. Yes I already saved Permalink in wp-admin many times ;) |
If still doesn't work, just play around with the WP-Statistics's hooks priority.
|
And if we put filters in function called after
? But I don't understand why it doesn't work for me but it works for you :/ |
…I'm not sure I can be of any help troubleshooting, but: Me too! I'm not sure what exact date it stopped working. And I'm wondering if it's related to some security-setting/tweak I've changed in the iThemes Security plugin https://wordpress.org/plugins/better-wp-security/ |
Good point! let's test in a fresh WordPress installation. |
You're really good in SEO 😎 |
Weird indeed, have you changed the robot's configuration recently? @craigconstantine |
I fiddled with something— some setting related to cache as I though maybe I had that wrong, and had caused my original, actual callout... which is: Why are there no page accesses being counted? |
Maybe this is the same issue. After upgrading a site from WordPress 4.9.4 to 5.7 and updating WP statistics along with other plugins, it seems the page hit counting stopped. The hits column in post/pages list for the articles published after the upgrade keeps showing 0. But on the settings page I can see that it tracks overall site visitors/visits. It just stopped tracking individual page hits. Unfortunately, I don't know what version number WP statistics was before I updated it but it probably hadn't been updated in about 2 years. Tried disabling other plugins but doesn't seem like anything changed. |
I've been keeping up with WP and wp-statistics updates within days of every release of both, for years. This just started recently for me. Very oddly, I have 4 other WP sites that use wp-statistics and things are fine on those sites. On the site with the problem, I recently used a plugin to remove a bunch of [what i believe were] unused tables from the database. So I've been thinking that maybe I removed a table that wp-statistics needs?? I'd expect much more brokenness though... Can a dev tell me the tables is expects so I can verify I didn't remove one that's needed? …or does it have any sort of "check my tables" functionality built in?? |
I think it's not a db table problem @craigconstantine. @craigconstantine and @dannymasao do you override the WP API prefix? The default API prefix is "wp-json" (https://mywebsite.com/wp-json). For me, it's because I override this API prefix by "api" (https://mywebsite/api) that hit per page doesn't longer work, when I restore "wp-json", it works! FYI the potential override may be in plugin, or when using hook "rest_url_prefix" in file "functions.php": |
http://constantine.name/wp-json/ exists on my server, yes. (So I've not intentionally changed that, and no plugin seems to have changed it.) I notice that "wp-statistics" also appears in the output . . . I cleared my browser cache and loaded a page on my site. Here's all the resources fetched across the network... I don't see anything in here that indicates j/s making an API call to track a page load . . . am I reading this correctly: |
When the Cache Compatibility option is enabled, then you can see the REST API request in the Network XHR panel. If the counter does not work, probably related to a cache issue or REST API endpoint which is blocked or restricted by some security plugin, In terms of experience, It might help to find the issue by checking the following:
|
Weird indeed, can someone give me WordPress access? I think I need to check something there, please send the access to mostafa@veronalabs.com |
In an effort to keep poking at this, I decided I'd not mind losing all my historical stats... so I delete and installed the plugin. IT'S FIXED. o_O ...all my page stats are now showing. So this tells me they were being recorded all along, and there was just something wrong with display —— is it possible there's some setting I flipped off that killed display of the stats, and delete/install reset some config I'd jiggled?? |
@craigconstantine did you just uninstall and then reinstall the extension? This is what I just did and it didn't work :( |
…yes, that's all I did. |
Not sure if there is a fix on this as I have also come across this issue using PHP 7.4.27 and WordPress 5.9 with plugin version 13.1.15. With WordPress debug mode enabled, below error are shown at the "Page" view page:
Using the Debug Bar plugin, I am able to see below in the Query tab that the plugin is trying to retrieve data from the table
However, if tried to check the table, the table does not exist, is that expected? |
Hi!
First of all, thanks for your powerful extension!! ;)
I use WP Statistics for several months and I have noticed since August 16th no data is captured for hits per page :(
I debug and I found a clue in function
Pages::get_page_type()
(fileincludes\class-wp-statistics-pages.php
):get_queried_object_id()
return0
, andglobal $post
is null :/But when I make
var_dump(get_queried_object_id());
I have0
in API call/api/wp-statistics/v2/hit
3 times and I have the good value (75
) 2 times on frontend, is it normal?Thanks for your reading :)
The text was updated successfully, but these errors were encountered: