WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
My Page 2 is randomly redirecting to other posts (42 posts)

  1. hunt4freebies
    Member
    Posted 2 years ago #

    Hello,

    Every once in a while if you go to page 2 and so on, it redirects you to a single post. This is not happening all the time. When I clear my cache it fixes the problem.
    I currently went up from a VPS to a dedicated server. This issue was not happening on the VPS.

    Any help would be greatly appreciated.

    Warm Regards,
    Michele

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. hunt4freebies
    Member
    Posted 2 years ago #

    I want to be more specific. Here is excatlty what is happening.

    If I am logged in as an Admin and I do a Search From the WordPress Admin Bar and I go into a totally different browser and I go to my site and page 2 and every page after is redirecting to the "Search Page" ( http://hunt4freebies.com/?s=Kindle )

    It also has redirected to a URL that is a drafted (Non puplished) post, returning a 404 error.

    With WP Super Cache disabled this is NOT happening.

    Michele

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Michele,

    Does that happen every time? That's really useful. I'll try to figure out why it's happening. Meanwhile could you run the debug system in the plugin and do that search and reload in another browser and post a link to that debug log for me?

    Thanks.

  4. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    Yes this happens all the time, however sometimes it may take a little bit of time to come up. Once I clean the cache it goes away.

    This time I did a search on toothpaste. Here's the link that came up on page two: http://hunt4freebies.com/page/2/?s=toothpaste

    And here is a link to the Debug log.
    http://hunt4freebies.com/wp-content/uploads/2012/01/1f96573706bbf7a7f1754a94cd9ef2ae.txt

    Thanks so much for your help and time.

    Michele

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you! That is weird as that should not happen. :(

    This will help track down the bug though, I hope!

  6. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Can you download wp-cache-phase2.php and upload it to your plugins/wp-super-cache/ folder? It should overwrite a file of the same name there. I added an extra check which should stop the plugin creating supercache files for searches, I hope!

  7. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    Where do I download this from? Or do I just copy this after I open the page?

    Thank you!

  8. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Again,
    My bad I over wrote the PHP file. I will let you know what happens.

    Thanks again for all your help.

    Michele

  9. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    I just wanted to give you an update. I did what you said and so far I have not had the problem at all!! I will keep testing the site just be sure it's 100% okay, but so far so good.

    I can't thank you enough for your help, you are a Godsend.

    Kindest Regards,
    Michele

  10. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    I hope you don't see that bug again. Can you post in 24 hours again if you haven't seen it happen again?

    The bug is caused by PHP itself, not the plugin or WordPress, so it's really hard to track down. I simply added another (different) check that didn't rely on the bits that PHP literally destroyed!

  11. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Michele - can you update that wp-cache-phase2.php again? I added another debug line that will print a warning, "wp_cache_ob_callback: WARNING! $wp_query not defined." when these problems occur.

    I also fixed a small bug in my last fix - your blog is using legacy caching right now but if you update then it'll use supercache files again.

    Thanks again for your help tracking this down!

  12. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    Thank you so much I just now added that line of code.

    Do you think this could be a result of how PHP and Apache is setup on my server?

    Again I can't thank you enough for your help and time.

    Michele

  13. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    It's not your server, this happens on any PHP5 server randomly but not as often as you're seeing it. It's just how PHP is built unfortunately. There are hacks I can do to get around it but I would really like to know if you get that "$wp_query not defined" message as that will be solid proof that it's PHP interfering.

  14. hunt4freebies
    Member
    Posted 2 years ago #

    I noticed this happend less frequently when I was running version 5.3.8 PHP. Then the hosting company switched me back to 5.3.6 and this is when the problem would happen all the time.
    What version of PHP5 would you recommend?

    I will keep you updated with this. And if there is anything I could do to help more just let me know.

    Thank you again,
    Michele

  15. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    It's not really practical to recommend a version of PHP as it's always better to use the latest version (for bugfixes and security fixes). We just have to live with the oddness of whatever comes along unfortunately. :(

  16. feliped3
    Member
    Posted 2 years ago #

    Donncha,

    After a looong long time (months) searching across the internet, I've found this topic.

    We use PHP 5.2.x in all of our servers and this trouble always happened in some big blogs.

    I'll use this wp-cache-phase2.php and test it.

    Thanks

  17. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    feliped3 - grab the development version off the download page instead!

  18. feliped3
    Member
    Posted 2 years ago #

    Donncha, how are you?

    Thank you, but when I try to access WP Super Cache admin page I get:

    Fatal error: Call to undefined function do_cacheaction() in /home/em123/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 525

    I'm excited to get it working 100% =/.

    Thanks!

  19. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    Like feliped3 I am also getting the same Error trying to add the development version.

    Again I can't thank you enough for your fix! It's been working amazing!

    Warm Regards,
    Michele

  20. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Got that fixed. Download the development version in 20 minutes or grab wp-cache.php and copy it into your wp-content/plugins/wp-super-cache/ folder. Thanks for the bug report!

  21. hunt4freebies
    Member
    Posted 2 years ago #

    Donncha,
    I have a quick question for you. I have been working back and forth with my hosting company to make a few performance tweaks. Here's what happened over the weekend I was running PHP 5.2.17 with your wp-cache-phase2.php fix/update and had no issues with the original problem.
    We have now updated to PHP 5.3.8 and they noticed that we had a large number Crons running, which was causing the site to bog down. So they installed WP-Cron Control plugin. Now I am the having the very random page redirect again when WP Super Cache is enabled.

    This is what is happening if you go to page 3 first, then go to page 2 you will see the "Search Result" in there.

    I'm working on getting a De-bug report.

    Michele

  22. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    hunt4freebies - can you try the development version (again)? I've since fixed a number of bugs. One of those fixes may help.

  23. hunt4freebies
    Member
    Posted 2 years ago #

    Donncha,
    I just now put in the development version.

    Thanks so much for all of your help and time, I really appreciate it.

    Michele

  24. feliped3
    Member
    Posted 2 years ago #

    Hello!

    Let's go Test!

    Thank you so much ;)

  25. feliped3
    Member
    Posted 2 years ago #

    Not working =/.

    I clear the cache page. When a I access the Home page (for example), I get the link of the second page as http://www.site.com/page/2/?s=nomedofilme%253aoreidosladresidioma%253aportugusbrformato%253advd-rservidorpreferencial%253amegauploadsugestoparamelhoriadosite%253anormalmenteomegauploaddemoramaisparavcsuparem%252cmasesteomelhorsiteparabaixarnomed

    But I didn't have made any search. I've marked the checkbox to dont cache /?x=y and updated the .htaccess rules =/.

    Some idea?

    Thanks

  26. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    It's still happeing, but just a bit different. The first page I go to 2,3 etc are fine and show the proper page, any pages after that return the "Search" result.

    I do have the development version installed.

    Thanks,
    Michele

  27. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    hunt4freebies, feliped3 - anything show up in the debug log? It's disappointing that this happens. Does your theme do anything to the $wp_query?

  28. hunt4freebies
    Member
    Posted 2 years ago #

    Hi Donncha,
    We run a Genesis theme and I'm not sure if the theme does anything to the $wp_query?

    If you could point me in the right direction on how check the theme I could do that.

    I will do anything I can to help you pin point this problem.

    Thanks again for all your help and time,
    Michele

  29. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    hunt4freebies - can you send me your theme so I can look over it, or even better, give me access to your server (ftp and WordPress admin logins) so I can debug this better. I tried replicating what you're seeing and I can't and after fixing the is_search() command and checking for GET parameters I'm at a loss. :(

    My email is donncha at ocaoimh.ie

  30. bolonki
    Member
    Posted 2 years ago #

    Perhaps the issue is WP-SuperCache's interaction with WP-PageNavi, as I see that both Hunt4Freebies and my site use that plugin for pagination.

    On my blog random search strings '?s=RandomSearchTerms&sbutt=go' are being added at the end of the normal pagination '/page/4/' URL

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic