Skip to content
Gravity Tables
patch v2.3.1 · · 2 min read

User-only filtering, fixed for shortcodes

A small but important fix: "Show user only their own entries" now works correctly when configured at the shortcode level. No more empty-table mystery.

  • Fixed `filter_by_user="true"` in shortcodes (was silently no-op in 2.3.0)
  • Database table ID now correctly passes through to the AJAX handler
  • Entries filter properly by `created_by` field for the current user
  • No table-config changes required, drop in the new version and it just works

This is a bug-fix release for a feature that’s well-documented in the user-filtering guide. The TL;DR: in 2.3.0 the parameter worked through the table builder UI but was silently ignored when set in the shortcode.

The bug#

In 2.3.0, two code paths set up the per-user filter:

  1. Table builder UI, saved a filter_by_user flag on the table record, picked up correctly at render time
  2. Shortcode parameter (filter_by_user="true"), passed to the renderer but lost in the AJAX handoff

The shortcode path failed because the AJAX handler read filter_by_user from the saved table settings, not from the rendered table’s data- attributes. Tables configured purely via shortcode (without a builder-UI override) silently fell back to “no filter”.

The user-visible symptom: the shortcode rendered an empty table where the user expected to see their own entries. No error, no console warning, just nothing.

The fix#

Two changes:

  1. The render path now writes data-filter-by-user="true" onto the table wrapper when the shortcode sets it
  2. The AJAX handler reads from the wrapper attribute first, falling back to the table record only if the attribute is absent

Net effect: the shortcode parameter and the builder-UI setting now behave identically.

Why this matters more than it looks#

filter_by_user is one of the most-used parameters in production. Every customer portal, every “your submissions” page, every per-user dashboard relies on it.

A bug that silently no-ops a security-adjacent feature is a bigger deal than a crashing bug, because it hides itself. Customers think the page is empty because they have no submissions, when in fact they have plenty and the filter quietly defaulted to “show nothing”.

We caught this within 24 hours of 2.3.0 ship. 2.3.1 was on WordPress.org the same evening.

Migration#

No action required. Existing shortcodes with filter_by_user="true" start working as soon as 2.3.1 is active. Tables that were already using the builder-UI setting were unaffected by the bug and remain unaffected by the fix.

How we caught it#

A customer running a customer portal noticed their page went empty after the 2.3.0 update. They emailed info@fahdmurtaza.com, included a screenshot, and we reproduced it inside 20 minutes. Their report → our test → root cause → fix → ship was about 8 hours total.

This is the kind of feedback loop that’s only possible when support is direct to the engineer, not a ticket queue. It’s also why the about page doesn’t have a contact form.

#filter-by-user#shortcode#hotfix