Repository navigation
End the row after a field that leaves a gap at the end of its row - #1973
Merged
Merged
Conversation
Helper_Field_Container_Gf25 looked the form up with $field->form_id, but Gravity Forms fields use formId, so the form was never found. A field that leaves a gap at the end of its row (a spacer) never ended the row, and the next field moved up into the gap. This also left the get_row_spacer() call #1966 guards unreachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks
Contributor
|
Coverage report for commit: 91a3557 Summary - Lines: 93.30% | Methods: 88.89% | Branches: 82.27%
🤖 Jest coverage report |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Integration tests can't call GFAPI::add_form() directly; CI's fixture check rejects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Coverage report for commit: 91a3557 Summary - Lines: 88.35% | Methods: 95.14%
🤖 PHPUnit coverage report |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
Since 6.12.4,
Helper_Field_Container_Gf25looked the form up with$field->form_id, but Gravity Forms fields store it asformId, so the lookup always failed. When a field left a gap at the end of its row (a spacer in the form editor), the row was never ended, and in the PDF the next field moved up into the gap. It also meant theget_row_spacer()call that #1966 guards was never reached.The form is now looked up with
$field->formId.Try it
Test plan
yarn test:php -- --filter test_spacer_ends_the_rowMore info
hot-patch-6.18.0, where the new test fails without the change and passes with it.get_row_spacer()call on line 79 with or without this change, because the localvendor/has Gravity Forms 3.1.3.2 whilecomposer.lockpins 3.2.0, whose signature takes aGF_Field. CI uses the lock file.🤖 Generated with AI