Password Protect PHP Error

I have a site I manage and one page just has text and images, another has a password protected setion, they work fine. I wanted to combine the 2 pages onto one with 2 Tabs. this I did and it previews perfectly, however when I publish and select the new tabs page I get the following error:

false, ‘message’ => $errorMessageText ]); exit; } } // Re-check authentication (may have been restored from cookie) $isAuthenticated_rw18D032F0_1205_4C0F_9DF3_66A51586E216 = password_protect_is_authenticated(‘password_protect_elements’); // Capture the protected content for AJAX response ob_start(); ?>

It is also going to the 2nd tab by default (the page with the password protected section) even though I have set the default to the 1st page and it also ignores the password protection and displays the content.

I stress however that previewing this page works perfectly.

Any houghts on what this error means?

Ensure the new page is set to .php and not .html, that should fix the issue for you :slight_smile:

Oh, and don’t forget to remove the old .html file from the server as it may still get served up before the .php file.

Thanks Dan, sorry to have bothered you, I should have known this was the issue.

No problem, it’s our fault really. We need to add a feature in Elements that warns when you have a component that requires PHP on an HTML page.

Anyway, I’m glad it’s all sorted now :slight_smile:

1 Like