Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter robhyrk

    (@robhyrk)

    I was on a time crunch and couldn’t wait haha. Hopefully it helps out for a future release!

    Great plugin btw! Even the paid ones aren’t as good. Cheers!

    Thread Starter robhyrk

    (@robhyrk)

    So after hours of fiddling around with cache settings the issue was actually a bug in the code.

    If you have “Transitions” selected to anything other than none the code to remove all the css classes will not run.

    The following code block in public/js/age-gate-public.js needs to fixed

                                key: "hide",
                                value: function () {
                                    var e = this;
                                    age_gate_params.settings.transition
                                        ? (jQuery(".age-gate-wrapper").on("transitionend", function (t) {
                                              jQuery(window).scrollTop(0),
                                                  jQuery("body").removeClass("age-restriction"),
                                                  jQuery("html").removeClass("age-gate-restricted age-gate-js"),
                                                  jQuery("body").removeClass("age-gate--error"),
                                                  jQuery(".age-gate-wrapper").remove(),
                                                  
                                                  e.removeViewport();
                                          }),
                                          jQuery(".age-gate-wrapper").addClass("transition " + age_gate_params.settings.transition))
                                        : (jQuery(window).scrollTop(0),
                                          jQuery("body").removeClass("age-restriction"),
                                          jQuery("body").removeClass("age-gate--error"),
                                          jQuery("html").removeClass("age-gate-restricted age-gate-js"),
                                          jQuery(".age-gate-wrapper").remove(),
                                      
                                          this.removeViewport());
                                },

    When I output age_gate_params.settings.transition to the console it showed the transition correctly but it skipped all those lines of jQuery code.

    If anyone else is having this issue you may just need to disable Transitions in the Appearance settings.

    • This reply was modified 5 years, 4 months ago by robhyrk.
    • This reply was modified 5 years, 4 months ago by robhyrk.
    Thread Starter robhyrk

    (@robhyrk)

    Actually nvm, that does not seem to be the problem. I can confirm that the css classes do not get removed when a user verifies their age which causes the issues I mentioned above.

    Thread Starter robhyrk

    (@robhyrk)

    It looks like it might be server related as it is not occurring on the staging site. It appears that once input is submitted admin-ajax.php loads in the network tab but nothing else does. It stops there. If I refresh the page everything else loads fine.

Viewing 4 replies - 1 through 4 (of 4 total)