Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gw-cache-buster.php: Fixed an issue with Cache Buster and Expired Forms. #1007

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

saifsultanc
Copy link
Contributor

@saifsultanc saifsultanc commented Jan 23, 2025

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2827184964/77017

Summary

When using Cache Buster with a form that has a schedule, if the form is expired, the following PHP warning is being thrown, and the form expiration message does not show:

PHP Warning: Undefined array key "page_number" in ...\plugins\gravityforms\form_display.php on line 727

As Gravity Forms does it here to check for form expiration, we have added the logic on the required spot at Cache Buster. Since, an expired form won't have a page number set.

$form_restriction_error = rgars( GFFormDisplay::$submission, $form_id . '/form_restriction_error' );

Post Update:
Screenshot 2025-01-23 at 9 17 32 AM

@saifsultanc saifsultanc added the bug Something isn't working label Jan 23, 2025
@saifsultanc saifsultanc merged commit 8ebecf6 into master Jan 28, 2025
4 of 5 checks passed
@saifsultanc saifsultanc deleted the saif/fix/77017-fix-cb-expired-form branch January 28, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants