Troubleshooting Hello World Post
Problem:
When you protect a page or post in DAP, and try to test whether the page or post is actually protected…
a) Instead of showing you a “Sorry…” message with the DAP padlock image, you instead see a “Hello World” post – or the content of some post completely irrelevant.
b) The formatting of the page appears messed up with missing menu items or post content.
Solution:
This has something to do with some special feature of either your theme or one of the plugins you are using, which is causing a conflict with the way DAP “replaces” protected content with an in-page error message that says “Sorry, you don’t have access to this content”.
The workaround for this is very simple.
- Create a new error page in WP – like http://YourSite.com/error/
- In the body of that error page, enter something like this:
Sorry, you do not have access to this content.
If you are already a member, click here to login.
If you are not a member yet, then click here to get access. - In the above example, link the text “click here to login” to your stand-alone DAP login page (eg., http://YourSite.com/login/). And link the text “click here to get access” text to your sales page, or wherever they can purchase your product.
- Then take this new page’s URL – which is http://YourSite.com/error/ – and enter it into the “Error Page URL” field of all DAP Products. And save all of the products as you make that change.
- Also enter this same URL into DAP Admin > Setup > Config > “Error Page URL (Global)”. Save changes to Config.
Now, in a new browser where you are not logged in as DAP admin or WordPress Admin, first visit the following logout URL:
http://YourSite.com/dap/logout.php
This is so that any cached URL’s will be flushed, and the DAP config will be reloaded.
Now, in that same browser window, go to any protected page, and you should now be automatically redirected to the above custom error page that you created above.