WordPress.org

Support

Support » Plugins and Hacks » WPTouch breaks after upgrading WP Super Cache to 1.0

WPTouch breaks after upgrading WP Super Cache to 1.0

  • 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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

    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.

    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 …

    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?

    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.

    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.

    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!

    @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.

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

    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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WPTouch breaks after upgrading WP Super Cache to 1.0’ is closed to new replies.