Content Blocks "Build Template" not working

I’ve now solved the main issue here.

I have a Content Blocks Layout which contains a setting allowing the user to select a bunch of resources.

It does this by calling a snippet in the Field Options to list available resources.

The snippet code is a modified version of this.

However, it looks like the first line:

$current_ctx = $modx->resource->get('context_key');

was generating an error:

PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /home/xxyyzz/core/cache/includes/elements/modx/revolution/modsnippet/92.include.cache.php:2

This error didn’t appear until I enabled debugging.

I’ve removed the context-related code from the snippet [it’s a single context site] and all seems to be back to normal!

Thanks everyone for your time :+1:

The [ContentBlocks] Could not find input 0 for parsing error remains but I don’t believe it is causing problems at the moment.