NO BUG: Invalid post type when accessing Bricks templates

Bricks Version: 1.5.4
Browser: Brave Version 1.43.93 Chromium: 105.0.5195.127 (Official Build) (arm64)
OS: macOS
URL: n/a

When trying to ‘Edit With Bricks’ any of the templates files I get a (almost) blank page with the Error ‘Invalid Post Type’. (see screenshot)

I originally got this warning after upgrading from 1.5.3 But was able to access the header (for example) again after resaving every single tab in the Bricks Builder settings.

This time it does not! No updates have been made and only pages were edited since then. Previously, I was able to access the header through the Builder and clicking “Edit Header”. Not anymore, same message!

All plugins are turned OFF. Only Bricks is active.
I am still able to export the JSON template.
Importing the template again does not change the invalid message.

I don’t think I have to reiterate that this is a show stopper!

Would love some advice on how to get

Quick Work-around: Saving the permalinks (thanks to another post I saw) twice!! for some reason twice. This will solve this issue until it happens again. For me that twice now within a short period of time when only Bricks changes have been made (as far as I can see from my project tracking).

Hopefully the team will see this error and be able to eliminate this :beetle:

Hi Sebastian,
Thanks so much for your report!

I have not encountered this problem after any update, and so far, we have not had any reports that indicate a “permanent” problem.

However, I can’t see from your report how I can reproduce it, which makes it impossible to identify a possible problem and fix it accordingly.

Best regards,
timmse

Hi Stefan,

I can’t tell how it happens, nor am I able to reproduce it ‘on command’ myself. It happened twice now within a short period. Not sure how to best document it, as nothing has changed. The local env stayed the same, computer stayed the same, browsers stayed the same. Somehow it relates to permalinks and the bricks settings (or so it seems), but that’s vague, and I have no knowledge of how Bricks works in that regard. If it happens again, I’ll see what has changed as I now make snapshots at regular intervals. Who knows.

Ok, get back to me when you have found a way to “create” the problem :slight_smile:

Hello Stefan,

I found a way to reproduce it, although that is not the way it occurred the last time. I can reproduce it when I switch out the PHP version used via LocalWPs (Local by Flywheel) interface. So when switching the PHP version to php8.022 or to 7.4, for example, I will encounter the error of not being able to read the post types. I can then save the permalinks (and the steps above) to fix it.

I don’t know if that is of any help because this ain’t what happened when I updated Bricks… Soooo But maybe it gives a clue about where to look?

1 Like

Hey,
About changing the PHP Version: This is not a bug, but 100% expected behavior :robot:

Best regards,
timmse

Bricks version: 1.7.3
ACF Pro version: 6.1.0 to 6.1.4 (new updated have Posts Type + Taxonomy)

Devtool**: LocalWP
Web server: Nginx
PHP version: 7.4.30
Wordpress version: 6.2
Multiside: No
Database: Mysql v8.0.16
SSL: No

Browser: Chrome
OS: macOS


I found this error persisted and the reason was when I UPDATEd the ACF PRO plugin to version 6.1.4, the latest version of ACF with built-in POSTs TYPE and TAXONOMY on ACF without going through CPT UI.

Need the support of Bricks Dev Team to review and fix this error.

Hey @kienduday,

did you try resaving permalinks and see if the issue persists afterwards?

Thanks,

André

I found the error, either I SETTING that wrong POST TYPE or this is a bug that ACF needs to fix :slight_smile:

Odd question, was the CPT created using CPT UI and after that ACF Pro v6.1.4 was used to modify it? Or was it a new CPT created with ACFPRO? Im not sure if ACF PRO is compatible with other software created CPTs (not sure what happens in the DB). Maybe that could be a reason?

ACF PRO will not be compatible with other CPTs, I have tried ACF with CPT UI and Meta Box.

This means that these 3 PLUGINs are separate, even though the 3 of them produce the same CPT, but can be defined differently in the code (I’m just guessing, haven’t entered the code to see)

So you should choose 1 of 3 before deciding to use, in my opinion you should choose ACF PRO because from v6.1.0 it is very powerful because it can create CPT and TAXONOMY yourself :slight_smile:

*** Sr my English is not good, I tried my best to communicate with you

Hey Minh,
I’m glad you found the cause of the problem. Using “/” as a slug is generally never a good idea :nerd_face: