WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Contact Form 7 data null js error, large uploads (14 posts)

  1. bigbritches
    Member
    Posted 1 year ago #

    Have been searching exhaustively for an answer to this. Contact-Form-7:

    • small file uploads (~ <2Mb) work fine, email sent, with attachment
    • larger file uploads cause a JS error (scripts.js, 'cannot read property "into" of null')

    I've:
    - verified that my PHP settings are good to go, in terms of upload_file_size (25Mb), max_post_size (25Mb), memory_limit (50Mb), etc.

    - tried reverting to an older version of CF7, as suggested on other, similar posts - no good.

    - tried adding "define ('WPCF7_LOAD_JS', false);" to wp-config, but a page refresh is a deal breaker

    I'm using SMTP, no conflicts. As I mentioned, small uploads work fine, no errors at all. Large uploads create this javascript error, related to Ajax form success (object 'data' is null). Mail is never sent. I'm at my wits' end - any insight would be welcomed with open arms!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    How have you set up the [file ...] tag? Can you share the URL of the site?

  3. bigbritches
    Member
    Posted 1 year ago #

    Takayuki, thanks for the reply. I have the [your-file] set correctly. I believe the js error is false, and the issue is not with the plugin, but rather with the server/host. The reason I think this is that everything works great on my production site:

    http://hvp.bigbritches.webfactional.com/for-entrepreneurs/

    Even with very large pdf uploads. On the live site, any upload over just 1 or 2Mb fails with that js error. I've created a test page and am spitting out the php config, to verify all of the settings are set correctly:

    http://hatterasvp.com/temp-php-test/

    All of the relevant server variables are set high enough, so I am completely baffled by the error on the live site, vs. no error at all on the production site. I've reverted away from SMTP, back to the default php mail function, in order to mirror what I've got on the production site, but to no avail. I have a ticket out with the host to try and help uncover the problem. It is truly baffling. Everything works fine for small uploads, but fails with large uploads.

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    OK. So, what [file ...] tag do you use in Form textarea exactly?

  5. bigbritches
    Member
    Posted 1 year ago #

    I'm using: [file your-file filetypes:pdf|ppt limit:25000000]

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    OK. Then check the phpinfo output. What value do you see in upload_max_filesize, memory_limit and max_execution_time?

  7. bigbritches
    Member
    Posted 1 year ago #

    I'm spitting out the phpinfo at:

    http://hatterasvp.com/temp-php-test/

    All those values are set high enough. I've gotten my hands on the apache error logs, and they are showing that the upload is working, but the error is in the sendmail:

    postdrop: warning: uid=1128: File too large
    sendmail: fatal: hatterasvp(1128): message file too big

    I'm not using SMTP, but rather just the default php mail(). The hosting support people are telling me I have to use their mail host - is there a way to specify this without activating the WP-Mail-SMTP plugin, or should I activate and configure that? Thanks again.

  8. bigbritches
    Member
    Posted 1 year ago #

    Takayuki, the hosting support is asking me if cf7 (or wordpress in general) offers any sort of verbose logging, to try and uncover more clues on this issue - what are my logging options with cf7? Also, they are asking if there is a way to set cf7 to use PEAR instead of sendmail, as the apache error logs are showing this error:

    postdrop: warning: uid=1128: File too large
    sendmail: fatal: hatterasvp(1128): message file too big

    Side note: I have re-activated the WP-Mail-SMTP plugin, with settings:

    • always use SMTP
    • host: scriptmail.intermedia.net (this is mandatory, their mail host)
    • port: 25
    • SSL encryption

    Apache log is reporting the same error, both with and without SMTP configured. Thanks again for any insight.

  9. bigbritches
    Member
    Posted 1 year ago #

    The hosting support people are basically blaming the plugin for this sendmail failure. They say they've been able to verify that very large files uploaded via the form do upload successfully, and that sendmail is the culprit. They have verified that the message_size_limit in the postfix config is set high enough to allow very large attachments.

    I am using a gmail address as the To and From email - could this have anything to do with it?

  10. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    postdrop: warning: uid=1128: File too large
    sendmail: fatal: hatterasvp(1128): message file too big

    It's clear that you're seeing error messages from postdrop and sendmail. Why are the hosting support people blaming the WordPress contact form plugin, not their mailing environment? I can't understand at all.

  11. bigbritches
    Member
    Posted 1 year ago #

    I misspoke - I don't think they are blaming the plugin...they are just saying it's not their problem. I agree with you - it seems like an issue with their mailing environment. Especially since it's working great on my production site.

    Anyway, I think I may have a solution. Am going to attempt to bypass their mail server by using Gmail smtp:

    I've tried it on the production site, and it works great. My fingers are crossed that it will solve the issue. I do not believe there is an problem with the plugin at all. Thanks for following this thread.

    Note: I still do not know the source of the sendmail error. For anyone finding this with a similar error, everything I've found points to it being a postfix variable issue.

  12. bigbritches
    Member
    Posted 1 year ago #

    Update: Hosting support has gotten all quiet, but they tell me they've fixed the sendmail error - I believe it was indeed the postfix message size limit variable, but they're not admitting it. Regardless, the old bug, where the plugin scripts.js throws a JS error:

    "Uncaught TypeError: Cannot read property 'into' of null"

    has returned. I'm trying to determine what in the configuration is causing this again. Maddening!

  13. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Regardless, the old bug, where the plugin scripts.js throws a JS error:

    "Uncaught TypeError: Cannot read property 'into' of null"

    It is because the JSON returned has incorrect value. It can be caused by conflict with other plugins or theme.

  14. bigbritches
    Member
    Posted 1 year ago #

    No doubt, Takayuki. I've fixed - just had to change the WP-Mail-SMTP config from 'always use SMTP' back to 'use PHP mail()'.

    Problem is resolved, thanks again for following this through.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic