{"id":3407,"date":"2013-09-16T23:54:51","date_gmt":"2013-09-17T06:54:51","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=3407"},"modified":"2014-03-01T22:32:47","modified_gmt":"2014-03-02T06:32:47","slug":"troubleshooting-hello-world-post","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/troubleshooting-hello-world-post\/","title":{"rendered":"Troubleshooting Hello World Post"},"content":{"rendered":"<h3>Problem:<\/h3>\n<p>When you protect a page or post in DAP, and try to test whether the page or post is actually protected&#8230;<\/p>\n<p>a) Instead of showing you a &#8220;Sorry&#8230;&#8221; message with the DAP padlock image, you instead see a &#8220;Hello World&#8221; post &#8211; or the content of some post completely irrelevant.<\/p>\n<p>b) The formatting of the page appears messed up with missing menu items or post content.<\/p>\n<h3>Solution:<\/h3>\n<p>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 &#8220;replaces&#8221; protected content with an in-page error message that says &#8220;Sorry, you don&#8217;t have access to this content&#8221;.<\/p>\n<p>The workaround for this is very simple.<\/p>\n<ul>\n<li>Create a <strong>new error page<\/strong> in WP &#8211; like <strong>http:\/\/YourSite.com\/error\/<\/strong><\/li>\n<li>In the body of that error page, enter something like this:<br \/>\nSorry, you do not have access to this content.<br \/>\nIf you are already a member, <span style=\"color: #ff0000;\"><strong>click here to login<\/strong><\/span>.<br \/>\nIf you are not a member yet, then <span style=\"color: #0000ff;\"><strong>click here to<\/strong> <strong>get access<\/strong><\/span>.<\/li>\n<li>In the above example, link the text &#8220;<span style=\"color: #ff0000;\"><strong>click here to login<\/strong><\/span>&#8221; to your stand-alone DAP login page (eg., http:\/\/YourSite.com\/login\/). And link the text &#8220;<span style=\"color: #0000ff;\"><strong>click here to get access<\/strong><\/span>&#8221; text to your sales page, or wherever they can purchase your product.<\/li>\n<li>Then take this new page&#8217;s URL &#8211; which is <strong>http:\/\/YourSite.com\/error\/<\/strong> &#8211; and enter it into the &#8220;<strong>Error Page URL<\/strong>&#8221; field of all DAP Products. And save all of the products as you make that change.<\/li>\n<li>Also enter this same URL into <strong>DAP Admin &gt; Setup &gt; Config &gt; &#8220;Error Page URL (Global)&#8221;<\/strong>. Save changes to Config.<\/li>\n<\/ul>\n<p>Now, in a new browser where you are not logged in as DAP admin or WordPress Admin, first visit the following logout URL:<\/p>\n<p>http:\/\/YourSite.com\/dap\/logout.php<\/p>\n<p>This is so that any cached URL&#8217;s will be flushed, and the DAP config will be reloaded.<\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: When you protect a page or post in DAP, and try to test whether the page or post is actually protected&#8230; a) Instead of showing you a &#8220;Sorry&#8230;&#8221; message with the DAP padlock image, you instead see a &#8220;Hello World&#8221; post &#8211; or the content of some post completely irrelevant. b) The formatting of [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,3,16,116,124,46],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3407"}],"collection":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=3407"}],"version-history":[{"count":5,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3407\/revisions"}],"predecessor-version":[{"id":4160,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/3407\/revisions\/4160"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=3407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=3407"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=3407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}