• Resolved slimmyweight

    (@slimmyweight)


    Hi when I activate GDPR mode and exclude my privacy policy it isn’t just excluding my privacy policy it is also allowing me to access many other pages when I tested in incognito mode

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @slimmyweight,

    Sorry to hear that. I’ve tried to reproduce this behavior, but it works fine in my test environment.
    I recommend double-checking the settings. If the URL of the privacy page is http://domain.com/privacy-page/, you should add privacy-page or /privacy-page/ to Exclude.


    George

    • This reply was modified 5 years, 9 months ago by George J.
    • This reply was modified 5 years, 9 months ago by George J.
    Thread Starter slimmyweight

    (@slimmyweight)

    I’ve realised its only on landing pages created with thrive architect which removes the header and footer code. Is it in the header or footer where the code gets placed on pages to prevent people visiting when maintenance mode is in.

    If so would you be able to tell me what that code is so I can see about adding it to my landing pages manually please?

    Thanks

    @slimmyweight: The plugin is not using the header or the footer to prevent people visiting the website. I assume (because I don’t have access to the source code) that Thrive Architect is messing around template_redirect hook.

    So, let’s try something. Open wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php, and change template_redirect action priority… by replacing this line:

    add_action((is_admin() ? 'init' : 'template_redirect'), array($this, 'init'));

    with this line:

    add_action((is_admin() ? 'init' : 'template_redirect'), array($this, 'init'), 9);

    • This reply was modified 5 years, 9 months ago by George J.
    • This reply was modified 5 years, 9 months ago by George J.
    • This reply was modified 5 years, 9 months ago by George J.
    • This reply was modified 5 years, 9 months ago by George J.
    Thread Starter slimmyweight

    (@slimmyweight)

    Thanks for the code George, I applied it but still having the same issue.

    Also will this code be replaced everytime the plugin is updated so Ill need to remember to keep replacing it?

    @slimmyweight Unfortunately, I can’t do more without having access to the files because I can’t replicate the issue.

    Also will this code be replaced everytime the plugin is updated so Ill need to remember to keep replacing it?

    Yes, you have to replace the code after each plugin update.

    Later edit: Could you please post some screenshots with your plugin settings and the URLs where the maintenance doesn’t work? Maybe I’m missing something.

    • This reply was modified 5 years, 9 months ago by George J.

    @slimmyweight After a quick review of the source code of Thrive Architect, I’ve found the solution. Edit the same file as earlier and change the priority from 9 to 8.

    add_action((is_admin() ? 'init' : 'template_redirect'), array($this, 'init'), 8);

    I’ve also sent them an email about the issue. 🙂

    • This reply was modified 5 years, 9 months ago by George J.
    Thread Starter slimmyweight

    (@slimmyweight)

    Very nice thank you George, changing the 9 to 8 appears to of fixed the issue. I’ve been speaking to thrive about this and sent them a link to this post.

    Thanks again

    Thread Starter slimmyweight

    (@slimmyweight)

    Hi George Ive just checked and my code is still the same as you have suggested but the maintenance mode is no longer stopping people from accessing landing pages created by thrive again

    @slimmyweight maybe they have changed something inside Thrive Architect code base.

    Try a lower hook priority (from 8 to 7 or 6).

    
    add_action((is_admin() ? 'init' : 'template_redirect'), array($this, 'init'), 7);
    
    Thread Starter slimmyweight

    (@slimmyweight)

    Thats fixed it thanks again

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘GDPR mode is allowing people to access many other pages!’ is closed to new replies.