The following has evaluated to null or missing:
==> queryResultItems?chunk(noOfPostsToDisplay)[pageNumber-1] [in template "MbasGallery.CardsMessageList" at line 527, column 37]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign postSorted = queryResultItems... [in template "MbasGallery.CardsMessageList" at line 527, column 17]
----