WordPress.org

Forums

Forms: 3rd-Party Integration
[resolved] How to show an error message from on_response_error or remore_failure? (3 posts)

  1. GlennPiper
    Member
    Posted 1 year ago #

    Hi!

    I am unable to get this plugin to ever show an error.
    I finally traced out that the "on_response_error" method is being called as I would expect it to, but that it does nothing to actually show the user any form of error message.
    The original plugin seemed to alter some "additional_settings" of Contact Form 7 to try to show a message, but I have not been able to get that to work either.
    Can anyone help me determine how inform the user that an error occurred in a nice way that allows them to update and resubmit their form?

    Thanks!

    http://wordpress.org/plugins/forms-3rdparty-integration/

  2. GlennPiper
    Member
    Posted 1 year ago #

    Ok, I think I found a bug here...

    In the "forms-3rdparty-integration.php" file, I can see in the "on_response_failure" function that it is supposed to call the hook "remote_failure". In my case, since I am using Contact Form 7, this calls the "remote_failure" method in the "contactform7.php" file. Or, at least it should.
    For some reason I do not yet understand, it logs an error when attempting the "apply-filters" call in "on_response_failure", indicating that the function is expecting the first parameter to be passed by reference, but that it was being passed by value. I was only able to get it to run by altering the "remote_failure" function to take it's parameters by value (i.e. remove the & before each parameter).
    Note: this also needed to be done to the "remote_success" method to get it to work.

    FWIW, I am using WP 3.7.1 and PHP 5.4.4

    Hope this helps someone else...

  3. zaus
    Member
    Plugin Author

    Posted 1 year ago #

    Hey thanks for catching that -- it's a PHP 5.4 issue, and I've been working under 5.3.

    The latest version v1.4.6 should have those fixes you mentioned.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Forms: 3rd-Party Integration
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.