Prepare for v6.23#2461
Conversation
WalkthroughVersion bump to 6.23 across the repo, many @since/@jsdoc annotations updated from x.x to 6.23, translation POT updated with new strings and header changes, two Cypress tests broadened/adjusted; no functional or API signature changes. Changes
Sequence Diagram(s)(omitted — changes are documentation/versioning and small test adjustments; no new control flow to visualize) Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🔭 Outside diff range comments (5)
classes/views/frm-fields/back-end/settings.php (1)
381-386: Bug: Undefined variable$ftypused instead of$ftype.This will trigger a PHP notice and render an incorrect option label.
Apply this diff:
- FrmHtmlHelper::echo_dropdown_option( - is_array( $ftype ) ? $ftype['name'] : $ftyp, - $fkey === $field['type'], - $type_option_params - ); + FrmHtmlHelper::echo_dropdown_option( + is_array( $ftype ) ? $ftype['name'] : $ftype, + $fkey === $field['type'], + $type_option_params + );classes/helpers/FrmAppHelper.php (1)
32-46: Stale version references detected — please update to 6.23The grep search turned up lingering “6.22.3” entries that need bumping:
• readme.txt:393
• changelog.txt:20No placeholder
@since x.xusages remain.stripe/models/FrmStrpLiteAuth.php (3)
111-116: Fix strpos check to avoid false negatives at position 0Using strpos() in a boolean context fails when the match is at offset 0. Compare strictly against false.
Apply:
- if ( strpos( $html, $substring ) ) { + if ( strpos( $html, $substring ) !== false ) {
714-731: Do not overwrite $success_url; trim/filter the selected value$success_url is unconditionally reset to the form option, ignoring any action-level URL. Trim/filter the computed $success_url instead.
Apply:
private static function get_redirect_url( $atts ) { $actions = FrmFormsController::get_met_on_submit_actions( $atts ); if ( $actions ) { $success_url = reset( $actions )->post_content['success_url']; } - if ( empty( $success_url ) ) { - $success_url = $atts['form']->options['success_url']; - } - - $success_url = trim( $atts['form']->options['success_url'] ); + if ( empty( $success_url ) ) { + $success_url = $atts['form']->options['success_url']; + } + + $success_url = trim( $success_url ); $success_url = apply_filters( 'frm_content', $success_url, $atts['form'], $atts['entry'] ); $success_url = do_shortcode( $success_url ); $atts['id'] = $atts['entry']->id;
617-619: Regex uses Unicode property class without 'u' modifier\p{P} requires the Unicode 'u' modifier; without it, preg_match may warn and return false. Add 'u'.
Apply:
- if ( ! preg_match( '/^[a-zA-Z0-9\s\p{P}]+$/', $name ) ) { + if ( ! preg_match( '/^[a-zA-Z0-9\s\p{P}]+$/u', $name ) ) {
🧹 Nitpick comments (3)
classes/views/frm-fields/back-end/settings.php (1)
266-271: Typo in user-facing text (“show to image”).Small grammar fix to avoid confusing users.
Apply this diff:
- <?php esc_html_e( 'If this URL points to an image, show to image on the entries listing page.', 'formidable' ); ?> + <?php esc_html_e( 'If this URL points to an image, show the image on the entries listing page.', 'formidable' ); ?>classes/controllers/FrmFieldsController.php (2)
958-971: Fix typos in doc comment (“attributees”, “unasfe”).Minor spelling issues in comments; clarify intent.
Apply this diff:
- /** - * Disallow possibly unsafe attributees (that trigger JavaScript) when unasfe HTML is not allowed. + /** + * Disallow possibly unsafe attributes (that trigger JavaScript) when unsafe HTML is not allowed.
1151-1159: Fix typo in doc comment (“alterntative”).Apply this diff:
- * Add parameters to an input value as an alterntative to + * Add parameters to an input value as an alternative to
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
js/formidable.min.jsis excluded by!**/*.min.js,!**/*.min.js
📒 Files selected for processing (12)
classes/controllers/FrmFieldsController.php(1 hunks)classes/controllers/FrmFormActionsController.php(2 hunks)classes/helpers/FrmAppHelper.php(1 hunks)classes/helpers/FrmFormsHelper.php(1 hunks)classes/models/FrmMigrate.php(1 hunks)classes/models/fields/FrmFieldGdpr.php(1 hunks)classes/models/fields/FrmFieldType.php(1 hunks)classes/views/frm-fields/back-end/settings.php(1 hunks)formidable.php(1 hunks)js/formidable_admin.js(6 hunks)languages/formidable.pot(44 hunks)stripe/models/FrmStrpLiteAuth.php(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cypress
🔇 Additional comments (23)
classes/views/frm-fields/back-end/settings.php (1)
77-79: Docblock @SInCE updated to 6.23 — OK.
No functional changes here.classes/controllers/FrmFieldsController.php (1)
194-200: Docblock @SInCE updated to 6.23 — OK.
No behavior change; filter name and params remain the same.classes/models/FrmMigrate.php (1)
77-79: Docblock @SInCE updated to 6.23 — OK.
No runtime changes; method remains private and logic unchanged.classes/models/fields/FrmFieldType.php (1)
577-589: Docblock @SInCE updated to 6.23 — OK.
Method continues to proxy to the existing guarded options check; no signature or visibility changes.classes/models/fields/FrmFieldGdpr.php (1)
202-206: Docblock @SInCE normalized to 6.23 — looks goodMatches the release bump; no runtime impact.
classes/helpers/FrmFormsHelper.php (1)
286-296: Docblock @SInCE updated to 6.23 — consistent with releaseNo functional changes; all good.
stripe/models/FrmStrpLiteAuth.php (4)
546-553: Docblock @SInCE updated to 6.23 — goodAccurately reflects introduction of get_statement_descriptor.
556-565: Filter docblock @SInCE updated to 6.23 — goodConsistent with method docblock and release.
580-587: Docblock @SInCE updated to 6.23 — goodNo functional changes; ok.
600-608: Docblock @SInCE updated to 6.23 — goodMatches surrounding changes.
js/formidable_admin.js (6)
1574-1586: Docblock @SInCE updated to 6.23 — looks goodAnnotation reflects the release version; no functional change in getInsertNewFieldArgs.
1598-1606: Docblock @SInCE updated to 6.23 — looks goodAccurate metadata for shouldStopInsertingField; behavior unchanged.
1656-1665: Event docblock @SInCE updated to 6.23 — looks goodfrm_after_field_added_in_form_builder annotation correctly reflects versioning.
1713-1723: Docblock @SInCE updated to 6.23 — looks goodcheckMsgForFieldId documentation version aligned with release.
2113-2123: Event docblock @SInCE updated to 6.23 — looks goodPost addFieldClick flow documenting frm_after_field_added_in_form_builder with 6.23 is consistent.
2181-2196: Event docblock @SInCE updated to 6.23 — looks goodinsertFormField hook doc updated to 6.23; no code changes.
classes/controllers/FrmFormActionsController.php (2)
86-94: Docblock @SInCE updated to 6.23 — looks goodmaybe_unset_highrise annotation matches the release version; implementation unchanged.
199-206: Docblock @SInCE updated to 6.23 — looks goodget_crm_actions documentation reflects 6.23; no functional modifications.
languages/formidable.pot (5)
5-5: Version update correctly reflects new releaseThe project version has been properly updated from "Formidable Forms 6.22.3" to "Formidable Forms 6.23" which is consistent with the PR objectives.
12-12: POT creation date updated appropriatelyThe POT-Creation-Date has been updated from "2025-07-10" to "2025-08-12T12:14:35+00:00", which follows proper translation file versioning practices.
5212-5213: New translation strings added for form importerThree new translation strings have been added for the FrmFormMigrator functionality:
- "Start Import"
- Import completion message with form count placeholder
- "No form fields found."
These additions align with the importer workflow updates mentioned in the AI summary and provide proper internationalization support.
Also applies to: 5217-5218
5502-5503: Terminology corrections for spam prevention servicesThe translation strings have been corrected to use proper capitalization and terminology:
- "stopforumspam API" → "Stop Forum Spam API"
- "Use Honeypot" → "Use honeypot"
These changes improve consistency and follow the official branding of these services.
Also applies to: 5506-5507, 5586-5587
296-297: Line number updates due to new string insertionsMultiple line number references have been updated throughout the file as a result of the new translation strings being inserted. This is expected behavior when maintaining translation files and ensures proper mapping between code and translations.
Also applies to: 308-309
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js (1)
52-58: Harden CTA text assertion against promo/whitespace variations and leverage Cypress retriesMarketing copy can change (percentages, punctuation, NBSPs). Also, using
.should(...)keeps the assertion retryable. Recommend a regex-based match with whitespace normalization and an optional punctuation allowance.- cy.get('.frm-tip-cta').then(($el) => { - const text = $el.text().trim(); - expect(text).to.be.oneOf([ - "Upgrade to Pro.", - "Get 60% Off Pro!" - ]); - }) + cy.get('.frm-tip-cta') + .should('have.length', 1) + .first() + .should(($el) => { + const text = $el.text().replace(/\u00a0/g, ' ').replace(/\s+/g, ' ').trim(); + // Accept either the generic CTA or a promo with a variable percentage + expect(text).to.match(/^(Upgrade to Pro\.?|Get \d+% Off Pro!?)$/); + });Follow-up: Are there any other promo variants marketing may run (e.g., “Save 50% on Pro”) that we should future-proof for? If so, we can broaden the regex accordingly or pivot to a data-qa attribute for a content-agnostic assertion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
changelog.txt(1 hunks)readme.txt(1 hunks)tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- readme.txt
- changelog.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: Cypress
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
tests/cypress/e2e/Forms/formPageDataValidation.cy.js (3)
24-31: Trim the H1 text before equality check to avoid whitespace-related flakesThe external page’s heading may include leading/trailing whitespace or line breaks. Trimming improves stability without weakening the assertion.
Apply this diff:
- cy.get('h1').should(($h1) => { - const headingText = $h1.text(); + cy.get('h1').should(($h1) => { + const headingText = $h1.text().trim(); expect([ 'The Only WordPress Form Maker & Application Builder Plugin', 'Upgrade Today to Unlock the Full Power of Formidable Forms' ]).to.include(headingText); });
16-20: Ensure exactly one upgrade link is targeted to avoid concatenating text/href across multiple matchesIf both selectors match in a given environment, $el.text() concatenates text from all anchors and $el.attr('href') takes only the first href, which can cause false positives. Guard for a single match.
Apply this diff:
- cy.get('.frm-upgrade-bar .frm-upgrade-bar-inner > a, #frm_sale_banner a:not(.dismiss)') + cy.get('.frm-upgrade-bar .frm-upgrade-bar-inner > a, #frm_sale_banner a:not(.dismiss)').should('have.length', 1) .then(($el) => { const text = $el.text().trim(); const href = $el.attr('href');If there are legitimate cases with multiple CTAs, consider using
.first()or filtering to the visible primary CTA instead.
33-33: Include href in the failure message for faster diagnosticsThe thrown error currently omits the href, which is useful when debugging failures.
Apply this diff:
- throw new Error(`Unexpected banner text or missing href: "${text}"`); + throw new Error(`Unexpected banner text or missing href. text="${text}", href="${href}"`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/cypress/e2e/Forms/formPageDataValidation.cy.js(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/cypress/e2e/Forms/formPageDataValidation.cy.js (1)
js/formidable_admin.js (1)
href(10881-10881)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: Cypress
- GitHub Check: PHP 7.4 tests in WP trunk
No description provided.