• Hello, I recently upgraded EBD 6.9.7 and DM 4.9.10 and CF7 5.8.7 and subsequently was not receiving the notification email and the email was not logging in EBD. CF7 was successfully sending the notification email to the admin contact. Then, I remembered that I had updated the page with the CF7 shortcode (rather than the EBD shortcode). When I looked at the documentation for the shortcode syntax, it says:

    Add the following short code using the IDs collected in the first two steps [email-download download_id=”X” contact_form_id=”Y”]

    When I use that syntax with the correct download ID and form ID, I encountered a fatal error (see below). I thought perhaps it could have been that the syntax shows double quotes around the “ID”, and yet, when you copy the DM shortcode from the form list, it gives you a different syntax like this with single quotes: [download id=’123′]. Maybe that doesn’t matter?

    Fatal error: Uncaught Error: Call to a member function getAttribute() on null in /path/wp-content/plugins/email-before-download/includes/class-email-before-download-form.php:39 Stack trace: #0 /path/wp-content/plugins/email-before-download/includes/class-email-before-download-shortcode.php(68): Email_Before_Download_Form->html() #1 /path/wp-includes/shortcodes.php(433): Email_Before_Download_Shortcode->init_shortcode(Array, ”, ’email-download’) #2 [internal function]: do_shortcode_tag(Array) #3 /path/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(email\\…’, ‘do_shortcode_ta…’, ‘<p>Founded in 1…’) #4 /path/wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/Helpers/Shortcodes.php(140): do_shortcode(‘<p>Founded in 1…’) #5 /path/wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/ in /path/wp-content/plugins/email-before-download/includes/class-email-before-download-form.php on line 39

    Just a thought, instead of causing a fatal error that kills the page, how might this be handled with the simple non-rendering of the form and displaying a warning to check an error log (i.e., “Your form is experiencing problems, please check the flux capacitor.”) for the plugin or something less disruptive?

    As it turns out, the fatal error was due to the fact that the form ID was missing a character (my fault). I corrected that, and then tested the page, no error! I submitted the form; the notification arrived! The email was logged (wrong timestamp, though)! Lastly, the confirmation email with the link arrived! Whohooo!

    Three things I am asking for help with:

    ONE: The confirmation was marked as SPAM. Any forum/support info on how to address that?

    TWO: The timestamp on the log was not in sync with the time settings on the site. It was 3 hours ahead. Can the timestamp issue be addressed? Are there settings I missed?

    THREE: Suppose one had lots of forms and/or downloads? It might be helpful to have a little tool to build the shortcode in a foolproof way (adhering to syntax) and log that build (for future reference).

    Lastly, and because the following mistake was also confounding, if you have a staging site, and you’re not pushing the whole staging area back over…DOUBLE CHECK YOUR FORM AND DOWNLOAD ID CODES. The form codes may be different!

    Thank you to everyone who contributed to this plugin. I wanted to share my experience so that it may help someone who may facing the same issue. If upon seeing this error/post, someone sees anything else I’m not doing properly or has advice, please share your remarks below. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author mandsconsulting

    (@mandsconsulting)

    Hello,

    Thanks for the information about this issue. We will look into getting it resolved.

    Thanks

    Thread Starter kdcpelt

    (@kdcpelt)

    Sounds good, thank you. BTW, on that last thing I mentioned about the form ID changing on the staging site…is that an issue that would cause a fatal error with a shortcode made or used on the staging site that then got pushed over (WPStaging) to production? I would add that I did not explicitly change the form, the form ID, or otherwise alter the form on the staging site except to change the email recipient field for the notification…I didn’t anticipate that would trigger a change to the ID.

    Plugin Author mandsconsulting

    (@mandsconsulting)

    Hello,

    We investigated and tested up to the latest version of WordPress and PHP and found no issues with the plugin. I am sorry but it appears to be stable. Is your versioning up to date?

    Thanks,

    Thread Starter kdcpelt

    (@kdcpelt)

    Hello, I understand my first post was a lot all at once. I thought perhaps re-posing the questions may provide some clarity:

    ONE: The confirmation was marked as SPAM. Any forum/support info on how to address that?
    That is to say, the notification went through, but the confirmation ended up marked as SPAM. Could you be explicit as to whether or not there are differences in how those two emails are generated and/or if you have recommendations about configuration options in your plugin so that the email might not be marked as SPAM? I understand it may be completely out of your control, but I felt I should ask just in case.

    TWO: The timestamp on the log was not in sync with the time settings on the site. It was 3 hours ahead. Can the timestamp issue be addressed? Are there settings I missed?
    I realize you don’t control what my timezone is set to, but I’m curious if there is anything in EBD that would cause the timestamp of the logged email to be three hours different? I would like the form submission timestamps to be accurate. Any assistance on this would be much appreciated.

    Lastly, I discovered I did not (but meant to) ask this question:

    On my staging site (WPStaging), the CF7 code changed: I had a CF7 form created in the production site with one code number, but in the staging site, the code changed. Were that code the same, it would have worked fine. Maybe that is a question for CF7? However, as this trio of plugins is mean to work in tandem here, I thought you might be able to shed light on why the code would have changed and if there is anything that could be done (in EBD) to account for this situation.

    I hope this additional clarification is helpful. Any suggestions are welcome and I value your time, so if there is anything I can provide to you that will help, please don’t hesitate to ask.

    Plugin Author mandsconsulting

    (@mandsconsulting)

    Hello,

    Could you provide us a link to a page with CF7 and Download Manager working? If you could also provide a page where you use the EBD shortcode as well, along with the syntax of the shortcode you are using?

    We don’t use custom functionality to generate email. Emails are sent by using the WP function which uses standard PHP. So we assume that you have a problem with the email SMTP environment of your site.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Avoid Fatal Error, less fragile Shortcode Syntax, and correct timestamps?’ is closed to new replies.