• Resolved peter achutha

    (@peter-achutha)


    My website is using Atahualpa theme but have changed the theme to Twenty Seventeen to figure out why additional webpages show up in the stats. I have deactivated all plugins and cache so that the interaction is with me and WordPress only. Currently on WP 4.9.2 but this has occured in earlier versions.

    After seeing my blog webpages that I did not visit in the stats I decided to check the access logs to see if they were recorded there. Below is a small part of my access logs.

    
    ----------------------------
    183.78.44.12 - - [Fri Jan 19 06:01:40 2018] "GET /making-good-quality-chili-powder-with-a-delonghi-grinder/ HTTP/1.1" 200 0 "https://bachutha.com/how-to-open-durian-fruit-easily/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
    
    183.78.44.12 - - [Fri Jan 19 06:01:44 2018] "GET /delicious-garlic-chili-sauce-with-apple-cider-vinegar/ HTTP/1.1" 200 0 "https://bachutha.com/making-good-quality-chili-powder-with-a-delonghi-grinder/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
    
    183.78.44.12 - - [Fri Jan 19 06:02:07 2018] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 47 "https://bachutha.com/wp-admin/plugins.php?plugin_status=all&paged=1&s" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
    
    183.78.44.12 - - [Fri Jan 19 06:03:40 2018] "GET /chia-seed-santan-coconut-milk-cherry-fruit-pudding/ HTTP/1.1" 200 0 "https://bachutha.com/making-good-quality-chili-powder-with-a-delonghi-grinder/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
    
    66.249.69.62 - - [Fri Jan 19 06:03:42 2018] "GET /robots.txt HTTP/1.1" 200 22 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +https://www.google.com/bot.html)"
    
    66.249.87.30 - - [Fri Jan 19 06:03:42 2018] "GET /chia-seed-santan-coconut-milk-cherry-fruit-pudding/ HTTP/1.1" 200 0 "-" "Mediapartners-Google"
    
    183.78.44.12 - - [Fri Jan 19 06:03:44 2018] "GET /healthy-delicious-coconut-milk-santan-coffee/ HTTP/1.1" 200 0 "https://bachutha.com/chia-seed-santan-coconut-milk-cherry-fruit-pudding/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
    -------------------------------
    

    Just to show you the order of pages I have listed part of the blog menu below. The item number shows the sequence of the posts, smaller numbers mean earlier posts.

    My Menu

    
    126. delicious garlic chili sauce with apple cider vinegar
    125. making good quality chili powder with a delonghi grinder
    124. healthy delicious coconut milk santan coffee
    123. chia seed santan coconut milk cherry fruit pudding
    122. increase metabolic rate with raw garlic and virgin coconut oil
    121. simple slow cooking pork soup recipe
    120. high fiber orange juice with bioflavonoids and pectin diet
    119. easy way mash hard boiled eggs
    118. no-fly-zone
    

    From the access log you can observe that the first log statement shows I clicked on
    “/making-good-quality-chili-powder-with-a-delonghi-grinder/”
    to view that page and I viewed that page. The access log shows in the second statement that WP did a “GET” on the next post
    “/delicious-garlic-chili-sauce-with-apple-cider-vinegar/”
    but no one viewed this page. Why does this second statement appear if the page was not viewed?

    The 4th access log statement shows that I was still on the first page “/making-good-quality-chili-powder-with-a-delonghi-grinder/” and not on the next page “/delicious-garlic-chili-sauce-with-apple-cider-vinegar/” when I clicked on the menu to view “/chia-seed-santan-coconut-milk-cherry-fruit-pudding/”

    What is interesting is that, as shown on the 6th access log statement Google was called to view that page, “/chia-seed-santan-coconut-milk-cherry-fruit-pudding/”, too. I have noticed that it can take Google about 3 seconds to 30 seconds to visit the page it was called to view. I have seen this occurring many times over the last one year. I do not remember if it occurred earlier.

    If I have understood this clearly, then WP
    1) calls the next post while I am viewing a post but does not display it to me
    2) calls Google to view this post or the next post without me knowing about it.

    What can I do to stop this from happening?

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hello Peter,
    Thanks to share your problem.
    The above information you are showing that your plugins have created glitch into the database and this will need to make updated before running your blog.
    You must clear your database and remove unnecessary updation from the WP-OPTION data table via p database access.
    I face the same problem with my blog [link redacted] and after remove the plugins quires executed by the plugins. The blog working fine.

    • This reply was modified 7 years, 2 months ago by Andrew Nevins.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @mybirchi, Thanks for helping out, I just have to raise a very minor point and that is to avoid linking to your site when providing support. That’s all, thanks again.

    Okay
    Thanks Andrew

    Thread Starter peter achutha

    (@peter-achutha)

    Hi mybirchi,

    Thanks for your reply as I have been trying to fix this problem for more than a year and failed at it.

    I did not understand what you had mentioned.

    1. I used phpmyadmin to look at the database but could not find a WP Options data table. Should there be one there or am I looking at the wrong place?

    2. I have written 3 of my own plugins but for safety safe and to make it impossible for my plugins to corrupt the database they do not access the database at all. There are only 4 plugins that I used to use. They are Google Sitemap by BestWebSoft which I only activate after I have written a post, SEOPressor which I have deactivated and not used for a few years, SI Captcha Anti-Spam which I have now deactivated and lastly Limit Login Attempts which normally is active but turned off over the last few days to find a solution to this problem.

    In this case how would I clear the database as, from experience, some years back the export/import feature does not work properly, so the fear of loss of parts of my web site still keeps the flight or fight response active in me. I hate trying to clean up the database as in my case it has never worked. My sites do get hacked a lot so I have spent many years developing code to block hackers. I did find one post that appeared to be corrupted or missing but I edited the database to clean it up. It has lasted a year now but It has gone missing again. The rest of the posts are in good condition so I dread trying to clean up the database.

    This means I do not know how to “You must clear your database and remove unnecessary updation from the WP-OPTION data table via p database access”.

    Even with the plugins deactivated I still get the problem. Should I try deleting them one by one?

    Thanks for your help and am eagerly waiting for your response.

    Thread Starter peter achutha

    (@peter-achutha)

    Hi mybirchi,

    Let me correct the previous message. There is a wp options table but I do not know what to check for.

    Thanks and best regards,
    Peter

    Thread Starter peter achutha

    (@peter-achutha)

    Hi mybirchi,

    I went through the WP Options table and when I was listing all the records (220 records) phpmyadmin gave me a warning:-

    Warning: A form on this page has more than 5000 fields. On submission some fields might be ignored due to PHP’s max_input_vars configuration

    Does this mean one record was corrupted?

    Peter

    Thread Starter peter achutha

    (@peter-achutha)

    Just to let those reading this know that I found that some themes also create garbage posts. I found this when I was inspecting the WP POSTS database table and noticed garbage posts records which were inserted when I was testing different themes to replace Atahualpa theme.

    Beware of the themes you check out.

    Thread Starter peter achutha

    (@peter-achutha)

    Hi mybirchi (@mybirchi)

    Thanks for your help. I found out that you are correct about this (its a database problem) but I have not solved the problem yet. It is still there. If I managed to solve it I will report it here.

    I used many database plugins to clear/restore/correct/restore my database and my database size dropped from 8MB to 2MB. Unfortunately, the problem did not go away.

    I then tried to install WP version 4.0.0 which I had downloaded many years ago to check if the problem was related to the later versions of WP. Unfortunately, WP would not allow me to run version 4.0 and insisted that I upgrade to version 4.9.2. and WP upgraded the database.

    Then I used phpmyadmin to export the WP POST table to an XML file and deleted all of WP (files & database) so that I was starting with a clean slate. I reinstalled WP (version 4.9.2), installed the Twenty Ten Theme and deleted the two records in table WP POST and imported the XML file into this table. Unfortunately that did not work either.

    Fortunately, I had kept a copy of an older database when I moved servers. The older database is about 30MB in size. After editing wp-config.php file to use the older database the problem disappeared! Amazing! This ‘confirms’ that it is a database issue or at least related to the WP program accessing the database.

    Unfortunately, I do not want to use the older database so I am back to square one.

    Will update you later.

    Thanks
    Peter

    Thread Starter peter achutha

    (@peter-achutha)

    Those plugins I have used are not the cause.

    I found out that 1 post viewed but stats shows 2 posts viewed only occurs in FireFox. It does not occur if I use Chrome browser.

    I will get back if I have anymore info.

    Thread Starter peter achutha

    (@peter-achutha)

    Today I confirmed that this problem occurs even on other servers. I originally saw the problem on Reseller Panel servers using Hepsia Control Panel but upon testing with InMotion servers using cPanel, the problems still exists. So it does not appear to be server related issue.

    I found out that when I use FireFox and viewed the last post, only one post is recorded as viewed. Unfortunately, if I view any earlier post, not the last published post in WordPress, the logs will always show that I viewed two posts.

    When I used Opera, Internet Explorer or Chrome, I never had 1 WordPress webpage viewed but 2 recorded in the access logs. So this issue is not replicated using other browsers. It appears to be only a FireFox issue.

    If FireFox or WordPress trouble shooting staff need my WordPress database to reproduce my WordPress site on their servers to trouble shoot the problem I am willing to provide it to them.

    • This reply was modified 6 years, 10 months ago by peter achutha.
    Thread Starter peter achutha

    (@peter-achutha)

    Today I decided to confirm that the issue was not related to the database or the plugins. So I deleted my temporary WordPress site and installed the latest version – WordPress version 4.9.6.

    I did not install any plugins and created three posts, ‘step-one’, ‘step-two’ and ‘step-three’. The ‘hello-world’ post was not deleted.

    Then I used chrome browser and looked at step-one webpage. After that I used FirFox to look at step-two web page.

    See the access logs records below (I did not show all the records related to loading of these pages):-

    ——— access log revords ————

    183.78.44.68 – – [20/May/2018:20:54:58 -0700] “GET /mytest/step-one/ HTTP/2.0” 200 57810 “https://drpetersnews.com/mytest/” “Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36”

    183.78.44.68 – – [20/May/2018:20:10:18 -0700] “GET /mytest/step-two/ HTTP/2.0” 200 57803 “https://drpetersnews.com/mytest/” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0”

    183.78.44.68 – – [20/May/2018:20:10:24 -0700] “GET /mytest/step-three/ HTTP/2.0” 200 57294 “https://drpetersnews.com/mytest/step-two/” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0”

    ———- end of records ————-

    Chrome show one wep page viewed that is step-one web page, where as FireFox shows two pages viewed – step-two and step-three. It claims that I viewed step-three webpage too.

    So it appears that the issue is not related to WordPress plugins or Themes an only to FireFox. Does this mean that if your visitors use FireFox, the search engines will think that your site has twice the number of visitors and improve your ranking?

    Thread Starter peter achutha

    (@peter-achutha)

    Hi mybirchi @mybirchi,

    Finally, I have managed to fix the problem. After months of changing and testing PHP code I noticed that if there is ‘bad’ code in the PHP script this problem can get worse. I noticed that when there is a variable that is not set (isset() is false) and you test the variable with an ‘if’ condition the visitor stats shows more visits.

    This error notice showed up when my script was getting worse was:-

    Notice: Undefined index: 183.78.44.237 in /home/bachutha/public_html/index.php(46) : eval()’d code on line 1070

    the code was:
    if( $ip == $ipaa[$ip][0] ){ ...

    In order to receive this warning I had to add the following code in WordPress index.php at the top.

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

    My guess is that was probably why the plugin you mention was causing the problem.

    I had asked around in one of the FireFox forums but there was no response. A few days ago I submitted this problem to bugzilla, https://bugzilla.mozilla.org, for reporting bugs in Mozilla products. One of the tech support guys responded, https://bugzilla.mozilla.org/show_bug.cgi?id=1494272, and told me to check https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections.

    That was when I found out the FireFox does a prefetch for the next webpage. This prefetch results in two webpages visited instead of one (and messes with my visitor stats).

    When I set network.prefetch-next option in Firefox to ‘false’ the second webpage visit disappeared from the stats. Problem solved. I am still monitoring the situation. My guess is that the plugin problem you mentioned may be ‘bad’ PHP code and may be related to the network.prefetch-next option set to true too.

    Unfortunately, as I am rushing to get my hacker protection firewall for WordPress up and running, I have not done any tests to confirm that ‘bad’ PHP code will not cause more webpage views when network.prefetch-next option is set to ‘false’.

    I hope this helps others too.

    Thread Starter peter achutha

    (@peter-achutha)

    Bugzilla tech support has just informed me is that “Firefox does only prefetching if there are headers present in the html document.”

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘1 post viewed, stats shows 2 posts viewed’ is closed to new replies.