WordPress.org

Ready to get started?Download WordPress

Forums

WPtouch Mobile Plugin
Shows mobile theme in Facebook's web browser on iPad (20 posts)

  1. sadhaka
    Member
    Posted 1 year ago #

    I find that WPTouch (not Pro) shows the mobile theme in Facebook's web browser when viewed on the iPad, even when caches have been purged, etc.

    http://wordpress.org/extend/plugins/wptouch/

  2. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Can you please share the URL of the website in question? We'll gladly take a look for you.

  3. DFC005
    Member
    Posted 1 year ago #

    I noticed the same problem tonight with my website.

    http://www.zerotackle.com

  4. sadhaka
    Member
    Posted 1 year ago #

    I have the same problem. Since my site is viewed by quite a few people from the FaceBook iPad app's in-app browser I had to deactivate the plugin. I made sure all caches were purged, too. Shame, because the site breaks on the iPhone without it.

    Any idea what causes the bug?

  5. mikeotgaar
    Member
    Posted 1 year ago #

    Further info: May be a conflict with W3TC cache. (WP3.5.1, WPTouch latest version 1.9.6.3) (same with previous version)
    From what I can see, when a mobile version of site is served, this version gets cached, replacing the normal cached page.
    This happened with a client's site http://www.clearwaterrealestateonline.com so I had to de-activate the plugin as he needs his site working normally for visitors from Facebook (biggest referrer)

    Possibly only blog posts served as mobile version: It appears this only happens (this site anyway) with blog post content type (as far as I can tell), and the main blog page (list of posts)

    "Turn off mobile theme" button doesn't work - just reloads the mobile version. (definitely a cache issue)

    The plugin worked fine with Super Cache before, but I had to switch to W3TC as Super Cache won't pre-load the site to cache since WP3.5

    I'll try to replicate this on one of my own sites and post the link

  6. sadhaka
    Member
    Posted 1 year ago #

    I immediately thought this was an issue with W3TC and caching, but I don't see how it can be, because purging *all* W3TC caches still results in the mobile version showing on the iOS Facebook app's in-app browser - but on nothing else (except the iPhone, as it should be).

    I had noticed before a separate issue where sometimes the mobile version would show on a non-iPhone browser, but this was always rectified immediately when the W3TC caches were purged.

    In this situation, it's only the iOS Facebook app's in-app browser that shows the behaviour, nothing else, and it doesn't go away when the W3TC caches are purged.

  7. mikeotgaar
    Member
    Posted 1 year ago #

    Definitely sounds like 2 different issues...
    Thanks for the additional explanation.

  8. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    Caching plugins and services tend to overwrite your desktop theme with posts and pages stored using your mobile theme (and vice-versa). The Facebook app may be employing its own caching. Until caching software can recognize the theme being used, we offer support to assist you in disabling them from activating when mobile devices are detected. This will allow you to see your mobile theme on mobile devices and your desktop theme on desktop browsers as expected.

    For the free version of WPtouch, enter the user agents found under Advanced Options > Custom User-Agents to the "rejected user agents" areas in your caching software's settings. Remember to clear your plugin, browser, and device caches before retesting.

    As caching has little to do with WPtouch, beyond providing guidelines for setup, we are unable to provide additional support for third-party products and services. If one caching plugin or service isn't working well with your WordPress configuration, we recommend contacting the developer and/or trying another.

  9. sadhaka
    Member
    Posted 1 year ago #

    So where in W3TC's settings is "rejected user agents"?

    And how will this make a difference if "The Facebook app may be employing its own caching"?

  10. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    Here are the instructions for setting up W3 Total Cache to reject mobile devices:

    Note: It is required to have “Browser Cache” disabled in W3 Total Cache as there is currently no option to exclude user agents from that caching method.

    1. Go to the "Page Cache" settings under the Performance tab.
    2. Copy the list of mobile user agents found under Advanced Options > Custom User-Agents. If you have added support for additional mobile devices in WPtouch Custom User-Agents field, you must also include those user agents in the "Rejected User Agents" area in W3 Total Cache.
    3. Scroll down to the "Rejected User Agents" field and paste the list of WPtouch default user agents, adding one per line.
    4. Save your changes.
    5. Go to the "Minify" settings under the Performance tab.
    6. Scroll down to the "Rejected User Agents" field and paste the list of WPtouch default user agents, adding one per line.
    7. Save your changes.
    8. Go to the "CDN" settings under the Performance tab.
    9. Scroll down to the "Rejected User Agents" field and paste the list of WPtouch default user agents, adding one per line.
    10. Save your changes.
    11. Finally, go to the "General Settings" under the Performance tab and select "Empty All Caches".

    Your site should now be configured correctly to work with WPtouch and W3 Total Cache.

    If you are running a version of W3 Total Cache released before version 0.9.2.9, you will need to add the wptouch-pro-view cookie in the “rejected cookies” area in the Page Cache settings.

    If the Facebook app is caching, you'll need to contact its developer to request support for mobile themes.

  11. sadhaka
    Member
    Posted 1 year ago #

    Thanks. But if you want to use browser caching in W3TC (which I guess most people do) then you can't circumvent the caching problem in WPtouch?

  12. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    As caching has little to do with WPtouch, beyond providing guidelines for setup, we are unable to provide additional support for third-party products and services. If one caching plugin or service isn't working well with your WordPress configuration, we recommend contacting the developer and/or trying another.

  13. Kaouthia
    Member
    Posted 1 year ago #

    I'm not using any caching plugins at all on my website (it's a fresh setup, all that's installed is a theme, WPTouch, and a couple of other non-interfering plugins), and the WPTouch theme also shows for me inside the Facebook browser app (iPad3 iOS6.1.3, FB6.1.1).

    Using Chrome or Safari on the same iPad shows the regular desktop website interface, as it should.

    The only way I've found to get it working is to edit includes/wptouch.php and add "iPad" to bnc_wptouch_get_exclude_user_agents(), but I'd rather have not go in and edit core plugin files every time a new version of the plugin is released.

  14. sadhaka
    Member
    Posted 1 year ago #

    @Kaouthia - That implies that W3TC has no involvement in the bug.

    But where is this file includes/wptouch.php ?

  15. sadhaka
    Member
    Posted 1 year ago #

    I guess you mean:

    ~/wp-content/plugins/wptouch/wptouch.php

    ?

  16. Kaouthia
    Member
    Posted 1 year ago #

    My mistake, yes, I meant wp-content/plugins/wptouch/wptouch.php

  17. sadhaka
    Member
    Posted 1 year ago #

    I just made that edit to the file:

    /wp-content/plugins/wptouch/wptouch.php

    ... and I can confirm that this stops the mobile theme showing in the iPad Facebook app's in-app web browser. (And the mobile theme still shows OK in the iPhone.)

    Thanks for that helpful tip. (Yes, it is annoying to have to edit it oneself upon every version update!)

  18. sadhaka
    Member
    Posted 1 year ago #

    ... but I've had to deactivate the plugin AGAIN, since, although i've now got it working on the iPhone (thanks to Kaouthia's tip), it conflicts with my theme and/or the EasyRecipe plugin, and nothing I enter in the "Custom Code" field has any effect whatever. Just not worth it.

  19. sadhaka
    Member
    Posted 1 year ago #

    The red "help" question marks are dead too.

  20. Kaouthia
    Member
    Posted 1 year ago #

    Just checked on the wife's iPad. She's running an older version of the Facebook app, and it shows WPTouch. So, what I suggested above doesn't entirely fix it for all versions, but at least on the latest one, it shows the regular website theme as it should. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic