WordPress.org

Ready to get started?Download WordPress

Forums

MobileESP for WordPress
[resolved] Full Site Redirect Problem (9 posts)

  1. writenowrong
    Member
    Posted 2 years ago #

    I have been trying to use the code that was provided in the FAQ to offer mobile users a chance to view the website in Full Desktop Mode, but the link doesn't switch the theme unless you click it twice. Is there any way to do this on the first go?

    Thanks!

  2. Brooke Dukes
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry for a late reply. I've noticed this. I just need to find the time to fix it. The problem is that the first time you click it sets the cookie and then goes back to the mobile set. The second time you click it see the cookie so it doesn't redirect. I think the solution would be to set the cookie then refresh the page with the cookie set OR check for the cookie on the plugin side of things before the redirect.

    Should be a an easy fix I just need to get around to it. In the mean time patches accepted :)

  3. Brooke Dukes
    Member
    Plugin Author

    Posted 2 years ago #

    This is now fixed in V 1.2

  4. Brooke Dukes
    Member
    Plugin Author

    Posted 2 years ago #

    1.3.1 is out that should REALLY fix this problem :)

  5. Fornelli
    Member
    Posted 2 years ago #

    I am still having this issue. I even uninstalled the older version and reinstalled 1.3.1 and it still does it. I have been messing with the cookie config but I have had no luck.

    Any ideas?
    [Code moderated as per the Forum Rules. Please use the pastebin]

  6. Brooke Dukes
    Member
    Plugin Author

    Posted 2 years ago #

    Looks like your code block is missing code from the 1.3.1 update. You need to make sure you have the line $_COOKIE['mobileesp_wp_full_site'] = 1; in your code. So the code you posted should look like this: Paste. Also 1.3.1 got ride of 'true' and 'false' and replaced it with '1' and '0' so are you sure you are using 1.3.1?

  7. Fornelli
    Member
    Posted 2 years ago #

    So what about the URL string code?

    Does it go from
    /?view_full_site=true

    to

    /?view_full_site=1

    ?
    I just updated to 1.3.1 and I'm still experiencing double click issues. I was able to configure the php cookie time setcookie("mobileesp_wp_full_site", 1, time()+86400, "/", $domain);

    from +86400 to +10 and it would kind of work.

  8. Fornelli
    Member
    Posted 2 years ago #

    Now it doesn't even load the full site.

    Is there an additional plug in that I'm missing?

    Any thoughts?

  9. Brooke Dukes
    Member
    Plugin Author

    Posted 2 years ago #

    @Fornelli well changing the cookie from 86400 to 10 is telling the cookie to expire after 10 seconds so that would mean that the full site would only load for 10 seconds. 86400 is one day.

    the string should be http://example.com/wordpress/?view_full_site=true

    Please post a link to your URL and Mobile site or contact me at http://bandonrandon.wordpress.com if you are having issues after a clean install of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic