Skip to content

Prepare for v6.23#2461

Merged
Crabcyborg merged 7 commits into
masterfrom
prepare_for_6.23
Aug 12, 2025
Merged

Prepare for v6.23#2461
Crabcyborg merged 7 commits into
masterfrom
prepare_for_6.23

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@Crabcyborg Crabcyborg changed the title Update since versions Prepare for v6.23 Aug 12, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 12, 2025

Walkthrough

Version 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

Cohort / File(s) Summary
Version metadata bump
classes/helpers/FrmAppHelper.php, formidable.php
Updated plugin version from 6.22.3 to 6.23 (static property and plugin header).
PHP @SInCE tag updates (core)
classes/controllers/FrmFieldsController.php, classes/controllers/FrmFormActionsController.php, classes/helpers/FrmFormsHelper.php, classes/models/FrmMigrate.php, classes/models/fields/FrmFieldGdpr.php, classes/models/fields/FrmFieldType.php, classes/views/frm-fields/back-end/settings.php
Changed @since annotations from x.x to 6.23 in docblocks only; no code, signature, or behavioral changes.
Stripe docblock updates
stripe/models/FrmStrpLiteAuth.php
Replaced several @since docblock values with 6.23; documentation-only.
JS JSDoc updates
js/formidable_admin.js
Updated multiple JSDoc @since annotations to 6.23; no runtime changes.
Translations / POT
languages/formidable.pot
Bumped POT header to 6.23, updated POT creation date, corrected wording (Stop Forum Spam / honeypot), and added importer strings; only translation metadata/content changed.
Tests (Cypress)
tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js, tests/cypress/e2e/Forms/formPageDataValidation.cy.js
Broadened accepted pro-upgrade CTA text (added "Get 60% Off Pro!") and adjusted banner validation error handling (now throws Error on unexpected banner).
Changelog & readme
changelog.txt, readme.txt
Reformatted GDPR HTML-tag list in release notes/readme (angle brackets removed); documentation-only edits.

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch prepare_for_6.23

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (5)
classes/views/frm-fields/back-end/settings.php (1)

381-386: Bug: Undefined variable $ftyp used 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.23

The grep search turned up lingering “6.22.3” entries that need bumping:

• readme.txt:393
• changelog.txt:20

No placeholder @since x.x usages remain.

stripe/models/FrmStrpLiteAuth.php (3)

111-116: Fix strpos check to avoid false negatives at position 0

Using 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

📥 Commits

Reviewing files that changed from the base of the PR and between da8fbbc and 3c58b1e.

⛔ Files ignored due to path filters (1)
  • js/formidable.min.js is 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 good

Matches the release bump; no runtime impact.

classes/helpers/FrmFormsHelper.php (1)

286-296: Docblock @SInCE updated to 6.23 — consistent with release

No functional changes; all good.

stripe/models/FrmStrpLiteAuth.php (4)

546-553: Docblock @SInCE updated to 6.23 — good

Accurately reflects introduction of get_statement_descriptor.


556-565: Filter docblock @SInCE updated to 6.23 — good

Consistent with method docblock and release.


580-587: Docblock @SInCE updated to 6.23 — good

No functional changes; ok.


600-608: Docblock @SInCE updated to 6.23 — good

Matches surrounding changes.

js/formidable_admin.js (6)

1574-1586: Docblock @SInCE updated to 6.23 — looks good

Annotation reflects the release version; no functional change in getInsertNewFieldArgs.


1598-1606: Docblock @SInCE updated to 6.23 — looks good

Accurate metadata for shouldStopInsertingField; behavior unchanged.


1656-1665: Event docblock @SInCE updated to 6.23 — looks good

frm_after_field_added_in_form_builder annotation correctly reflects versioning.


1713-1723: Docblock @SInCE updated to 6.23 — looks good

checkMsgForFieldId documentation version aligned with release.


2113-2123: Event docblock @SInCE updated to 6.23 — looks good

Post 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 good

insertFormField hook doc updated to 6.23; no code changes.

classes/controllers/FrmFormActionsController.php (2)

86-94: Docblock @SInCE updated to 6.23 — looks good

maybe_unset_highrise annotation matches the release version; implementation unchanged.


199-206: Docblock @SInCE updated to 6.23 — looks good

get_crm_actions documentation reflects 6.23; no functional modifications.

languages/formidable.pot (5)

5-5: Version update correctly reflects new release

The 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 appropriately

The 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 importer

Three new translation strings have been added for the FrmFormMigrator functionality:

  1. "Start Import"
  2. Import completion message with form count placeholder
  3. "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 services

The 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 insertions

Multiple 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

Comment thread formidable.php
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 retries

Marketing 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3c58b1e and 8129d7c.

📒 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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 flakes

The 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 matches

If 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 diagnostics

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8129d7c and 72d47d2.

📒 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

Comment thread tests/cypress/e2e/Forms/formPageDataValidation.cy.js
@Crabcyborg Crabcyborg merged commit eb5e404 into master Aug 12, 2025
15 of 18 checks passed
@Crabcyborg Crabcyborg deleted the prepare_for_6.23 branch August 12, 2025 15:14
@coderabbitai coderabbitai Bot mentioned this pull request Aug 13, 2025
This was referenced Oct 10, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Nov 4, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant