Fix: Form Entries - #1210
Draft
n7studios wants to merge 1 commit into
Draft
Fix: Form Entries#1210n7studios wants to merge 1 commit into
n7studios wants to merge 1 commit into
Conversation
WordPress Playground🚀 Your PR has been built and is ready for testing in WordPress Playground! |
n7studios
marked this pull request as ready for review
October 1, 2026 10:41
n7studios
requested review from
a team,
ciccio-kit and
noelherrick
and removed request for
a team
October 1, 2026 10:41
n7studios
marked this pull request as draft
October 2, 2026 02:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes several issues with Form Entries (Settings > Kit > Form Entries), and the
ConvertKit_Form_Entriesclass:%iidentifier placeholder, which$wpdb->prepare()only supports from WordPress 6.2. The Plugin requires WordPress 5.6, so on older versions theCREATE TABLEquery failed and Form Builder entries were never stored. The 3.0.4 upgrade routine that adds theform_idcolumn had the same issue. The table name is now interpolated from$wpdb->prefixinstead, matchingget_by_ids()anddelete_by_ids().=,+,-,@, tab or carriage return were exported as-is, so spreadsheet applications would run them as formulas. These values are now prefixed with'so they're treated as text.update()returned the wrong ID. It returned$wpdb->insert_id(0, or the last inserted entry's ID), soupsert()returned the wrong ID for existing entries. It now returns the entry's ID.%and_as wildcards. Search terms are now escaped with$wpdb->esc_like().orderbycaused a database error.search()now only orders by a known column, falling back tocreated_at.delete_by_ids()with no IDs ran an invalidIN ()query. It now returns early.current_user_can( 'manage_options' ), and the export is sent astext/csv; charset=utf-8instead ofapplication/x-msdownload.Testing
New Integration tests in
FormEntriesTest, which fail onmainand pass with this PR:testUpdateEntryReturnsEntryIDtestUpsertExistingEntryReturnsEntryIDtestDeleteEntriesWithNoIDstestSearchWithWildcardCharacterstestSearchWithInvalidOrderBytestGetCSVStringEscapesDoubleQuotestestGetCSVStringEscapesFormulasExisting
FormEntriesTestandPluginSettingsFormEntriesCesttests pass unchanged.For the
%ichange,FormEntriesTestwas also run against WordPress 6.1.7. It fails onmain(the table isn't created) and passes with this PR. A one-off check confirmed the 3.0.4 upgrade routine now adds theform_idcolumn on 6.1.7. CI only tests the latest WordPress version, so neither check is included as an automated test.Checklist