Hello!

Suddenly I am experiencing the following errors when I try to add new content. I updated core files and the issue persists.

The error takes the site to a page with this message:

Log messages are:

Error: Call to a member function bundle() on bool en EntityBundleLayoutAccess->checkAccess() (línea 89 de /public_html/core/modules/layout/plugins/access/entity_bundle_layout_access.inc).

Notice: Trying to get property 'nid' of non-object en EntityIDLayoutAccess->checkAccess() (línea 108 de/public_html/core/modules/layout/plugins/access/entity_id_layout_access.inc).

Thank you in advance!

Andrés

Accepted answer

Hello Andrés. 

Hmmm, this may be tricky to troubleshoot. Is this happening when you visit ANY content page/layout path? Or just for specific ones? 

First thing I'd do is to clear caches. I assume you can access administration pages without problems, right? Go to admin/config/development/performance and click clear. Then try again. Otherwise you can use bee cc all in your command line.

This may be happening because one of your layouts has a visibility condition that tests for a specific content type of the node in the context. If you know this is true, you may want to post here the export of that layout to see what may be wrong (go to admin/config/development/configuration/single/export to get the export). Backdrop seems to not be able to load the node, and therefore you are getting the error when it tries to check its content type.

 

Comments

Hello Andrés. 

Hmmm, this may be tricky to troubleshoot. Is this happening when you visit ANY content page/layout path? Or just for specific ones? 

First thing I'd do is to clear caches. I assume you can access administration pages without problems, right? Go to admin/config/development/performance and click clear. Then try again. Otherwise you can use bee cc all in your command line.

This may be happening because one of your layouts has a visibility condition that tests for a specific content type of the node in the context. If you know this is true, you may want to post here the export of that layout to see what may be wrong (go to admin/config/development/configuration/single/export to get the export). Backdrop seems to not be able to load the node, and therefore you are getting the error when it tries to check its content type.

 

Hello!

Thank you four your help!

The problem was actually a bad layout. The problem occurred every time I tried to add new content. After your comment, I checked the layouts and found the problem in the User Guide layout.
It has a visibility condition whit content type undefined. I removed the visibility condition and now I can add content normally.

 

Thanks again!

Andrés