• Resolved cmerrick

    (@cmerrick)


    Hi, I’m using this plugin on a client site. When I set the form so it reload the page on submission, it works fine (except that it reloads at the page top so depending on the page it’s hard to tell what happened). Anyway, if I try to use the ajax option, when I click the submit button it get a little twirly icon for a moment as if it’s doing something, but then nothing happens. I don’t get added to the list, I don’t get a success or error message. Toggling that one “No page refresh” checkbox seems to be the entire difference.

    When I load the page the Chrome Inspector console shows no errors and when I submit the form there’s no Console errors and Network lists admin-ajax.php with a code of 200, type xhr, initiator jquery.min.js, and the waterfall is all green.

    Please advise, thank you for your time.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Constant Contact

    (@constantcontact)

    Hi @cmerrick is this a public site that we can check on and review ourselves for the submission behavior?

    Also, just in case, can you enable the Debugging, which can be done by visiting Settings > Support tab, and and checking the “Enable logging for debugging purposes.” checkbox.

    This will reveal a “Debug Logs” menu item that may have more information about what’s happening here.

    Thread Starter cmerrick

    (@cmerrick)

    Thanks for getting back to me! It’s a client site under development. I would share the page with CC but I don’t want to post it on this public forum.

    I’d already enabled the debugging log. When I try the form with Ajax enabled, it doesn’t log anything at all.

    The only feedback of any kind when trying to submit via Ajax is that the submit button fades and one of those animated “wait while this processes” circle gifs appears in place of the button text, just for a moment. Then it goes back to normal and nothing else happens.

    Plugin Author Constant Contact

    (@constantcontact)

    You can privately share the URL by emailing [email protected] and CC’ing [email protected], we’ll get the information to the right people then.

    Thread Starter cmerrick

    (@cmerrick)

    Thanks, I will do that now!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Confirmed receiving, Checking on now.

    Plugin Author Constant Contact

    (@constantcontact)

    Are you familiar with how to access error logs for the website? I’m checking the response for the AJAX request in my browser tools and am getting back a white screen so I’m wondering if there’s a PHP error occurring that needs resolved for the AJAX calls to work.

    Thread Starter cmerrick

    (@cmerrick)

    I’ve set WP_DEBUG_LOG and WP_DEBUG both to true, but it’s not generating a debug.log file.

    There is an existing file called php_errorlog, but there’s nothing in it from the last several days (last error logged was 11/12/22). I tried deliberately introducing a fatal error into the code just now, reloading, and checking that, but nothing was logged (I then reverted the intention error). So I’m not sure where to go from here.

    Thread Starter cmerrick

    (@cmerrick)

    UPDATE: found the debug.log file (in a different directory than I expected)

    It *did* log the intentional fatal error I introduced. So it is logging errors. That is the only error logged, so neither loading the page with the Subscribe form not submitting the form is logging any errors.

    Plugin Author Constant Contact

    (@constantcontact)

    Just re-submitted my own, and it’s possible that the logging is partially delayed.

    Not sure how active it’s being worked on today, but perhaps setting the dev install to have define( 'WP_DEBUG_DISPLAY', true ); as well may reveal some more that we could check with.

    Thread Starter cmerrick

    (@cmerrick)

    Ok… I changed WP_DEBUG_DISPLAY to true, did a clear cache/hard reload and submitted the form again but I just realized I did one thing different: this time I didn’t change the email address to include a test designator. Normally I’d submit something like:

    myname+test1@gmail.com

    But when I tried it with just [email protected] it worked.

    I tried it with the +test1 again, and nothing happens. So it appears that adding the “+test1” to my address is what’s breaking it. I do this all the time with other forms and it works — using the + is a valid use of gmail — so any idea why it’s breaking the submission?

    Plugin Author Constant Contact

    (@constantcontact)

    Not without more information and any errors going on, and we don’t have the access to try and troubleshoot much further.

    That said, let us try some things out locally with our own setup, in case we can duplicate the behavior. Will get back to you soon.

    Thread Starter cmerrick

    (@cmerrick)

    Spent some time Googling and it appears this is the issue:

    https://community.constantcontact.com/t5/API-Developer-Support/Parsing-email-address-with-plus-sign/td-p/385774

    The email isn’t encoded before being passed as a query string, therefore, no email with a + sign in it will work.

    Thank you for spending the time to help me debug this. I will note for what it’s worth that Mailchimp doesn’t seem to have this issue, so I’m sure there’s a way to make those email addresses work.

    Thanks again!

    Plugin Author Constant Contact

    (@constantcontact)

    Looks like we do need to adjust our code a touch, as we do a bit too much decoding of some fields, and we’re ending up submitting some [email protected] instead of [email protected] and thus why the submission is failing. + characters in emails are completely valid, so we need to bug fix.

    Will aim to get that out soon.

    Thread Starter cmerrick

    (@cmerrick)

    Great, thank you! I look forward to installing that fix when available.

    Plugin Author Constant Contact

    (@constantcontact)

    Welcome.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Ajax submission does not work’ is closed to new replies.