Data Tables

Unmaintained Data Tables 1.6.2

No permission to download

Data Tables v1.6.2 - Field-wide search + per-field filters​

Two items from @ichpen's feedback, plus a search reliability fix.



Added​

  • Per-field filters - marking a field "Filterable" now actually shows a filter (previously the toggle did nothing). Both the public table view and the AdminCP record list get a clean, native filter bar for your filterable fields: text = contains, number = min/max range, date = from/to range, yes/no + lookup + linked-table = dropdown, member = username or ID. Filters combine with search and sorting, carry across pages, and have a one-click Clear.



Fixed​

  • Search now covers every field, not just the title - record search previously only matched the table's title field, so you couldn't find a record by a User field's ID, a lookup value, a number, or any other field. Search now matches across all fields - including a User field by username or raw user ID - still as one fast query.
  • Search works on every board - the record search box (and the new filter bar) now use XenForo's native form handling, so they behave correctly no matter your friendly-URL setting. Previously, on a board with friendly URLs turned off, searching could bounce you back to the index instead of filtering the table.



On the date field​

The date input uses XenForo's own native date control (the same one core uses for thread dates and the like). On some browsers the value commits when you click away rather than the instant you pick a day - that is the browser's built-in date picker, not the add-on, and the date is always saved on submit. It is left as the native control for consistency, theme support, and locale handling.



Upgrading​

Upgrade via Admin CP > Add-ons as usual. Your data is not touched - the upgrade only adds a search-index column and backfills it from your existing records (verified byte-for-byte on a populated install). No reconfiguration needed.

Data Tables v1.6.1​

A small follow-up to v1.6.0 - polish from an internal code review against XenForo's own patterns.



Improvements​

  • Member fields use native username styling - User-type fields now render members with XenForo's standard username styling (user-group colour, online indicator, member hover-card, profile link) instead of a plain link.
  • Clearer warning when a field-type change would clear data - When you change a field to a type its current values cannot convert to, the confirmation screen now explicitly shows how many values will be permanently cleared (with a warning banner), instead of counting them as "convertible". Your "Lock to record creator" / "Compact editor" options are now also carried through that confirmation step.

Under the hood​

  • Owner-field resolution moved to the repository layer (cleaner, matches XF conventions). No behaviour change.

Upgrade​

Non-destructive, no schema changes - just upload the ZIP over your install. Safe to upgrade with any amount of existing data.

Data Tables v1.6.0 - User & Media Embed field types​

Three new field types and a handful of fixes, all from @ichpen's feedback.



New field types​

  • User field (with owner mode) - Record a member against a row. Turn on Lock to record creator and the field auto-captures whoever creates the record as its owner, with no typing - it is stamped on every save path (admin, public, clone, CSV import) and shown read-only on the form. Leave the option off and it is a generic member picker using XF's native username autocomplete. Owners display as a linked username. (Requested by ichpen)
  • Media embed field - Paste a media URL (YouTube, Vimeo, and any other site your forum supports) and it embeds inline on the record detail page using XF's own media-site handling - no custom embed code. List and table views show a compact "Watch" link instead of a player in every row, and CSV exports the raw URL. (Requested by ichpen)
  • Compact editor option on the Rich Text field - A per-field toggle that swaps the full BBCode editor block for a small BBCode text box, for short rich-text fields where the big editor was overkill. The full editor stays the default. (Requested by ichpen)

Fixes​

  • Missing permission phrase - The "Data table permissions" group under Groups & Permissions showed its raw phrase key. XF looks up permission_interface.<id>; the addon had defined it with an extra _group. Renamed so it resolves. (Reported by ichpen)
  • Conversion safety for the new User type - Converting a field to or from the User type from an unrelated type now clears the value instead of leaving a stale ID that could resolve to the wrong member. Matches the existing lookup/table-lookup conversion guard.
  • User field keeps your typed value - If a member field fails validation, the username you typed is no longer wiped when the form re-renders.

Upgrade​

Non-destructive. Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. The upgrade adds two new columns (lock_to_creator, is_compact) with defaults, so an upgraded install ends up schema-identical to a fresh one. Existing data, permissions, and behavior are preserved.

Data Tables v1.5.0 - 6 Bug Fixes + 6 Features​

Twelve items from @briansol's last batch, plus post-audit security/correctness hardening.



Bug Fixes​

  • Sort by multi-value column crashed - Clicking a sortable header on a multi-select table_lookup field threw "Array to string conversion". Now sorts by item count, then by joined IDs. (Reported by briansol)
  • Lookup → Table-Lookup conversion ghost values - After changing a field's type, the front-end showed coincidentally-matching record titles instead of "(Unknown)" because the lookup was unscoped by definition_id. Now properly scoped, and incompatible cross-domain values are wiped on conversion. (Reported by briansol)
  • Editing on page 2 returned you to page 1 - Record edit, single delete, and bulk delete all dropped the page param on redirect. Now preserved across admin and public flows. (Reported by briansol)
  • Move-field destroyed source records' data - Moving a field between definitions stripped the values from source records and inserted empty values into target records. Now source records keep their stored values as orphan data; target records are unchanged. Reverse-link pairings are cleared on move. (Reported by briansol)
  • Rich text + form values lost on validation error - Submitting with a missing required field showed an error and hitting Back lost the rich text editor content. Now re-renders the form inline with all submitted values preserved (HTTP 400). (Reported by briansol)
  • Mobile layout broke at narrow viewports - Public table view and admin record list rendered with horizontal overflow on 360px screens. Now lays out cleanly; detail labels stack above values; search bar wraps below title. (Reported by briansol)

Features​

  • Clone selected records - Checkbox the rows you want, click "Clone selected" in the admin record list. Single clone opens the new record's edit form (your stated workflow); multiple gives a flash count and returns to the list. Slug auto-dedupes to -2, -3, etc. (Requested by briansol)
  • Per-definition default sort - Set the default sort field + direction (asc/desc) under Definitions > Edit. Public table view applies it on first load when no URL sort is supplied. Restricted to non-multi-select sortable fields. (Requested by briansol)
  • Color swatch on linked references - When a table_lookup field points to records that have a color field, the swatch shows next to the linked record's title in cells AND in the "Referenced by" section. (Requested by briansol)
  • AJAX duplicate-name check - Title field blur-checks for existing records with the same value. Inline warning with a direct "Edit" link to the existing record. Excludes self when editing. (Requested by briansol)
  • On-the-fly search filter - Search bar above the public table view filters by title via SQL LIKE on the slug column. Server-side, paginates correctly, bookmarkable URLs (?q=B). (Requested by briansol)
  • Auto reverse-link pairing on table_lookup - Pair two table_lookup fields that point at each other (Reverse field dropdown on the field-edit page). When you add a target on one side, the back-pointer on the other side updates automatically. Bidirectional sync with multi-select support and loop prevention. (Requested by briansol)

Security & Hardening​

  • Duplicate-check endpoints validate CSRF server-side - Both admin and public check-duplicate now call assertValidCsrfToken() in addition to assertPostOnly().
  • Field deletion cascades cleanly - Deleting a paired field now clears the partner's reverse pointer; deleting a default-sort field resets the definition's sort config.
  • Toggling is_sortable off resets defaults - Definitions using a now-non-sortable field as their default sort get reset automatically (no silent fallback to "no sort" on the public view).
  • Reverse-link sync hardened with try/finally - Loop-prevention flag is guaranteed to clear even on save exceptions (matters for CLI/job contexts).

Upgrade​

Non-destructive. Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. The upgrade adds 3 new columns (default_sort_field_id, default_sort_direction, reverse_field_id) with defaults. Existing data, permissions, and behavior preserved. Tested across the full v1.0.0 → v1.5.0 upgrade chain with schema match against a fresh install.
  • Love
Reactions: briansol

Data Tables v1.4.6 - Permissions Fix​

Hotfix - v1.4.5 shipped with empty permission definition files due to a build packaging error. Upgrading to v1.4.5 wiped the 4 DataTables permissions (viewDataTable, addRecord, editRecord, deleteRecord).

v1.4.6 restores them. You may need to re-set your permission values (which groups have allow/deny) in Groups & permissions > User groups > [group] under the "Data Tables" section.

All 3 fixes from v1.4.5 (autocomplete pre-fill, pagination, CSV UTF-8) are included unchanged.

Upgrade​

Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. No database changes.

Data Tables v1.4.5 - 3 Bug Fixes​

Three fixes from @briansol's testing.



Bug Fixes​

  • Table lookup autocomplete loses value on edit - Fields with more than 50 options switch to autocomplete/search mode. When editing a record, the search box showed "Search..." instead of the current value (e.g., "5AN"). The hidden form value was correct so saving didn't lose data, but you couldn't see what was selected. Now pre-fills the label. (Reported by briansol)
  • Pagination broken on public table view - Navigating to /page-2 always loaded page 1. The page number from the URL path wasn't being passed to XF's pagination handler. Now works correctly with sort parameters too (e.g., /page-2?direction=asc). (Reported by briansol)
  • CSV import crashes on Word special characters - Pasting text from Word into a CSV (em dash, en dash, curly quotes) caused "Malformed UTF-8" errors because these characters are Windows-1252 encoded, not UTF-8. Now auto-converts to valid UTF-8 before processing. Valid UTF-8 characters (Japanese, Chinese, emoji, accented) are preserved unchanged. (Reported by briansol)

Upgrade​

Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. No database changes.

Data Tables v1.4.4 - CSV Import Fix​

Targeted fix for CSV import with cross-table lookups. Reported by @briansol.



Bug Fixes​

  • "Create missing lookup values" now works for table_lookup fields - The checkbox only created missing static dropdown options (lookup fields) but did nothing for cross-table references (table_lookup fields). If your CSV had a column mapped to a table_lookup field with values that didn't exist in the linked table, you'd get "Linked record not found" errors regardless of the checkbox. Now auto-creates records in linked tables. Deduplication ensures the same value across 200 rows creates just 1 record. (Reported by briansol)
  • CSV import rejects rows with unmapped required fields - If your CSV didn't include columns for every required field in the table, all rows were rejected even if the missing fields weren't mapped. Now only validates required fields that are actually mapped in the CSV.
  • Empty lookup cells display "(Unknown)" - Empty lookup/table_lookup cells stored 0 instead of null, causing the display to show "(Unknown)". Now stores null and displays blank, matching manual form behavior.
  • Multi-select table_lookup not handled in CSV - Comma-separated values like "B16A2, B18C5" in multi-select fields were treated as a single lookup. Now split and resolved individually.
  • CSV import crashes on auto-create failure - If creating a linked record failed (DB error, slug collision), the entire import crashed. Now catches the exception, logs it, and skips the row with a clear error.
  • Excel CSV files broken by UTF-8 BOM - Excel exports CSV files with a UTF-8 BOM character that caused the first column header to not match during auto-mapping. BOM is now stripped.
  • Color and rich text fields not handled in CSV import - These field types fell through with no validation. Color now validates hex format (#RRGGBB); rich text passes through correctly.

Performance​

  • Pre-built lookup caches - Single DB query per lookup/table_lookup field at import start, then O(1) cache hits per row. Replaces v1.4.3's per-cell queries that did a full table scan for every CSV cell.

Upgrade​

Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. No database changes - this is a PHP-only fix with updated phrases.

Data Tables v1.4.3 - Bug Fixes + Performance​

Bug fixes and performance improvements. All issues from @briansol's reports are addressed.



Bug Fixes​

  • Rich text fields not saving - Content entered in the WYSIWYG editor (formatted text, bullet lists, bold, etc.) was silently lost on save. The field appeared blank on next view. Fixed by properly reading the editor's HTML output and converting it to BBCode for storage. (Reported by briansol)
  • Wrong slugs don't 301 redirect - URLs with incorrect slugs (e.g., /reference/transmissions/fsdfsdfsddsfsd.263/) served the page content without redirecting to the canonical URL. Now returns a proper 301 redirect to the correct slug. Applies to record view, edit, and delete pages. (Reported by briansol)
  • Pagination URLs use query params instead of XF-style paths - Changed from /reference/transmissions/?page=2 to /reference/transmissions/page-2, matching XF's native forum/thread pagination pattern. Sort parameters remain as query params where appropriate. (Reported by briansol)
  • Admin bulk delete has no confirmation - Selecting records and clicking "Delete selected" now shows a confirmation page with the count of records to be deleted. Records are only removed after explicit confirmation. (Reported by briansol)
  • Textarea/rich text not truncated in table view - Long text content (textarea and rich text fields) now truncates to ~100 characters with ellipsis in table views. Full content is still displayed on record detail pages. Fixes the row height blowout on tables with notes/description fields. (Reported by briansol)
  • File health check warnings - Eliminated "Missing" and "Unexpected contents" warnings on permissions.xml in the AdminCP file health check. Caused by a stale hashes.json entry from a prior build.

Performance​

  • Table lookup maps scoped to current page - Previously loaded ALL records from linked tables on every page view. Now only fetches records actually referenced on the current page. Dramatic improvement for tables with large linked datasets.
  • Autocomplete search bounded - Search no longer loads the entire table into memory for PHP-side filtering. Uses SQL LIKE with a limit of 50 candidates, then resolves display labels only for matches.
  • In-memory sort capped - Column sorting on JSON-stored fields is capped to tables with 500 or fewer records. Above that threshold, default pagination order is used to avoid loading the entire dataset into memory.
  • COUNT queries eliminated - Add/edit forms no longer run a COUNT query per table-lookup field. Uses the pre-maintained record_count column instead.
  • New composite index - Added (definition_id, created_date, record_id) index on the records table for faster default-order pagination.

Upgrade​

Upload the ZIP via Admin CP > Add-ons > Install/upgrade from archive. One automatic migration step adds the new database index. Seamless from any prior version.
v1.4.2 fixes two UI issues reported by briansol:
  • Color picker sizing - The color input displayed as a full-width thin black bar in admin forms. Now renders as a compact 80×36px color box.
  • Type change confirmation layout - The impact stats (records affected, auto-convertible, etc.) overlapped their labels. Now uses standard XF form rows with the description in the block header.
v1.4.1 fixes the sitemap handler that was not properly registered in v1.4.0. Records will now correctly appear in your XF sitemap. No other changes.
Back
Top Bottom