Support » Plugin: Email Before Download » Stopped working

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yeah, that’s odd. I don’t think I’ve seen quite that behavior before…

    If you don’t fill in the form, or only fill in one field on the form, and then hit Submit, it does an AJAX POST and it gets back a JSON response telling the user he needs to fill out the form properly. That is all working as it should.

    However, if you fill in both fields (name & email) then hit Submit, it does an AJAX POST but it never gets a JSON response. After 5 minutes nginx times out and it gives a 504 bad gateway message. I have never seen it not return some sort of JSON response or error or whatever .. in this case it’s like the program never runs or it gets killed off before generating anything.

    If you really haven’t changed anything, then my guess would be that you have the Wordfence firewall turned on and some rule got in there that is blocking the response from coming back (or blocking the AJAX POST from ever getting there in the first place). Or, maybe the database is down or some other system-type problem and the PHP program is getting killed off (and you have error messages set to go to a file or something). I don’t know, I’m just guessing … hard to say without more info. Maybe the Honeypot thing is somehow getting involved and killing it off? Who knows…

    What you should do is turn on WP_DEBUG and make the warnings/errors go to a file. You probably want something like this in your wp-config.php

    
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    

    see https://codex.wordpress.org/Debugging_in_WordPress for more info. Then try again and look in the wp-content/debug.log file and see what’s happening. Note that some hosting providers do weird stuff with debug logs … sometimes they’ll show up in your cpanel or something. If needed, you might need to ask them for assistance on that.

    Also, you might want to check your webserver error log. I think you are running Apache behind an nginx server that is proxying (I think). There might be info in the Apache error log as to what is happening (particularly if the process is getting killed off or something like that).

    If none of that helps, you might try turning off as many plugins as you can (turn off caching, security, etc) and try again, However, since it used to work, that seems a bit unlikely, but it is possible. I see from archive.org that you used to have the mailchimp subscribe checkbox visible and now it’s hidden .. I can’t imagine why that would make any difference, but if you just changed that then maybe change it back temporarily just to see…

    Really, you’re just guessing if you can’t see some errors .. there should be errors somewhere, just need to enable them and send them to a file or find where they currently are (do NOT let the errors display to the screen or it will break EBD in the exact same spot where it’s currently broken).

    @dtynan Thanks for your extensive reply. It turns out it was nothing to do with your plugin after all.

    I was using Easy WP SMTP to send the emails and that was updated a week ago. When I tried their test form it just hung until timeout. So I deactivated and removed it and it’s all working again.

    Thank you for taking the time to reply though. You helped me track it down.

    • This reply was modified 2 years, 11 months ago by mrmocha.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stopped working’ is closed to new replies.