• Resolved arlingtoner

    (@arlingtoner)


    Using WPForms Lite 1.7.1.2, I have an Email Address for Tee Time Request form that uses an Email field to collect an email address. Its Settings>Confirmations>Default Confirmation is Confirmation Type of ‘Go to URL (Redirect)’ and Confirmation Redirect URL of ‘https://tsglma.org/tee-time-request-form/?email_address1={field_id=”1″}’.

    The Tee Time Request form that is on that page contains an Email field with an Advanced>Default Value of ‘{query_var key=”email_address1″}’.

    If I enter a good email address into the Email Address for Tee Time Request form and click on the form’s Submit button, I end up with a blank/white window and the following in my debug.log:

    [01-Jan-2022 22:14:44 UTC] [fatal error]: ‘wpforms_field_smart_tag_value is deprecated since version 1.6.7! Use wpforms_smarttags_process_fieldid_value instead.’ file: /home/dh_bbfafd/tsglma.org/wp-includes/functions.php, line: 5586

    However, if I go back to my WPForms>All Forms and edit my Email Address for Tee Time Request form to delete the question mark and everything to its right in the Confirmation Redirect URL, enter a good email address, and click on the form’s Submit button, I get to https://www.tsglma.org/tee-time-request-form/, which displays its form, but without the default value for its email address, of course.

    I don’t use wpforms_field_smart_tab_value in my code.

    This used to work, although it has been a while since I tested this particular piece of my site, so I can’t say when the problem started. Please figure out how to make it work again.

    Until then, is there a workaround I can implement?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi @arlingtoner,

    Thank you for your patience here! I was not able to replicate the issue on my test site with Lite plugin.

    When you get a chance, could you please follow this tutorial to pre- opopulate email address from one form to another?

    I think the double quotes that you have used are incorrect. Instead, try using the below URL:

    https://tsglma.org/tee-time-request-form/?email_address1={field_id="1"}

    Thanks, and please let me know how it goes?

    • This reply was modified 3 years, 2 months ago by Nik Sebastian.
    Thread Starter arlingtoner

    (@arlingtoner)

    I must be missing something here as the URL in your message seems to be the same as the one in my message, where the only double quotes are around the number one (“1”).

    Thread Starter arlingtoner

    (@arlingtoner)

    > I was not able to replicate the issue on my test site with Lite plugin.

    Did you have “define(‘WP_DEBUG’, true);” in the site’s wp-config.php?

    Thread Starter arlingtoner

    (@arlingtoner)

    I’ve looked at the WPForms Lite 1.7.2 source code and here is what I’ve taken away.

    The root of the problem is that I have WP_DEBUG defined as true in the site’s wp-config.php file. That leads to the following:

    When WPForms wants to get the value of the {field_id=”1″} smart tag in my form’s Confirmation Redirect URL, it eventually gets to get_value() in …src\SmartTags\SmartTag\FieldId.php. There it uses the WordPress apply_filters_deprecated() which uses the _deprecated_hook() in wp-includes\functions.php which cares about the value of WP_DEBUG. Because it is true on my site (I’ve been doing some debugging), I get the mysterious deprecated message on my page and in my debug.log.

    If that was all that happened, it would be unaesthetic and I would complain because there is no good reason for WPForms to be triggering a user-level message that isn’t about a user action but rather about internal WPForms code. (And note the WPForms Lite changelog for 1.6.7.1 where I believe action was taken not to produce a deprecation message.)

    However, something worse happens. get_value’s call to apply_filters_deprecated() seems to do what it is supposed to do, that is, return the email address entered into Field ID #1 of my form, for example, “eric_baatz%40yahoo.com”. And the code somehow continues on to produce the following in my debug.log:

    [06-Jan-2022 21:14:55 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/dh_bbfafd/tsglma.org/wp-includes/functions.php:5586) in /home/dh_bbfafd/tsglma.org/wp-includes/pluggable.php on line 1340
    [06-Jan-2022 21:14:55 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/dh_bbfafd/tsglma.org/wp-includes/functions.php:5586) in /home/dh_bbfafd/tsglma.org/wp-includes/pluggable.php on line 1343

    The end result of whatever that path does is a blank/white page with the three warnings on it and the browser’s URL having not changed, rather than changing to that of the form’s Confirmation Redirect URL. From a user’s perspective, that says my form no longer works, which I claim should not be dependent on the site’s WP_DEBUG value alone.

    The simplest solution here seems to be not to produce the deprecation message.

    Hey @arlingtoner,

    I am checking this issue too and will get back to you with an update!

    Thank you for your patience!

    Hi @arlingtoner,

    Thank you for your patience while I was testing this feature!

    I wanted to confirm that pre-populating form fields from one form to another works perfectly without any error.

    For example: To pass the value from ‘Form A (Source)’ to ‘Form B (Destination)’, you can use query strings to pre-populate the field value from one form to another. For your reference, here is a tutorial that will guide you!

    If you need help finding your specific field ID numbers, take a look at this tutorial.

    Then you’ll need to add field Smart Tags from the first form, which pulls entry data for a field. For example, the URL could look something like this:

    https://mydomain.com/pagename?wpf20_1={field_id="1"}

    Please Note: Make sure the destination form is embedded on a page.

    Hope this helps!

    Thread Starter arlingtoner

    (@arlingtoner)

    It doesn’t. I think that I’m already pretty conversant with how to move data from one page to another after reading the multiple WPForms documentation on the subject. Perhaps that my code has been working for almost a year reinforces that.

    What would help is finding out if you’ve tested with WP_DEBUG set to true on your site. As my rather detailed look at the 1.7.2 code earlier in this thread indicated (do you have a rebuttal for it?), the symptoms I experienced are only when that is done.

    Hi @arlingtoner,

    I turned on the debug.logs and could not replicate the issue. Can you try again to replicate this on a new WordPress install and let me know how it goes?

    Thanks,

    I have the same problem.
    A track for debugging: the problem only occurs in private navigation.
    But in public navigation it works

    Hi @bmstudio,

    Thank you for your patience here!

    We were able to replicate the below deprecated notice:

    PHP Deprecated: wpforms_field_smart_tag_value is deprecated since version 1.6.7! Use wpforms_smarttags_process_fieldid_value instead.

    This notice is just to let you know that if you’re using the filter wpforms_field_smart_tag_value it’ll still work but letting the user know there’s a new filter.

    But the forms are still functioning as they are deprecated notice and not errors.

    If we navigate to this URL:

    https://www.tsglma.org/tee-time-request-form/[email protected]

    it works and shows the form successfully!

    Could you please help us with additional information about the private and public navigation that you are referring to?

    Thanks, and please let me know!

    Hey @bmstudio,

    In case you need more help here, please feel free to post a new thread.

    Thanks, and have a good one!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Processing of {query_var key=”email_address1″} causes fatal error?’ is closed to new replies.