WAIT: ACF Custom Post Type not showing in selector for dynamic data - and then it does?

When I create a CPT in ACF, it doesn’t initially show up in the dialog for selection when I want to bind an element to a query.
Strangely, just as I open this support case and try again, all on a sudden it does.
This happened to me before.
Is there some secret background update process that I’m not aware of that repopulates the Post types list? How can I trigger that by force?
It’s not my object cache, or some other cache I’m aware of, I reloaded the page, flushed REDIS etc.

Thank you.

Hi,

I’ve just tested by creating a new ACF CPT and then I opened a new page and tried to add a query loop. I was able to select it.

Does this happen every time, that you need to wait for CPT to appear?

Best regards,
Matej

Only sometimes. It might be that if it’s a more complex CPT with associated Property groups it’s more likely to happen?
Maybe could it be that it depends on the actual post type instances provided? That maybe if it doesn’t find the right fields on them, it disables them or sth like that?
In case next time I need a quick workaround: Even if it’s not shown in the selection, I can still use it with a raw php query, right?

Thank you!

Hmm, tbh, this never happened to me, so if you find a reliable way to reproduce this, I’ll be more than happy to look at it.

Under the hood, we just call get_post_types (get_post_types() – Function | Developer.WordPress.org) function with some arguments, that you can change with this filter:

Maybe your CPT is not “Public”, because by default, we only show ones that are set to public.

Additionally, when you are in the builder, if you write this bricksData.postTypesRegistered in the console, you should get a list of all registered post types.

Hope that helps a bit :slight_smile:
Matej