Thread Filter Troubleshooting

Developers
Version 1.5.8+
3 min read

You are viewing the documentation for Meerkat version 1 for Statamic 2. The latest version is Meerkat 2 for Statamic 3.

Read v2 docs

Threads were designed to be a quick and easy way to filter a comment thread, but sometimes things happen. In this guide we will go through some common issues that might come up when working with filters.

filterName Meerkat filter could not be found

This typically happens if you forgot to register a custom filter, or you have a typo in the filter name. The following would trigger this error:

{{ meerkat:all-comments filter="user:from_ath(false)" }}

{{ /meerkat:all-comments }}

The user:from_ath should be user:from_auth.

Unmatched "(" in filterName

This error is raised when you have mis-matched parentheses when supplying parameter input. The following would trigger this error:

{{ meerkat:all-comments filter="user:from_auth(false" }}

{{ /meerkat:all-comments }}

The user:from_auth(false should be user:from_auth(false).

Cannot resolve Meerkat variable variableName in filter filterName

This error occurs when you are referencing a variable that should be resolved that cannot be found. Typical causes are either a typo in the variable name, or it was not registered (for a guide on how to register and use parameter variables see Advanced Thread Filtering).

The following would trigger this error:

<?php

use Statamic\Addons\Meerkat\Support\Facades\Comments;

Comments::resolve('shouldIncludeAuthUsers', function () {
    return false;
});


{{ meerkat:responses filter="user:from_auth($shouldIncludeAuthUser)" }}

{{ /meerkat:responses }}

The $shouldIncludeAuthUser should be $shouldIncludeAuthUsers to match the name supplied to Comments::resolve.

filterName is not supported by tagName

This issue generally arises when attempting to use the thread:in or thread:not_in filter with the meerkat:responses tag. Not all filters are supported by all Meerkat template tags.

For the thread filters and the meerkat:responses combination, specifically, the meerkat:responses tag auto-discovers the current thread ID either by looking at the current Statamic Entry context.

The following table lists all default filter namespaces and any special conditions:

Filter Namespace Restrictions
user: No restrictions
thread: Not available for meerkat:responses
is: No restrictions