That error means, quite literally, "You're trying to display an array as a string" ... which you haven't provided enough context do debug completely, but I'd guess means you're setting pageContent
as an array of values, then calling {{ pageContent }}
in a template.
Either convert your array to a string yourself:
implode(', ', $allPages)
… or do something array-like with pageContent
inside the template:
{{# pageContent }}<li>{{ . }}</li>{{/ pageContent }}