• I have set up everything for multiple file downloads:

    CF7 form name: [contact-form-7 id=”2707″ title=”EmailBeforeDownload_DE”]
    CF7 form code:

    <div class="row">
    <div class="col-md-12">[email* your-email]</div>
    <div class="col-md-12"><ebd_left /></div>
    <div class="col-md-12">[recaptcha]</div>
    <div class="col-md-12"><button name="unlock_de" class="btn btn-info" id="unlock_de">Dokument(e) anfordern</button></div>
    </div>

    EBD shortcode: [email-download download_id=’2529,2722′ contact_form_id=’2707′]
    Configuration Options:
    #1 Send Email
    #2 Hide/Mask Real Link – not checked
    #9.1 & #9.2 – filled
    #12 Multiple Checkboxes’ Default State – checked
    #13 Hidden Form – checked
    #14 Hidden Form Div Style – blank

    With this setup the theme breaks (sidebar, pictures, and content until just before the form are not displayed). Leaving out the divs surrounding the <ebd /> tag doesn’t fix it.

    With a single file (e.g. [email-download download_id=’2529′ contact_form_id=’2707′] ) and the same form it works just fine.

    https://wordpress.org/plugins/email-before-download/

Viewing 11 replies - 1 through 11 (of 11 total)
  • I would have to see the page to figure this out.

    Thread Starter Friiitz

    (@friiitz)

    Here is a link to the broken page. The form is inside the “Download” tab.

    I looked at the HTML source for that page and there is no trace of the CF7 form on there at all (no form asking for the user’s email address). I searched for “wpcf7” in the html and only found some CSS definitions. I should have found several lines of HTML with classnames beginning with “wpcf7” … stuff like a form tag and div tags and so on.

    So, it looks like there form is entirely missing from your page. I don’t know why that would be.

    (just as a side point, you might want to make a simpler test page without all the extra junk on there … no tabs, etc. Just your form for testing EBD and then get that working first before you try and get it working in your complicated page setup)

    Thread Starter Friiitz

    (@friiitz)

    It even breaks the backend when saving the post (error 500).

    This is the shortcode I included in the post.

    Here is the link to the post with saved shortcode.

    This is just really strange…

    I assume you meant that it gives a 500 error when SUBMITTING the form, not when saving the post, correct? It doesn’t make any sense that it would give a 500 when saving the post unless you have problems with your site unrelated to the EBD plugin (since the shortcode is not run when you save a post .. it’s just text on the page).

    I suggest you go look at your webserver error log, since it will likely have an error message in it that gives a pretty good clue as to what the problem is that is causing things to fail (and thus return a 500 server error). That is the easiest and fastest way to figure out what’s going on.

    I did check out the test page you provided. WordPress outputs the beginning parts of the page and then it looks like most of the page content never gets delivered and the final message in the HTML is a comment from W3 Total Cache. At least for me, that partial output (even though it comes wth 500 internal server error) is getting cached my browser, which is kind of weird. If I then run the page again I get a 200 success rather than a 500 internal server error because the content comes from my browser cache. Again, that seems weird. What it means for me is that I have to clear my cache & then do the test page again in order to make the 500 appear again. So, you may also have to do that when you want to make the 500 happen again (so you can easily find it at the end of the webserver error log).

    Again, the easiest thing to do is just look in the webserver error log. I would do that first. If needed, you could do other things like turning off W3 Total Cache (just in case). Change EBD to be ‘inline’ so that it is not trying to use 9.1 or 9.2. Don’t make it a hidden form. I’m not suggesting that for a permanent change .. just to help make it simpler to debug by process of elimination. If it were me, I would make 2 posts and use one download_id in one and the other download_id in the other & make sure they both work individually. I know you said that it did work, but I want to make sure you tried both of the download_ids that you are using in the multi checkbox one (that way we know both download ids are correct & both work & deliver the correct file).

    Looking at the html for the form that you put in near the beginning of this item, I don’t see a [submit] … you have a btn there in html, which might be ok, not sure, but I think you should make sure you do it similar to the Screenshots page. Put a [submit] in there. Get rid of the [recaptcha]. Again, this is just to try and narrow down the possible causes.

    Are you using single quotes in your shortcode? I don’t know if that’s supported .. I would guess it’s not. Make sure you are using double quotes, not single.

    Like: download_id=”2529″
    Not like: download_id=’2529′

    oh it looks like you can use single quotes. ok, never mind on that.

    Thread Starter Friiitz

    (@friiitz)

    Thank you for the indepth suggestions. However, nothing solved the problem.

    I assume you meant that it gives a 500 error when SUBMITTING the form, not when saving the post, correct? It doesn’t make any sense that it would give a 500 when saving the post unless you have problems with your site unrelated to the EBD plugin (since the shortcode is not run when you save a post .. it’s just text on the page).

    No, it’s like I said when SAVING the post with the multiple file shortcode in it. See the error log below:

    Warning: DOMDocument::loadXML(): Specification mandate value for attribute required in Entity, line: 12 in …/wp-content/plugins/email-before-download/email-before-download.php on line 243
    Warning: DOMDocument::loadXML(): Opening and ending tag mismatch: input line 12 and div in Entity, line: 12 in …/wp-content/plugins/email-before-download/email-before-download.php on line 243
    Warning: DOMDocument::loadXML(): Opening and ending tag mismatch: div line 11 and form in Entity, line: 15 in …/wp-content/plugins/email-before-download/email-before-download.php on line 243
    Warning: DOMDocument::loadXML(): Opening and ending tag mismatch: form line 3 and div in Entity, line: 15 in …/wp-content/plugins/email-before-download/email-before-download.php on line 243
    Warning: DOMDocument::loadXML(): Premature end of data in tag div line 1 in Entity, line: 15 in …/wp-content/plugins/email-before-download/email-before-download.php on line 243 Notice: Trying to get property of non-object in …/wp-content/plugins/email-before-download/email-before-download.php on line 247
    Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/email-before-download/email-before-download.php on line 247 Fatal error: Call to a member function appendChild() on a non-object in …/wp-content/plugins/email-before-download/email-before-download.php on line 261

    Yes, both single files work – with and without captcha as well as in email and inline mode and with W3 Total Cache enabled and disabled.

    The submit button is there. It is just renamed to “Dokument(e) anfordern”. Removing the captcha did not solve the problem, changing the setup to inline link neither. Deactivating W3 Total Cache (with inline and email option) had no effect either.

    I am using double quotes in all the shortcodes.

    Look in your webserver error log for the 500 error and see if there is any message with it or just before it that indicates what the problem might be.Those error messages that you posted are wordpress error logging messages, rather than from the webserver. Those errors are happening when the plugin runs.

    The plugin does not run when you save a post. The only way that could happen is if the plugin used the save_post hook to do something when you saved a post, which it does not do. Thus, something really funky must be happening for you to get a 500 error when you save a post … unless you are saving & previewing which would cause the plugin to run for the preview. If not that, then you have something really bizarre happening somehow…

    Also, note that the line numbers indicated in the error messages you posted indicate that you still Hidden form turned on. That code could not execute unless the hidden form option was checked in the EBD settings.

    Turn off hidden form and try again. Try to find that message for the 500 error in your webserver error log.

    Thread Starter Friiitz

    (@friiitz)

    I just disabled the “hidden form” and it works now on the product page without breaking anything. Also saving the test post with the multiple download shortcode works now.

    I guess I just go with this solution now. Thank you very much for your help!

    Ok, good, I’m glad at least something works!

    Looking at the hidden code stuff, it looks to me like that maybe could break if there was something weird in the CF7 form you made. If you took out the btn thing I referred to and you put in a [submit] like I suggested and you removed the [recaptcha] then that would eliminate all of those possibilities. Beyond that, I would look for any extra HTML that you added and remove it in case there is a broken or mismatched bit of HTML in there. And, finally, I would make sure there is no German text in there … nothing but plain ASCII normal english characters — nothing with umlauts or accent marks or anything like that.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Form with multiple file downloads breaks theme’ is closed to new replies.