# More problems... CMS Errors

**URL:** <https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977>\
**Category:** Elements\
**Created:** [December 4, 2025, 2:47pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977 "2025-12-04T14:47:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonG](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SimonG](https://forums.realmacsoftware.com/u/SimonG)\
**Post date:** [December 4, 2025, 2:47pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977/1 "2025-12-04T14:47:44Z")

</div>

The Microblogging template previews without issue,

I followed the setup in Dev Diary 93 but on a clean project. I’m obviously missing something which doesn’t seem to be obvious and I could not find out from the documentation or the dev diary videos (which sorely need to be created and updated)

If I create a new project, add in a collection linked to a folder with 2 .md posts, and then try and preview the page after setting single text component to read {{item.title}} I get the following in the browser…

$collectionPath, ‘page\_path’ =\> $pagePath, ‘pretty\_urls’ =\> $prettyUrls, ‘title’ =\> htmlspecialchars(‘My Website - posts’, ENT\_QUOTES, ‘UTF-8’), ‘description’ =\> htmlspecialchars(‘RSS feed for posts’, ENT\_QUOTES, ‘UTF-8’), ‘link’ =\> ‘’ ]; $rssURL = $apiPath . ‘/cms/rss?’ . http\_build\_query($rssURLParams); $sitemapURLParams = [‘content\_path’ =\> $collectionPath, ‘page\_path’ =\> $pagePath, ‘pretty\_urls’ =\> $prettyUrls, ‘base\_url’ =\> ‘’]; $sitemapURL = $apiPath . ‘/cms/sitemap?’ . http\_build\_query($sitemapURLParams); if ($wantsRSS) { echo ‘’; } if ($wantsSitemap) { echo ‘’; } })(); ?\>

is\_array($\_GET[‘tags’] ?? ‘’) ? $\_GET[‘tags’] : array\_filter(array\_map(‘trim’, explode(‘,’, $\_GET[‘tags’] ?? ‘’))), default =\> array\_filter(array\_map(‘trim’, explode(‘,’, ‘’))) }; if (!empty($tags)) { $filters[‘tags’] = implode(‘,’, $tags); } } // Author filtering $filterAuthor = “all”; if ($filterAuthor !== ‘all’) { $author = match ($filterAuthor) { ‘url’ =\> is\_array($\_GET[‘author’] ?? ‘’) ? $\_GET[‘author’] : array\_filter(array\_map(‘trim’, explode(‘,’, $\_GET[‘author’] ?? ‘’))), default =\> array\_filter(array\_map(‘trim’, explode(‘,’, ‘’))) }; if (!empty($author)) { $filters[‘author’] = implode(‘,’, $author); } } // Featured filtering $filterFeatured = “all”; if ($filterFeatured !== ‘all’) { $filters[‘featured’] = $filterFeatured === ‘true’ ? ‘true’ : ‘false’; } // Status filtering $filterStatus = “published”; if ($filterStatus !== ‘all’) { $filters[‘status’] = $filterStatus; } else { $filters[‘status’] = ‘published’; // Default to published only } // Date filtering - handled via API query parameters $filterDate = “past”; if ($filterDate === ‘past’) { $filters[‘date\_before’] = date(‘Y-m-d H:i:s’); } elseif ($filterDate === ‘future’) { $filters[‘date\_after’] = date(‘Y-m-d H:i:s’); } $orderBy = “date”; $orderDirection = “desc”; // Build collection query using fluent API with URL configuration $ECMS\_options = [‘resources’ =\> [ ‘path’ =\> ‘resources’] ]; $query = cms($ECMS\_options)-\>collection($collectionPath) -\>pagePath($pagePath) -\>tagPagePath(‘’) -\>authorPagePath(‘’) -\>prettyUrls($prettyUrls) -\>orderBy($orderBy, $orderDirection); // Apply all filters foreach ($filters as $key =\> $value) { switch ($key) { case ‘tags’: $query = $query-\>tags($value); break; case ‘author’: $query = $query-\>author($value); break; case ‘featured’: $query = $query-\>featured($value === ‘true’); break; case ‘status’: $query = $query-\>status($value); break; case ‘date\_before’: $query = $query-\>before($value); break; case ‘date\_after’: $query = $query-\>after($value); break; } } // Execute query with pagination try { $collection = $query -\>paginate($currentPage, $itemsPerPage) -\>get(); $items = $collection-\>items; $pagination = $collection-\>pagination; } catch (Exception $e) { $items = ; $pagination = (object) [‘current\_page’ =\> 1, ‘total\_pages’ =\> 1, ‘total\_items’ =\> 0, ‘items\_per\_page’ =\> $itemsPerPage, ‘has\_prev’ =\> false, ‘has\_next’ =\> false]; } // Create collection-like object for backward compatibility $collectionObj = new class($items, $pagination) { public $items; public $pagination; public function \_\_construct($items, $pagination) { $this-\>items = $items; $this-\>pagination = $pagination; } public function each($callback) { foreach ($this-\>items as $item) { $callback($item); } } }; // Collection data is now available in template scope $collection = $collectionObj; ?\> $collection-\>pagination, ‘items’ =\> $collection-\>items, ‘collection’ =\> $collection, ‘filters’ =\> $filters, ‘orderBy’ =\> $orderBy, ‘orderDirection’ =\> $orderDirection, ‘collectionPath’ =\> $collectionPath, ‘pagePath’ =\> $pagePath, ‘itemsPerPage’ =\> $itemsPerPage, ‘prettyUrls’ =\> $prettyUrls, ‘collectionItemTemplateId’ =\> $collectionItemTemplateId ?? null ]); ?\>

{{item.title}}

each(function ($item) use ($collection, $collectionItemTemplate, $filters, $orderBy, $orderDirection, $collectionPath, $pagePath, $itemsPerPage, $prettyUrls, $collectionItemTemplateId) { echo renderTemplate($collectionItemTemplate, [‘item’ =\> $item, ‘collection’ =\> $collection, ‘filters’ =\> $filters, ‘orderBy’ =\> $orderBy, ‘orderDirection’ =\> $orderDirection, ‘collectionPath’ =\> $collectionPath, ‘pagePath’ =\> $pagePath, ‘itemsPerPage’ =\> $itemsPerPage, ‘prettyUrls’ =\> $prettyUrls, ‘collectionItemTemplateId’ =\> $collectionItemTemplateId]); }); // Output the template for use in frontend Alpine components echo ‘’; ?\>

$collection-\>pagination, ‘items’ =\> $collection-\>items, ‘collection’ =\> $collection, ‘filters’ =\> $filters, ‘orderBy’ =\> $orderBy, ‘orderDirection’ =\> $orderDirection, ‘collectionPath’ =\> $collectionPath, ‘pagePath’ =\> $pagePath, ‘itemsPerPage’ =\> $itemsPerPage, ‘prettyUrls’ =\> $prettyUrls, ‘collectionItemTemplateId’ =\> $collectionItemTemplateId ]); ?\>

---

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [December 4, 2025, 3:31pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977/2 "2025-12-04T15:31:57Z")

</div>

Have you set the page to be PHP?

---

<div class="post-metadata">

**Author:** ![SimonG](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SimonG](https://forums.realmacsoftware.com/u/SimonG)\
**Post date:** [December 4, 2025, 3:37pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977/3 "2025-12-04T15:37:27Z")

</div>

Well that needs to be made much more obvious !

Again, the documentation is lacking heavily, as is any kind of beginner type of video / help.

Spent hours looking at this today, and just needed to change the .html to .php - better docs would have stopped me and I am sure others from wasting their time.

The whole thing feels like a beta project, needs a lot more spit and polish for me to see it as feasible for even basic sites.

It’s the problem when coders create something but never really think about how the masses will use it ☹

---

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [December 4, 2025, 3:46pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977/4 "2025-12-04T15:46:29Z")

</div>

> **[System Requirements | CMS | RapidWeaver Elements Docs](https://docs.realmacsoftware.com/elements-docs/cms/getting-started/system-requirements)**
>
> Basic requirements for running Elements CMS on your server

See section: PHP Page extension

---

<div class="post-metadata">

**Author:** ![SimonG](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SimonG](https://forums.realmacsoftware.com/u/SimonG)\
**Post date:** [December 4, 2025, 3:49pm UTC](https://forums.realmacsoftware.com/t/more-problems-cms-errors/52977/5 "2025-12-04T15:49:01Z")

</div>

Burried deep within the docs, very helpful that.

Would make more sense if it was flagged up open the CMS pages of the documentation in big bold letters!

Again, devs writing like devs and not thinking about this without their knowledge.
