Support » Plugin: Email Before Download » Fatal Error: Uncaught Error

  • I have the Email Before Download plug-in set up on my site to work with Popup Maker. It has been working great for 6+ months now. However, starting yesterday, it’s no longer working due to an Email Before Download error message.

    When I click the button I created on my page to trigger the Popup Maker, the pop-up no longer appears. Looking at the developer elements, I can see a fatal error below…

    <b>Fatal error</b>.
    : Uncaught Error: Call to a member function getElementsByTagName() on null in /home2/lagunal1/public_html/wp-content/plugins/email-before-download/includes/class-email-before-download-form.php:33

    Stack trace:
    #0 /home2/lagunal1/public_html/wp-content/plugins/email-before-download/includes/class-email-before-download-shortcode.php(52): Email_Before_Download_Form->html()
    #1 /home2/lagunal1/public_html/wp-includes/shortcodes.php(319): Email_Before_Download_Shortcode->init_shortcode(Array, ”, ’email-download’)
    #2 [internal function]: do_shortcode_tag(Array)
    #3 /home2/lagunal1/public_html/wp-includes/shortcodes.php(197): preg_replace_callback(‘/\\[(\\[?)(email\\…’, ‘do_shortcode_ta…’, ‘<p>Ente…’)
    #4 /home2/lagunal1/public_html/wp-includes/class-wp-hook.php(288): do_shortcode(‘<p>
    Ente…’)
    #5 /home2/lagunal1/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘<p>
    Ente…’, Array)
    #6 /home2/lagunal1/public_html/wp-content/plugins/popup-maker/includes/class-pum-popup.php(126): in ==$0

    I haven’t made any changes to my plug-ins recently, but I noticed that a couple of days ago, one of my Download files was flipped from Public to Private (I had not even been on that screen in days). Yesterday, I noticed that my settings on the Email Before Download Settings page had been set back to default.

    Could you please help me resolve? Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • I hit this issue also, it only happens when you use the contact_form_id parameter in the shortcode. If you default the shortcode via the Options it should go away.

    To clarify my statement above, the problem is if you’re wrapping your contact form fields in html… If you are using standard contact forms (without wrapping the CF fields in html) it should work. I’ve raised this issue also with the author.

    Thanks for the suggestion. I tried your solution, but it did not solve my problem.

    I ultimately realized that a “test” pop-up I had created for testing purposes only but not used on any pages was causing the error. Once I deleted that particular pop-up, it loaded. Also very strange, since that “test” pop-up has been there over half a year and never caused an issue before.

    This latest Email Before Download version has been very frustrating for me the last week, causing all sorts of random issues without any changes from me.

    Plugin Author mandsconsulting

    (@mandsconsulting)

    Hi @lagunalane,

    I’m sorry to hear it’s been frustrating with the new version. We needed to rewrite it to use the latest WP standards since it was originally written many years ago. We hoped it would be a seamless upgrade, and I think/hope it has been for many people, but we will keep trying to address items for people that upgraded and have issues.

    Are you running 5.0.6 at this time?

    Hi @mandsconsulting,

    I’m running 5.0.4. The plugin apparently upgraded without my choosing to do so. I’m a little hesitant to try upgrading again, since I still have an unresolved issue and spent many hours over the last 2 days fixing all of the problems resulting from the upgrade.

    Just so you’ll know, the issues I encountered were…
    1. My oldest download (and most popular) was changed from publicly published to private. So when people tried to download it, they’d get a “download not found” sentence in their email. I figured this out, and thankfully this was a relatively easy fix.
    2. All of my Email Before Download settings were reset back to default.
    3. The issue I explained above.
    4. My latest and unsolved issue is regarding the automatically-generated email from Contact Form 7 that I receive every time someone downloads a file from my site. I posted about it here: https://wordpress.org/support/topic/your-message-not-populating-in-email-to-myself/.

    I appreciate this plug-in so much. It’s helped me with a primary need on my site and has helped me build up my email list. Please let me know if you have any insight or ideas for my issue #4. Thanks!

    Same proble here. I’ll try the solution to set the form ID on the setting instead of short code

    Hi @mandsconsulting

    I am having the same issue…

    Trying to create a simple download form and I get this when I enter [email-download download_id=”xxx” contact_form_id-“xxx”] into a page.

    ERROR MESSAGE

    Fatal error: Call to a member function getAttribute() on a non-object in /websites/123reg/LinuxPackage22/ga/rd/en/gardenhouselondon.com/public_html/wp-content/plugins/email-before-download/includes/class-email-before-download-form.php on line 39

    Can you help at all? Thanks

    Same as the previous post — Fatal error coming from the plugin php on line 39.

    I’m using the default Contact Form 7 form and a PDF download on Download Monitor — nothing fancy.

    Fatal error: Call to a member function getAttribute() on null in /usr/home/web/users/a0005701/html/wp/wp-content/plugins/email-before-download/includes/class-email-before-download-form.php on line 39

    • This reply was modified 1 year, 3 months ago by  Mike Hickcox.

    Okay, found this one. The Contact Form number in the shortcode is not the 1, 2, or 3 as you add forms. It is the 5-digit id number of the form.

    • This reply was modified 1 year, 3 months ago by  Mike Hickcox.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal Error: Uncaught Error’ is closed to new replies.