SOLVED: Password protection templates don't work if there is another template applied

Browser: Chrome 110
OS: macOS
Video: https://download.johannes-glaser.de/bricks-bug-password-protection-template.mp4

Steps to reproduce:

  1. On a fresh instance, enable Bricks for posts and also enable the feature “password protection templates” (experimental)
  2. First, create a “Single” template for the entire website: Add a new template, set it to “Single”, then set its conditions to “Entire website”.
  3. Then, create a “Password protection” template for the entire website: Add a new template, set it to “Password protection”, then set its conditions to “Entire website” and its mode to “Post password”.
  4. Create a test post. Go to “WP menu > Posts” and add a post. Set it to “Published” and set a post password.
  5. Visit the test post.

Expected result:
You see the password protection template that you just created.

Actual result:
You see the native WP password protection input form.
screenshot-2024-12-10_003065

Confirmation that this is a bug:
If you follow the above steps to reproduce the issue, but switch step 2 and 3 (i.e., you create the password protection template BEFORE the single template), the issue does not appear. In this case, you can then see the password protection template.
My guess is that the Bricks condition-check goes by template-post-ID. However, password protection templates should be prioritized here.

1 Like

Hi @johannesglaser,

Thank you for bringing this to our attention and for the detailed report! I was able to replicate the issue locally and have added this to our internal bug tracker.

I was going nuts with this!

1 Like

This should be fixed in our 1.12 stable release :crossed_fingers:

Hi guys,
We fixed this issue in Bricks 1.12, now available as a one-click update in your WordPress Dashboard.

Changelog: Bricks 1.12 Changelog – Bricks

Please let us know if you are still experiencing issues.

Best regards,
timmse