• Hi Phil,

    We used the following files and put them onto our server: age-gate-canadian-province.php and select-dropdown.js.
    The age gate seems to work and gives warning messages if the user is not older than the age limit for a particular province. So it works great and then the age gate closes.

    However, if the user’s input age is under 21, the next page the user accesses will reload the age gate, and they have to input all the information again.
    This continues to happen if the person is under 21, but that is not acceptable for us because most provinces allow ages 19 and over to access our website, as specified in the php file. So it looks like the plugin defaults to users over the age 21 even after we added the custom Canadian province php file.

    Could you please do us a favour and address this issue?

    Regards,

    Denys

    P.S. JavaScript mode has been enabled by default as true

    • This topic was modified 4 years, 1 month ago by themennice. Reason: added a JS mode note

    The page I need help with: [log in to see the link]

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

    (@philsbury)

    Hi @themennice,

    Where did you get those files? Didn’t think they were available anywhere anymore! There’s now a maintained plugin for this available here.

    But, that does suffer the same issue as I’d never thought of that.

    There’s two solutions, one quick fix for you is to set the required age in the main age gate settings to the lowest you need, then set any province to be the higher numbers. That way this will stop happening.

    Secondly, I’ll look at the supported plugin above to also make sure the required age is for the region in question and roll out an update.

    Thanks
    Phil

    Thread Starter themennice

    (@themennice)

    Hi Phil,

    We have had them stored on our server for a while. It was also shared on edgetalk in April.

    Thank you for the solutions. I am looking forward to the update!
    In the meantime, I have changed the required age to the lowest I need on the main age gate. How do I set any province to be the higher numbers? Is it done by default or is there modification I need to make to the original code in the .js or .php file?

    Thank you in advance,

    Denys

    Plugin Author Phil

    (@philsbury)

    Hi Denys,

    Thanks for the info on Edgetalk, think I’ll drop a comment onto that article steering people away from those as they don’t really work as well.

    I’ve made an update to the plugin over on the Age gate website (v1.3.0), you should switch over to that really to get updates and fixes. That’s all just managed through the CMS, some docs for it are here

    Thanks
    Phil

    Thread Starter themennice

    (@themennice)

    Hi Phil,

    Thank you for the update to the plugin.
    I tried to install it, however, I received an error after manually activating on WordPress. Fatal error: Uncaught Error: Class 'AgeGateRegion\Frontend\RestrictionTest' not found in /plugins/age-gate-region/src/Bootstrap.php:9 Stack trace: #0.
    I looked into it and seems like the class had an error. I corrected it to “FrontEnd” by capitalizing the “e” in Bootstrap.php. I zipped the folder again, uploaded and activated it with no problems this time.
    I was not sure if it was encountered before, but I hope future updates will not have the same issue.

    Thank you again,

    Denys

    Plugin Author Phil

    (@philsbury)

    Hi Denys,

    Thanks for the heads up! That was introduced in 1.3.0 and now patched in 1.3.1. Must implement some tests!

    Thanks,
    Phil

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Canadian Age Gate Not Working Properly’ is closed to new replies.