Views stopped working after one day
-
the plugin worked perfectly for the first day post installing, now it doesn work at all, i have cleared the cache also, i am using this plugin on a virtual host, can it be the issue?
-
Hi there!
Please, post your site’s URL so I can take a look.
https://www.loveandotherbugs.com this is already a running site, n i have added a virtual host for the same(for development).
Existing site doesn have popular posts functionality.Thanks and Regards
Well, I can’t check what’s happening if your production site isn’t using the plugin ??
Since I can’t access your development site either (or can I?) you’ll have to provide further info. Simply saying “it stopped working” isn’t very helpful, is it? As a fellow developer you should know at least that. For example:
- What’s the expected behavior, and what’s actually happening? (in your case, screenshots might be of help).
- Do you have a caching plugin installed?
- Try visiting one of the posts / pages using a different browser and see if WPP register the visit. What happens? Is the visit registered on the Stats section?
- Etc.
1) Please find the single.php below(if it can be of any help)
<?php get_header(); ?> <div class="mainContentBx innerPageWrapper"> <div class="detailArticleWrapper"> <div class="homepageCarousel"> <div class="home-owl-carousel"> <?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <div class="item"><img src="<?php echo $feat_image; ?>"></div> </div> <div class="clear"></div> </div> <div class="wrapperToCenter"> <div class="articleContentInner"> <?php $catname = get_the_category( $post->ID ); ?> <h3><?php echo $catname[0]->name; ?></h3> <h4><?php echo $post->post_title; ?></h4> <p class="mainContent"><?php echo $post->post_content; ?></p> <!--Next read --> <?php $next = get_custum_next_post($post->ID, $catname[0]->term_id); $nexcat = get_the_category( $next[0] ); $nex_feat_img = wp_get_attachment_url( get_post_thumbnail_id($next[0]), 'medium' ); ?> <div class="nextReadBx"> <h5>NEXT READ</h5> <div class="listingLHS"> <div class="listingLHSBx"> <div class="mainImg"> <img src="<?php echo $nex_feat_img; ?>" /> </div> <div class="contentBx"> <h3><?php echo $nexcat[0]->name; ?></h3> <h4><a href="<?php echo $next[2]; ?>"><?php echo $next[1]; ?></a></h4> <p><?php echo $next[3]; ?></p> <a href="<?php echo $next[2]; ?>" class="readMore">Read Full Post</a> </div> <div class="clear"></div> </div> </div> </div><!--Next read ends --> </div> <div class="listingRHS mTopRHS"> <!--Most Popuplar Starts --> <div class="mostPopularBx"> <div class="mosPopularCtnr"> <h2><span>Most</span>POPULAR</h2> <?php wpp_get_mostpopular(array('stats_views' => 0, 'limit' => 3, 'range' => 'all', 'post_type' => 'post')); ?> </div> </div><!--Most Popuplar Ends --> <!--We Fancy This Starts --> <div class="weFancyThisBx"> <h2 class="rhsHeader"> <span>We Fancy</span>THIS </h2> <?php $fancyimage = get_field('image', 'category_2719'); $fancylabel = get_field('label', 'category_2719'); $fancylink = get_field('link', 'category_2719'); ?> <img src="<?php echo $fancyimage['sizes']['medium']; ?>" /> <h3><a href="<?php echo $fancylink; ?>" target="_blank"><?php echo $fancylabel; ?></a></h3> </div><!--We Fancy This Ends --> <!--Ad Wrapper Vertical Starts --> <div class="adWrapper"> <a href="javascript:;" target="_blank"><img src="<?php echo TEMPLATE_URL; ?>/images/ad-vertical.jpg" /></a> </div><!--Ad Wrapper Vertical Ends --> <!--Our Reel Starts --> <div class="ourReelBx"> <h2 class="rhsHeader"><span>Our</span>REEL</h2> <a href="javascript:;"><img src="<?php echo TEMPLATE_URL; ?>/images/our-reel.jpg" /></a> <h3><a href="javascript:;">That 70s story : Double Denim</a></h3> </div><!--Our Reel Ends --> </div> <div class="clear"></div> </div> </div> </div> <!--Load More --> <div class="loadMoreDiv"> <div class="wrapperToCenter"> <div class="clear"></div> </div> </div> <?php get_footer(); ?>
2) Could not attach a screenshot here but i will try explaining, there is a most popular section on my site where the top 3 viewed article names are to be listed, but right now it says “Sorry. No data so far.”
3) Am not using any caching plugin, and have tried visiting the posts from a different browser but the stats section still says “Sorry. No data so far.” even for “All Time” range.
4) Also wanted to ask you if your plugin restricts its use, if the virtual host is same as the production website?
Could not attach a screenshot here
Upload the screenshot to Imageshack or a similar service, and then post the URL here.
If it’s not showing any data even with Time Range set to “All-time”, then it means that your wp_popularpostsdata/wp_popularpostssummary BD tables (created on install by WPP) are either empty or they do not exist.
You said before that the plugin did work once (and that you cleared the cache, I’m assuming you meant WPP’s cache), so I’m guessing they’re just empty. Still, just to make sure, log in into your hosting panel and check via phpmyadmin that these DB tables do exist. If they do, then it could be a Javascript error caused by another plugin / script that’s preventing WPP from updating the views count. I can’t tell for sure since I can’t see the error myself.
Also wanted to ask you if your plugin restricts its use, if the virtual host is same as the production website?
It shouldn’t matter, IMO.
The two WPP tables are there in my database and they had some values when the plugin was working, i cleared the WPP cache from tools when it stopped registering new values in the table, and also tried reinstalling the plugin. Even cleared the WPP data tables before installing again.
Please find the screenshots below
https://imageshack.com/a/img903/5301/1mG0mF.png
https://imageshack.com/a/img538/3001/xyX0Rn.png
https://imageshack.com/a/img540/9337/gndsHd.pngIs Data Sampling enabled? (Settings > WordPress Popular Posts > Tools)
It is disabled
https://imageshack.com/a/img538/3446/hOV1E1.pngWell, the only thing I can think of now is -as I said before- maybe something’s preventing WPP from updating the views count. Disable all of your plugins -except for WPP- and try visiting one of your posts again. Also, you may want to check the console (ctrl+shift+j in Chrome) to see if there are any Javascript errors (if there are, please get a screenshot of that and post it here).
It’s past 1 a.m. here, so for now I’ll go to bed. I’ll check back again in a few hours.
Will surely try disabling rest of the plugins. Will get back to you on this shortly.
(There is no javascript error on any page)Thanks for being so patient and replying promptly.
Don’t worry about it. Take your time ??
Hi Hector,
Tried deactivating all other plugins but WPP still didn work ??
Well, unless I get access to your development site there’s nothing much I can do now. Without seeing the site it’s near to impossible for me to guess what’s going on ??
- The topic ‘Views stopped working after one day’ is closed to new replies.