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

Contact Form: avoid conflicts when using the old version of the Contact Form feature #33464

Closed
Tracked by #32401
jeherve opened this issue Oct 4, 2023 · 3 comments
Closed
Tracked by #32401
Assignees
Labels
[Block] Contact Form Form block (also see Contact Form label) [Closed] Won't Fix wontfix. This issue will not be addressed. [Feature] Contact Form [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended

Comments

@jeherve
Copy link
Member

jeherve commented Oct 4, 2023

This is a follow-up to #33050.

Right now, the contact form feature is loaded from the Contact Form package by default:

/**
* Whether to load the newer Jetpack Forms package.
*
* @use add_filter( 'jetpack_contact_form_use_package', '__return_true' );
* @module contact-form
*
* @since 11.8
*
* @param bool $load_contact_form_package Load Jetpack Forms package. Default to false.
*/
if ( apply_filters( 'jetpack_contact_form_use_package', true ) ) {
Jetpack_Forms::load_contact_form();
return true; // Not returning true will cause the module to become deactivated.
}

Some site owners may decide to continue to load the contact form feature from the old codebase instead:

add_filter( 'jetpack_contact_form_use_package', '__return_false' );

When you do so, you run into issues with how the blocks are registered, as discussed in p1696362451002639-slack-CDD9LQRSN

Related Epic: #32401


Related Epic: the old form code will eventually be removed in #30551

@chrisbliss18
Copy link
Contributor

Could we ask the reporter of this issue why they are using the old version? Maybe we can help them fix their specific issue so that it is no longer a conflict.

It would be nice to trigger a _doing_it_wrong() warning to indicate that this is deprecated functionality and will be removed in a future version.

@jeherve
Copy link
Member Author

jeherve commented Oct 18, 2023

Could we ask the reporter of this issue why they are using the old version? Maybe we can help them fix their specific issue so that it is no longer a conflict.

Discussion is happening here:
p1697469538876579/1696362451.002639-slack-CDD9LQRSN

It seems it may not be an issue anymore. 👍

It would be nice to trigger a _doing_it_wrong() warning to indicate that this is deprecated functionality and will be removed in a future version.

The work behind the deprecation is currently tracked in #30551.

@jeherve jeherve self-assigned this Oct 18, 2023
@jeherve
Copy link
Member Author

jeherve commented Oct 18, 2023

It seems it may not be an issue anymore. 👍

Given where we stand, I'll close this issue as "won't fix", and we can focus on proper deprecation instead.

@jeherve jeherve closed this as completed Oct 18, 2023
@jeherve jeherve added the [Closed] Won't Fix wontfix. This issue will not be addressed. label Oct 18, 2023
@cuemarie cuemarie moved this from Needs Triage to Done 🎉 in Automattic Prioritization: The One Board ™ Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Contact Form Form block (also see Contact Form label) [Closed] Won't Fix wontfix. This issue will not be addressed. [Feature] Contact Form [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended
Development

No branches or pull requests

3 participants