ACPT – Custom post types plugin for WordPress

ACPT – Custom post types plugin for WordPress 2.1.13

Free Download with Account
### Added

- **Public API: three roll back functions** - `remove_acpt_meta_group()`, `remove_acpt_meta_fields()` and `restore_acpt_meta_field_storage()` join level 1, so ACPT Migrate can undo an import: remove the groups, boxes and fields it created, and put back the raw values it overwrote. Like the other level 1 functions they fire no hooks and clean no caches. See `docs/public-api.md`.

### Changed

- **Much faster with the cache off** - field groups were rebuilt once per post type and taxonomy on every request: on a site with 31 groups and 250 fields an admin page ran about 89,000 database queries (18-20 seconds) and a front-end page about 32,000. Field group definitions are now read once per request, with 12 queries in all, and kept in one cache entry when the cache is on. On the same site an admin page now runs about 3,600 queries (under 2 seconds). Nothing changes in what the pages show (Ticket #1455).

### Fixed

#### Meta fields

- **Renaming a meta box renamed the values of other boxes** - renaming box `info` also renamed the saved values of box `info_extra` (any box whose name starts with the old name and `_`), and could rewrite the old name in the middle of a key. Only the keys of the renamed box move now (Ticket #1455).
- **Field group list empty for up to an hour** - a request with an empty group name or id filter (for example the `acpt/list-meta-groups` ability called with an empty optional filter) cached an empty result in place of the full list, so the admin list showed no field groups until the cache expired or was flushed (Ticket #1479).
- **Post/Term/User Object Multi fields: minimum and maximum ignored on save** - in the classic edit screen the selection is sent as "12,34": every save logged a PHP warning, the selected ids were not checked, a field with a minimum rejected every save and a maximum was never enforced. The selection is read correctly now.
- **Repeater nested in a Repeater or Flexible block: "type" and "original_name" are reserved** - a sub-field with one of those names shared its saved key with the nested Repeater's own data. The field name check now rejects them there, as it already did elsewhere.
- **Icon field: uploaded SVGs kept their colours** - the Fill and Stroke colours were not applied to an uploaded SVG painted with `rgb()`, short hex (`#000`) or named colours (`black`). They are now (Ticket #1476).
- **Table field: lost edits and silent errors** - a Table field whose hidden input was missing discarded every edit on save without a word: it now shows an error under the table. A Google Sheets import that failed on a network error showed nothing; it now reports the error. Changing the table layout with the keyboard now shows or hides the header option.

#### Tools

- **Meta Keys Manager: rows repeated or missing between pages** - rows with the same meta key (the default sort) came back in no fixed order, so a row could show on two pages and another on none.

#### General

- **Critical error emails blaming ACPT when a theme or plugin checks for updates** - a theme (SNN-BRX) that called the WordPress HTTP API with no URL made an ACPT callback throw a fatal error, so WordPress put the site in recovery mode and emailed about ACPT (Tickets #1482, #1483).
- **Cache warnings in error monitors** - under concurrent requests the file cache logged warnings such as `mkdir(): File exists`, `unlink(): No such file or directory` and `fopen(): Failed to open stream`, plus "Calling many times CacheManager::getInstance()" after an update. Nothing was lost (ACPT reads the database instead), but monitors that record silenced warnings, such as WP Umbrella, reported them. They are kept out now, and the cache no longer deletes entries it does not need to, so the race happens far less often (Ticket #1480).
Added

- **Public API: field settings and discovery** - `save_acpt_meta_group_definition()` now also saves each field's `required`, `description`, `default`, `advanced_options`, `validation_rules` and `conditions` (a condition names its target field by name, saved in the same call). A validation rule without a message gets the condition's default one. Two new functions, `acpt_supported_field_types()` and `acpt_supported_field_settings()`, tell another plugin which field types and settings the installed edition can save (ACPT Lite saves `required`, `description` and `default`). ACPT Migrate uses them.

### Fixed

#### Meta fields

- **Saving an option page emptied a Repeater or Flexible field** - when the field's name started with the page slug and its meta box name ended with it (the page "equipe", the box "membres-equipe", the field "equipe_personnes"), the rows were posted under a shortened name. Saving the page without changes deleted every row, and a new row replaced the existing ones. The rows keep their field's name now. Rows already lost can only be restored from a backup (Ticket #1468).
- **Fields set to 33% width landed in the wrong rows** - three 33% fields add up to 99%, so the fourth one was put alone in a row of its own, and every following row was off by one (a toggle alone, then two time fields with the next toggle). A field that doesn't fit now starts the next row, on every edit screen and in Repeater rows, Flexible blocks and Custom Content Table record forms (Ticket #1467).
- **Fields shown on a checkbox condition disappeared while editing** - with several options ticked, the edit screen read only the first one ticked, so a field shown "if colors contains red" was hidden when "blue" had been ticked before "red". Every ticked option is read now, for "contains", "not contains", "in", "not in", "is blank" and "is not blank".
- **An empty File field showed an empty link** - on the edit screen, a File field with no file and no default value showed a blank link and the "Edit label" button instead of "No file selected". It shows "No file selected" now.
- **An uploaded file could link to another file with the same name** - when a file uploaded through a meta field or a front-end form had the name of a file already in the Media Library, WordPress saved it under a new name (`report-1.pdf`), but ACPT recorded the old name. PDFs, audio, video and every other non-image field then linked to the earlier file. The new file's own address is recorded now. Files uploaded before this version keep the wrong link until they are uploaded again.
- **A 0 saved from code was stored as an empty value** - `save_acpt_meta_field_value()` (and the REST field-value endpoints and abilities built on it) skipped an int `0` or float `0.0` when the field had no value yet, so a Number, Range, Currency, Length or Weight field stayed empty. The string "0" was saved fine. A 0 is now saved.

#### Forms

- **Saving a form put its validation rule ids straight into SQL** - the cleanup of the rules removed from a form built its `NOT IN (...)` list by joining the ids from the saved form. An id with a quote broke the save. The ids are bound as values now, for the form's fields too.
- **A refused form submission left its files in the Media Library** - a front-end form uploaded its files before checking the security token, the captcha, the validation rules and the user's permissions, and also uploaded a file that had just failed its own size, type or dimension check. A refused submission kept those uploads. Nothing is uploaded now when the security token is invalid or a file fails its checks, and the uploads of a submission refused for another reason are deleted.
- **Deleting a form left its validation rules in the database** - the rules of its fields stayed behind with nothing pointing to them. They are deleted with the form now. Rules left by forms deleted earlier stay until a database cleanup.

#### Custom Content Tables

- **A Checkbox, Select multi, Radio or List column couldn't be emptied** - in the record form, unticking every option, removing every selected item or every List row, or a relation field emptied in its select layout, kept the old value, while the page said "Record saved successfully". These columns are saved empty now.
- **A table whose database table no longer matched its definition took the page down** - when MySQL rejected the query reading the records (a column missing from the database table, for example), the records list ended in "There has been a critical error", or showed an empty list with no error. The REST API now answers with a 500 error and a message, the admin list shows an error, and the MySQL error is logged. A failed query is no longer cached, so the records show again as soon as the table is repaired.

#### General

- **PHP deprecation notices in the debug log** - with `WP_DEBUG` on, PHP 8.1 and later logged "Passing null to parameter" notices when a Date Range field was saved for the first time, when a front-end form showed a Currency, Length or Weight field without a default value, and when an email was sent without a template. PHP 8.4 also logged notices for the CSV export and import. None of them changed what ACPT did, and they are gone now. The CSV files ACPT writes and reads are unchanged.

#### Integrations

- **Bricks: a Query Loop on an ACPT field could stop the page** - a loop over a Repeater, Flexible Content block or nested field whose value wasn't a list of rows (a block that couldn't be found, a single value where rows were expected) ended in "There has been a critical error". The loop is now empty instead.
- **Bricks: filters didn't list options no post uses yet** - a Select, Checkbox or Radio filter on a Select, Select multi, Radio or Checkbox field listed only the values found in the index, so an option no post had picked yet (FWD with only 4WD and RWD cars) was missing. Every option of the field is now listed in the field's order, the unused ones with a count of 0. A filter on a Custom Content Table Relationship column lists every record of the related table the same way (Ticket #1464).

#### Internal

- **Test suite on WordPress 7.2** (no change for users) - 18 tests compared HTML as WordPress 7.1 sanitized it, attribute order included. WordPress 7.2 sorts the attributes, so they failed there. The tests now compare the markup whatever the attribute order.
- **Test uploads stay out of the site's uploads folder** (no change for users) - the test suite wrote its uploaded files into the WordPress install's `wp-content/uploads`, and a test that failed before cleaning up left them there. Each run now uploads to a temporary folder that is removed when it ends.
### Fixed

#### Updates

- **Fatal error at the end of the update to 2.1.8** - updating from 2.1.7 or older showed "Class ACPT\Utils\Http\ACPTApiClient not found" (or "ACPT\Utils\PHP\Session") after "Plugin updated successfully". The update did complete and the site kept working: the old version, still running until the update page finished, couldn't find its files in the new package. Updating from older versions no longer shows the error (Tickets #1444, #1446).

#### ACPT Lite

- **Activating ACPT while ACPT Lite 2.1.0 is active crashed** - upgrading from ACPT Lite failed with "Plugin could not be activated because it triggered a fatal error": both plugins declared the same functions, and the import stopped on a Lite field group without a position (e.g. a field group on users). ACPT now activates, imports Lite's post types, taxonomies and field groups, and deactivates Lite.
### Fixed

#### Compatibility

- **Fatal error when saving a post** - on sites where another plugin loads a newer version of the webmozart/assert library (2.x, PHP 8.2+), saving a post with ACPT fields crashed with "Declaration of ACPT\Utils\PHP\Assert::string() must be compatible". ACPT no longer redeclares the library's methods, so it works with both versions (Ticket #1435).
- **Conflicts with other plugins' PHP libraries** - ACPT's PHP libraries (Twig, phpfastcache, webmozart/assert, Symfony YAML and the others) are now bundled under ACPT's own namespace, so another plugin loading a different version of the same library can no longer break ACPT, or be broken by it.

#### Admin

- **The update was offered again after updating** - right after an update, WordPress offered the same version again. ACPT now compares against the installed version, and an up-to-date ACPT shows the auto-updates toggle (Ticket #1439).
- **"No response from the server" on the license page** - when acpt.io's answer wasn't JSON (a firewall's block page, an error page), the license page hid what the site received. It now shows the HTTP status and the page's text (Ticket #1431).
- **Saving a meta group with a nameless box crashed** - the save failed with a server error; the box is now rejected with a message. Empty field type groups are hidden in the WooCommerce product data builder.

#### Meta fields

- **Required fields hidden by their conditions blocked the save** - a required field hidden by its own or its box's conditions stopped the browser from submitting the form, and was still validated on the server ("Expected a non-empty value."). Hidden fields are no longer required or validated; their value is still saved (Ticket #1437).
- **Repeater children named "type" or "original_name"** - they were saved but missing from `get_acpt_field()`. They are returned again (Ticket #1437).
- **Length limits counted bytes** - Min/Max length on meta and form fields rejected accented text the browser had accepted. Limits now count characters, as the browser does (Ticket #1439).
- **Date & time values in the canonical format were rejected** - the date check was inverted: a Date & time field saved as `2026-10-26 14:30:00` (from code, the REST API or an import) failed validation. It is now accepted, like every other date format the field can store.

#### Gutenberg & Dynamic blocks

- **Saved ACPT blocks showed as unsupported** - "Your site doesn't include support for this block" appeared when the editor parsed the post before ACPT registered its blocks, and on post types registered on `init` (GeneratePress Elements, most plugin CPTs) the blocks and their styles weren't registered server-side. Both are fixed (Ticket #1441).
- **Image fields printed the alt text in dynamic block templates** - `{{ acpt_box_image }}` printed the alt text or title, so `<img src="...">` broke. Image, File and Gallery values now print their URL and still answer `.alt`, `.title`, `.id` and the other attachment properties (Ticket #1436).

#### Integrations

- **Bricks: query filters didn't work on CCT columns** - on a post type whose fields come from a CCT, filter elements (Select, Checkbox, Range...) had no options and never narrowed the loop. They now index and filter the CCT column values (Ticket #1434).
- **WPML / Polylang: media fields showed the same attachment in every language** - the generated `wpml-config.xml` didn't list the attachment ID key of Image, Gallery, File, Video, Audio and Image slider fields. It does now, with the field's own translation settings (Ticket #1432).

#### Internal

- **Test suite on WordPress 7.2** (no change for users) - two tests expected HTML exactly as WordPress 7.1 sanitized it. The tests now pass on both versions.
Added

- **Feeds setting for post types** - a new "Feeds" toggle (Settings step, on by default) switches off a post type's archive feed. With it off, `/{slug}/feed/` is gone, the archive stops advertising the feed and `?post_type=x&feed=rss2` redirects to the archive. Saving a post type now also flushes the rewrite rules with its new settings instead of the previous ones (Ticket #1427).

### Fixed

#### Security

- **Stored XSS in the CPT admin filters** - meta values and terms were printed unescaped in the list-screen filter dropdowns, so a stored value could inject markup (Author → Admin). They are now escaped.
- **PHP Object Injection in CCT values** - a serialized object stored in a CCT column (through the REST API or a public form) was instantiated on every read of the record. CCT values now go through the plugin's object-safe unserializer.

#### Meta fields

- **Fields were renamed on save** - since 2.1.0 a field sharing its name with a field in another box was renamed to `name_1`, `name_2`... on any save of its group, orphaning its stored values. Field names now only need to be unique within their box, and an existing field is never renamed (Tickets #1421, #1422).
- **Table fields rendered empty** - since 2.1.0 Table fields were stored as a PHP array instead of JSON, so they rendered empty in Bricks, the shortcode and the builders, and Bricks' raw tag crashed. They are stored as JSON again, and tables saved by 2.1.0-2.1.6 render without a re-save (Ticket #1428).
- **Stray backslashes in Table cells** - the Table editor saved its own escapes as text ("210 / 297 mm" showed as "210 \/ 297 mm") and typed backslashes were lost. Cells now save as typed, and cells saved with a stray "\/" display without it (Ticket #1428).
- **Phone field country on user profiles and term screens** - a saved country always showed as the US, and picking only a flag in the default-value editor stored a broken value that crashed the field editor. Both are fixed; a number without a country falls back to the field's default country (Ticket #1426).

#### Custom Content Types

- **Dates in a custom format failed validation** - a date column with its own format (e.g. "Y") rejected the value from the admin form. Dates, times and date ranges are now parsed with the column's format first (Ticket #1423).
- **Relationships to another CCT table** - a Relationship field pointing to a CCT table printed "Array" (or nothing in Bricks). The related records now resolve, and Bricks renders them by their label column (Ticket #1424).
- **"Set as post thumbnail" ignored for CCT columns** - Image, Gallery and Image slider columns saved in a CCT table now set the featured image when the option is on (Ticket #1425).
### Fixed

#### Admin

- **Datasets couldn't be edited** - since 2.1.2 every "Manage" link opened the datasets list instead of the dataset, so a dataset's items couldn't be changed. The list now lives at `#/tools/datasets`; old links to `#/tools/dataset` still work (Ticket #1420).
- **Updates could keep running the previous release's scripts** - the helper scripts loaded by the admin had no version in their URL, so a browser could keep the old ones cached after an update (and downloaded them twice). They now carry the plugin version (Ticket #1413).

#### Meta fields

- **The Icon field was blocked by the icon service** - each search result was loaded with its own request, so after a few searches the icon service refused them and icons in later Repeater rows showed as broken and couldn't be picked. Results now load with one request per icon set and picking an icon needs no request. Saved values are unchanged (Ticket #1413).

#### Custom Content Types

- **Table data saved from tab views was lost** - in meta groups shown as vertical or horizontal tabs, every save created a new record that wasn't linked to the post, so the data looked never saved and Bricks query loops showed nothing. Saves now update the post's record (Ticket #1416).
- **Failed table saves were silent** - when a record failed validation the post saved and the table data was lost without a message. An error notice is now shown, also in the block editor (Ticket #1416).
- **Empty optional numbers and dates blocked the save** - an empty Number, Date, Date & time or Time input failed validation for the whole record; optional columns now save as empty (NULL). Decimal numbers no longer lose their decimals (1.6 was saved as 1) (Ticket #1416).

#### Integrations

- **Bricks: Toggle conditions on the displayed label stopped matching** - since 2.1.2 a condition comparing a Toggle field with its label (e.g. `== Pravda` on a Czech site) hid the element. It matches again (Ticket #1419).
- **Elementor Pro: a Select field shown as label crashed the editor when empty** - building a Loop Grid failed with a TypeError. An empty field now renders nothing and multi-value fields render comma separated (Ticket #1415).
### Fixed

#### Admin

- **Saving from the block editor lost every custom field value** - since 2.1.3 the second request the block editor sends to save meta boxes crashed with `Call to undefined function check_admin_referer()`, so the editor said "Updated" while ACPT fields (and other plugins' meta boxes) were not saved (Tickets #1385, #1388, #1390, #1394, #1396, #1397).
- **The edit screen took 30+ seconds with the ACPT cache off** - every repeater row reloaded its parent field and every admin page reloaded each meta box once per field, adding up to over 100,000 database queries on large field groups. Each is now loaded once (Ticket #1387).

#### Meta fields

- **Date fields were saved in the display format** - since 2.1.0 Date, Date & time, Time and Date range values were stored as shown in the picker (e.g. `08.10.2026`) instead of `Y-m-d`, breaking tools that read the stored value, like Bricks' `{cf_...}` tags and date ordering in queries. New saves use the canonical format again; existing values are converted the next time the post is saved (Ticket #1389).
- **Date and Time fields inside a Repeater came back empty** - the read used the Repeater's date format instead of the sub-field's own, so e.g. a `d/m/Y` date was never recognised and dynamic tags (Bricks query loops included) returned nothing (Ticket #1393).
- **WYSIWYG editors could become blank and not editable in the block editor** - the block editor moves the meta boxes around the page (on load, and again e.g. when toggling distraction-free mode), which reset the editors. They now recover automatically, keeping their content (Ticket #1395).
- **Relationship fields with a maximum number of items didn't load** - with the select2 selector, a JavaScript error stopped the selector from initialising (Ticket #1395).
- **Malformed Repeater or Flexible Content data made a post uneditable** - an unexpected value in the stored data (e.g. left by the 2.0.63-2.0.66 block-sort bug) crashed the edit screen. Such entries now show as empty rows that can be removed (Ticket #1397).
- **Backslashes were removed from Textarea and Text values** - every `\` was stripped on save, so JSON escapes were lost and JSON values could be stored invalid (Ticket #1380).

#### Field builder

- **Fields inside a Repeater couldn't be deleted from the canvas** - the trash icon on a sub-field selected the Repeater instead and the confirmation disappeared (Ticket #1392).
- **The Repeater/Flexible "Leading field" dropdown was always empty** (Ticket #1379).
- **A field's conditional rendering only listed fields of its own meta box** - fields of the other boxes in the same group can now be used too (Ticket #1383).

#### Custom tables

- **Records with a Relationship value couldn't be saved from the admin** - selecting a related item made the save fail with "Additional object properties are not allowed", listing every column. Relationship values are now accepted, and validation errors show the real problem next to the column (Ticket #1382).
### Added

- **Collapsible sidebar in the field builders** - the sidebar of every canvas builder (meta fields, forms, custom table columns, dynamic blocks, option pages, WooCommerce product data) can be hidden to a thin strip, from a toolbar button or by dragging its edge, giving the fields the full width on small screens. The choice is remembered per item, and clicking a field reopens the sidebar with its settings.

### Fixed

#### Admin

- **Forms stopped sending email with plugins that replace `wp_mail()`** - since 2.1.0 ACPT loaded WordPress' pluggable functions while plugins were still loading, so plugins that override `wp_mail()` (e.g. ActiveCampaign Postmark) could no longer do it and form emails were lost (Ticket #1377).
- **Updating installed the previous version** - after a release WordPress showed the new version but installed the previous zip, served from a cache. The update package URL now includes the version, so every release gets its own download (Tickets #1354, #1370).

#### Custom tables

- **The admin crashed when two tables had foreign keys pointing at each other** - loading the tables recursed until PHP ran out of memory on every admin page, locking users out of wp-admin. Tables referencing each other, in a pair or a longer chain, now load normally (Ticket #1372).

#### Meta fields

- **JSON in a Textarea field still lost characters with "Allow HTML" off** - spaces and line breaks at the start and end of every JSON string were removed, so values made only of line breaks (common in Etch and Gutenberg exports) were saved empty. The JSON is now saved exactly as typed (Ticket #1370).
- **A Relationship value read with `get_acpt_field()` couldn't be saved back** - it returns the related posts, users or terms as objects, and passing them to `save_acpt_meta_field_value()` failed with a PHP error, so nothing was saved. Objects are now saved as their IDs, and removing an item with `unset()` works too (Ticket #1371).

#### Dynamic blocks

- **HTML and line breaks were stripped from a block's Callback and CSS on save** - the Twig template lost every tag and was compressed to one line, and the CSS was flattened. Both are now saved as typed; users without the `unfiltered_html` capability (e.g. multisite site admins) get post-safe HTML in the Callback and tag-free CSS (Ticket #1378).

#### Field builders on small screens

- **Narrow field cards overflowed their border** - a field at 50% width, or inside a repeater, pushed its switches and type badge outside the card. Cards now adapt to their real width, hiding the inline switches and then the type badge when there's no room; both stay available in the sidebar (Ticket #1376).
- **The sidebar width followed the screen as a percentage** - a sidebar made wider on a large monitor took more than half of the builder on a laptop. Its width is now kept in pixels and capped to half of the builder when the page loads (found while auditing Ticket #1376).
- **Box and block header icons could fall outside the box**, the toolbar's "Sidebar on the right" button was cut off at 1024px, and field names were truncated after 10 characters even when there was room. Headers keep their icons inside, the toolbar switches to compact icons on narrow builders, and names use the available width with the full name on hover (found while auditing Ticket #1376).

#### Bricks

- **Toggle fields never matched in element conditions on non-English sites** - a Toggle was rendered as the translated "True"/"False" (e.g. "Wahr"/"Falsch"), which Bricks conditions don't treat as yes/no, so `{acpt_...} == 1` never matched. Toggles now return `1`/`0` inside element conditions and with the `:value` argument (Ticket #1375).
Fixed

#### Meta fields

- **Editor fields inside Repeaters lost all formatting on save** - since 2.1.0 every sub-field of a Repeater or Flexible Content field was sanitized as plain text, so saving the post stripped the HTML tags and line breaks from Editor sub-fields (and line breaks from Textarea sub-fields). Each sub-field is now sanitized according to its own type; Editor sub-fields keep post-safe HTML (Ticket #1361).
- **Select dropdowns were clipped below 1200px window width** - the responsive meta-field layout set `overflow: hidden`, which cut off the Selectize popup and made arrow-key navigation look unresponsive. Only horizontal overflow is clipped now (Ticket #1360).
- **A saved `0` showed as empty in the admin** - since 2.1.1 a required Number field accepts and saves `0`, but on reload the edit screen showed the input empty (Currency, Weight and Length too), because the escaping helper treated `"0"` as empty. A stored `0` is now shown, and a `0` min/max on the admin Number field is respected (Ticket #1354).
- **Blank Number, Currency, Weight and Length fields were saved as `0`** - leaving the amount empty stored `0`, so the front end showed `0` / `0.00 EUR` instead of nothing. A blank amount now stays blank; an explicit `0` is still saved as `0` (found while investigating Ticket #1355).
- **Time field values came back empty** when saved in a format other than the site's time format (e.g. `10:00` on a site using `g:i a`), which is what the admin time picker saves when the field's display format differs. `get_acpt_field()`, shortcodes and page builder tags returned nothing, including for Time fields inside repeaters. Any supported time format is now accepted (Ticket #1352).
- **Bulk Edit wiped ACPT fields** - WordPress' Bulk Edit panel submitted every ACPT quick-edit input, including the ones left blank, so any bulk edit (even just enabling comments) emptied those fields on every selected post. Blank Bulk Edit inputs now mean "no change", as they do for WordPress' own fields; this also applies to Custom table columns (Ticket #1369).
- **JSON saved in a Textarea field was altered** - `%20`-style sequences and tags inside JSON strings were stripped, and with "Allow HTML" enabled the JSON was saved with backslash-escaped quotes and `&`, `<`, `>` encoded, so it was no longer valid JSON. JSON is now kept as typed; tags inside it follow the field's "Allow HTML" setting (Ticket #1370).
- **The unit of a blank Currency, Weight or Length field was replaced** - when the amount was empty, the edit screen preselected the field's default unit instead of the saved one, so saving the post again overwrote it (Ticket #1355).

#### Admin

- **List pagination crashed with "Unexpected Application Error! 404 Not Found"** - page 2 and later of the Meta Keys Manager, Datasets and WooCommerce product data lists had no matching route, and the Custom Tables list linked its pages to a non-existent `/tables` path. All four now paginate (Ticket #1363).
- **Fatal error with plugins that run the main query early in wp-admin** - a custom login URL plugin rendering its 404 page during an admin request triggered `Call to undefined function get_current_screen()` in the admin columns code, white-screening the site (Ticket #1368).

#### Custom tables

- **Advanced column settings were lost on save** - on a column saved without any advanced settings, later changes to them (width, before/after text, CSS class, min/max, pattern, ...) were silently dropped on every save, because the empty settings were returned as a JSON array instead of an object (found while investigating Ticket #1363).
- **Tables with UNSIGNED or ZEROFILL columns could not be created or synced** - the generated SQL put `UNSIGNED`/`ZEROFILL` after `NOT NULL` (and, when syncing an existing table, after `DEFAULT`/`COMMENT` too), e.g. `BIGINT NOT NULL UNSIGNED`, which MySQL and MariaDB reject as a syntax error. Syncing a column with a text default also produced an unterminated `DEFAULT 'value`. Both are fixed (Ticket #1367).
- **A column default of `0` was dropped, and decimal defaults were truncated** - `0` was treated as "no default" when creating or syncing a table (so `DEFAULT 0` never reached the database), a default like `1.5` was synced as `1`, and a DECIMAL default such as `1` kept showing the table as not synced because the server reports it as `1.00` (found while fixing Ticket #1367).
- **No way to set a Currency column's default currency** - the record form always preselected USD. Currency columns now have a "Default currency" setting (Ticket #1362). Saved advanced settings are also shown again when a column is reopened.
- **Duplicating a column only kept its type** - the copy got the column type but none of the settings changed in the sidebar (length, nullable, default value, advanced settings, ...). The duplicate now copies them, with a new name and id; the primary key flag, index/foreign key links and the inverse side of a bidirectional relation are not copied (Ticket #1363).

#### Bricks

- **Text field tags rendered empty in link settings** - an ACPT Text field used as the only content of a Bricks link setting (e.g. an Icon element's custom URL) returned nothing, because Text fields weren't registered for Bricks' `link` context. They now resolve to the bare URL, without the field's before/after text (Ticket #1356).
- **Date and Time tags printed the "before" text twice and never the "after" text** (found while fixing Ticket #1352).

#### Forms

- **Front-end form Number fields still rejected `0`** - with no limits configured they were rendered with `min="1" max="100"`, so the browser refused `0` (and anything above 100) even after the 2.1.1 fix, and a minimum set to `0` was ignored. Number fields now have no limits unless configured, and a `0` limit is respected (Ticket #1354, follow-up of #1338).
- **Currency, Weight and Length fields rejected `0`** - in both front-end forms and the admin, their amount input defaulted to a minimum of `0.01` (Currency) or `1` (admin Weight/Length), and a minimum set to `0` was ignored. They now have no minimum or maximum unless configured, and a `0` limit is respected (Ticket #1354).

#### Gutenberg

- **Block Bindings: ACPT fields missing from the Site Editor's Attributes panel** - the list of bindable fields was computed once and then cached, so switching templates in the Site Editor without a page reload kept the fields of whatever screen it was first computed on (often none, which hides the panel). The list now follows the template being edited. The list could also be computed before ACPT's fields had finished loading and then stay empty for that template even after a reload (more likely on sites with many field groups); it is now only built once the fields are loaded (Ticket #1357).

#### Divi 5

- **WYSIWYG (Editor) fields lost their formatting in ACPT Dynamic Data** - lists, bold text and other markup were stripped unless "Enable Raw HTML" was turned on. Editor fields now render their HTML (filtered to post-safe markup) by default, like the `[acpt]` shortcode and the legacy ACPT Meta Fields module (Ticket #1358).
Bug-fix release for issues reported after 2.1.0.

### Fixed

#### Meta fields

- **Saving a field group failed with "`Value` key is mandatory"** - a field option row without a value (e.g. a stale row reaching an Image field) aborted the whole group save. Such rows are now skipped, and a row with a label but no value falls back to its label (Ticket #1349).
- **Saving an "All users" / "All comments" location rule fataled** - the empty `find` the UI submits for these rule types is now normalised instead of throwing (Ticket #1339).
- **Currency / Weight / Length fields fataled the post editor** when a default unit was set without a default amount (`explode(): Argument #2 must be of type string, array given`) (Ticket #1346).
- **Required fields rejected `0`** - a required Number field set to `0` failed with "Expected a non-empty value" in the admin and "The field is required" on front-end forms (Ticket #1338).
- **Field groups did not show on taxonomies registered by other plugins** (e.g. WooCommerce Product categories) - they could be selected as a location but never rendered or saved (Ticket #1337).
- **Link fields without link text returned a plain URL string** instead of the `{url, label}` array 2.0.x returned, so they rendered empty in Elementor Pro, Bricks, Divi, Oxygen, Yoast, WP Grid Builder and Zion, and an Elementor Pro display condition on them fataled (Ticket #1341).

#### Option pages

- **Repeater "Add element" did nothing on option pages** - the AJAX row generation fataled with a `Strings::toDBFormat()` TypeError, affecting every repeater on an option page (Ticket #1333).

#### Forms

- **Form submissions bypassed ACPT permissions** - field- and column-level permissions are now enforced on submission, and forms writing CCT records require the table's create/update permission (Ticket #1345).

#### Gutenberg

- **ACPT blocks rendered empty on the front end** - the Basic, Repeater and Relational field blocks and all Dynamic Blocks were registered only in editor contexts, so on the front end WordPress never called their render callback (Ticket #1348).
- **Basic Fields block showed "Error loading block: [object Object]"** in the Site Editor for fields with large settings - the preview request exceeded the server URL limit; it is now sent via POST (Ticket #1322).

#### Integrations

- **SEOPress: pages crashed when an ACPT field rendered empty or `0`** - the SEOPress integration returned `null` from a string-typed method whenever a field value rendered to an empty string or `0`, a fatal error on every page where SEOPress builds its dynamic variables (single posts, archives, and the Breakdance builder preview). It now returns an empty string (Ticket #1335).
- **Breakdance/Oxygen 6 native Repeater Field element could white-screen** - `ACPTRepeaterField::hasSubFields()` left an internal value undefined when a repeater's meta group belonged to something other than a post type, taxonomy, or option page, instead of resolving cleanly to "no rows"; `ACPTField::getValue()` and `RawValueConverter::convert()` also only guarded against `\Exception`, not every PHP error type, and Breakdance's own dynamic-data render chain has no error handling of its own, so any uncaught error here white-screened the whole page.

#### REST API

- **`PUT /acpt/v1/meta/{id}` rejected the unchanged output of `GET`** - read-only keys returned by GET are now accepted, missing settings (group display/context/priority, box settings) were added to the schema, and updating a field keeps its position (Ticket #1347).

#### Miscellaneous

- **Address map never loaded when another ACPT script was on the page** - seven static scripts overwrote each other's `window.onload`; they now use `addEventListener('load', ...)` (Ticket #1344).
- **Caught errors re-crashed the page when ACPT logging was enabled** - the `acpt/error` logger only accepted `\Exception`, so an `\Error` caught by ACPT's own safety nets (Breakdance, field-group visibility, location rules...) threw a new fatal from inside the logger. It now accepts any `\Throwable`.
- **PHP 8.4 deprecation notices** - `OptionPageModel::duplicate()` and `MetaBoxModel::__construct()` implicitly marked a typed parameter as nullable via a `null` default instead of an explicit `?type`, both deprecated as of PHP 8.4.
Back
Top