WordPress.org

Ready to get started?Download WordPress

Forums

WPTouch breaks after upgrading WP Super Cache to 1.0 (11 posts)

  1. marhgil
    Member
    Posted 2 years ago #

    after upgrading wp super cache to 1.0, mobile version of my site started to fail. sometimes, it serves the desktop version, sometimes, the mobile version. it's totally random. also, the switch on the bottom to view the desktop/mobile version does not work anymore. i have no problems prior to upgrading. you can check the site at macuha.com. im using the latest wptouch version. im using an iphone to test.

  2. jerd
    Member
    Posted 2 years ago #

    This has to do with changes in the mobile support in the latest version of WP Super Cache.

    The reason the site is randomly showing the mobile site is because a non-mobile version is being cached (this means that someone on a mobile device probably visited that page and they have the mobile site turned off [by toggling the option at the bottom of the page])

    I wrote a very quick and very dirty patch that works around the problem, feel free to use it if you like.

    wp-super-cache-1.0-wptouch.patch

  3. BraveNewCode Inc.
    Member
    Posted 2 years ago #

    marhgil, also make sure that WP Super Cache is configured to properly work with WPtouch by adding WPtouch's default user agents to the 'rejected user agents' area of WP Super Cache, then empty its cache.

  4. Donncha O Caoimh
    Member
    Posted 2 years ago #

    Hmm, I guess the best way to handle this would be a chunk of code in the caching plugin that detects when wptouch is installed, (or any other mobile plugin) and modify the user agent strings ...

  5. marhgil
    Member
    Posted 2 years ago #

    fixed it by following BraveNewCode's suggestion to add the default user agents to the "Rejected User Agents". So, this means that the caching on mobile version added on wp super cache 1.0 is ignored, right?

  6. Donncha O Caoimh
    Member
    Posted 2 years ago #

    BraveNewCode - can you grab the latest WP Super Cache from here and tell me if plugins/wptouch.php looks ok? It uses the browser list functions in your plugin to modify the list in Supercache.

    The development version will update in the next 20 minutes and in my testing the theme switcher worked and showed the ordinary theme again.

  7. fifelskik
    Member
    Posted 2 years ago #

    Weird, I had the same problem today with WP Touch and W3 Total Cache plugin. IE9 viewers on a pc saw the mobile version when they clicked on one of my links. I disabled the plugin and now the page loads normal.

  8. Donncha O Caoimh
    Member
    Posted 2 years ago #

    fifelskik - give the development version of WP Super Cache a go. I think you'll like it as it has native support for WP Touch. And I need people to test it too!

  9. marhgil
    Member
    Posted 2 years ago #

    @Donncha, I tried using your development code on macuha.com and I got this error after updating the .htaccess file. I deleted the .htaccess code from # BEGIN WPSuperCache and # END WPSuperCache and let it regenerate the code. After that, I got this warning:

    Warning: strpos() [function.strpos]: Empty delimiter in /home/marhgil/macuha.com/wp-content/plugins/wp-super-cache/wp-cache.php on line 271

    The On-Off switch on WPTouch now works with the new update, though.

  10. marhgil
    Member
    Posted 2 years ago #

    The "Rewrite rules must be updated" warning is also persistent even if I already regenerated the .htaccess file with the new rewrite rules.

  11. BraveNewCode Inc.
    Member
    Posted 2 years ago #

    Donncha,

    The development of WP Super Cache is working without issue here with the latest version of WPtouch.

    However, enabling the support for WPtouch seems like it may cause an issue for those upgrading to the Pro version. If you don't mind, please let me know what e-mail address I can reach you at or drop a quick message via our contact form at http://www.bravenewcode.com/contact-us. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic