NO BUG: Meta Box, custom post type, uncheck "Publicly queryable" -> "Edit with Bricks" opens start page

Bricks Version: 1.6.2
Browser: Chrome 109
OS: Windows 10/64
URL: -

I am not sure this is a bug, but at least it is an unexpected behaviour and bad UX.

  1. I create a new custom post type with Meta Box.
  2. I uncheck Meta Box > Post Types > [My custom post type] > Advanced > “Publicly queryable”.
  3. I create a new post with this custom post type.
  4. I click on “Edit with Bricks” and what happens? Bricks opens the start page of the site in the builder/editor! Not my custom post type post!
  5. I check “Publicly queryable” (see step 2 above).
  6. I click on “Edit with Bricks” and now my custom post type post opens in the builder/editor (as expected)!

I can repeat this with the same result. Resaving the permalinks doesn’t seem to have any bearing on this issue.

Why does Bricks Builder need the setting “Publicly queryable” to be checked/set?

Hi,
Thanks so much for your report!

To be able to edit posts with Bricks, they must be public_queryable, as Bricks is executed in the frontend. The definition of this query parameter is:

Whether queries can be performed on the front end as part of parse_request().

If the parameter is set to false, this is no longer the case. Alternatively, you can use the public parameter, which still allows you to work with bricks.

Or do you have a specific use case that requires public_queryable = false?

Best regards,
timmse

Thanks!

Maybe there should be a warning in the Bricks UI, saying that posts must be public queryable. If Bricks without warning just opens another post (always the start page?), it can have unpredictable consequences … (you may start editing wrong post).

Well, normally there is no reason to deactivate the option. As already asked: do you have a specific use case that requires public_queryable = false, or did you just deactivate the parameter to see what happens? :smiley:

No, I don’t have a specific use case that requires public_queryable = false. I just wanted to deactivate settings which didn’t seem to be necessary. But since this is an option, it seems as if there maybe are use cases.