• Resolved santosGpz

    (@santosgpz)


    Hey there.

    The plugin worked fine out the box and I managed to use the ‘yes/no’ question for a 21+ verification. However, it stopped working shortly after. I’m using WPengine and am unable to get past the verification page by clicking ‘yes’ and ‘remember me.’ The same page is reloaded over and over. Cookies are not being blocked, so I am unsure of what is causing this issue.

    I have removed the plugin and re-installed it a few times and have purged the site cache without luck. The same behavior is present even if I use an incognito window.

    Details:
    Chrome (latest – 59.0.3071.115)
    WordPress 4.7.5
    WPengine

    Thanks for any help. – The dev site is: https://lowspark.wpengine.com/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Phil

    (@philsbury)

    WP Engine’s cache can ignore pages with certain cookies attached, but due to the nature of age gating content, it would essentially mean no pages are cached at all as it need to do various checks along the way and serve a different template if the age gate is not passed. So what’s happened is the cache has picked up the form the first time round and cached it. I’d imagine if you clicked yes, then cleared the cache, then refreshed you’d see your content. No much good in a real scenario.

    Essentially, in it’s current format it doesn’t work with cached sites (see the FAQ). I’ve been looking at various was to get around this issue, but with so many caching options it’s had to do so in a way that addresses everything. However, I do have a method that is currently in development that will hopefully get over this issue.

    As an aside, the plugin doesn’t actually use cookies, but sessions as there were issues in an early release with cookies in IE.

    Thread Starter santosGpz

    (@santosgpz)

    Hey, Phil.

    Thanks for the quick response! I look forward to the next version. This seems like the most straightforward age restriction plugin so I’d love to implement it going forward.

    Thanks and best of luck.

    Plugin Author Phil

    (@philsbury)

    Hi,

    Just to let you know, version 1.4.0 has been released, this has the option of an age gate that won’t be affected by caching – but still allows the site to be cached.

    There’s an option section called “Caching” and using “Cache Bypass” should solve your caching issues.

    Thanks
    Phil

    Thread Starter santosGpz

    (@santosgpz)

    Awesome. Works flawlessly. Changed the option to: “Cache bypass” and it works as intended.

    Thanks so much!

    Hi there,

    had a similar issue and the Cache Bypass now works. However, I’m using qTranslate-X and when Cache Bypass is checked, the Age Gate shows both Language versions, see below:

    [:EN]WELCOME[:DE]WILLKOMMEN
    [:en]You must be of legal drinking age to enter this site.[:de]Du musst 18 Jahre alt sein, um diese Seite zu betreten.

    When Cache Bypass is not checked, it shows normally, as here:

    WELCOME
    You must be of legal drinking age to enter this site.

    Best wishes,
    Tom

    Plugin Author Phil

    (@philsbury)

    Hi Tom,

    Where is qTranslate-x getting it’s translations from for those sections? If you can screen shot all the settings tabs for it and put them here I’ll set up a local version to match and see what’s what

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    Right, I can replicate that. My initial thought is that in “standard” all the usual filters get applied, whereas in “bypass” they potentially don’t.

    I’ll have a dig around for a solution.

    Cheers
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi Tom,

    Can you give this a try, the solution was remarkable simple in the end. Went round the houses a bit to get there though!

    If you find no issues, please let me know and I’ll merge it into the official build and release it.
    https://www.dropbox.com/s/gz6az8oqvyw7f3h/age-gate-1.4.13-beta.zip?dl=0

    Cheers
    Phil

    Hi Phil,

    Thanks for the fast reply ??

    Just tested it, unfortunately, when using the Cache Bypass, now I don’t get the prompt at all (purged my caches). If I use Standard mode, then it loads, but then again – I’m stuck in the loop.

    Best wishes
    Tom

    Plugin Author Phil

    (@philsbury)

    You’re right, I moved the scripts to be enqueued properly, but the conditional I added after initially sending you the message was always false.

    Anyway, I’ve updated the link above (below too for ease), and should be good now.
    https://www.dropbox.com/s/gz6az8oqvyw7f3h/age-gate-1.4.13-beta.zip?dl=0

    Cheers
    Phil

    Works! ??

    When do you plan to push it live?

    Also, Does the “Remember me” checkbox works with the “Cache Bypass” parameter?

    Cheers

    Tom

    Plugin Author Phil

    (@philsbury)

    Hi Tom,

    That’s now in the latest release.

    For remember me, yes it should work with cache bypass, it sets a cookie called ageCookieRemember – but only if they pass the test. There are some changes to that coming in v2.0.0 as it’ll support multiple ages – but for now it’s just a true or false.

    Thanks
    Phil

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Endless Loop’ is closed to new replies.