• Resolved giacgbj

    (@giacgbj)


    The e-mail is sent, but the form is stuck on the “sending” message.

    The error

    cforms.js?ver=14.14:198 Uncaught TypeError: Cannot read property 'match' of undefined
        at cforms_setsuccessmessage (cforms.js?ver=14.14:198)
        at Object.success (cforms.js?ver=14.14:189)
        at success (jquery.min.js:29)
        at onreadystatechange (jquery.min.js:28)

    is at:

    message.result.match(/success/)

    where

    “message” is not an object, but a string like

    "
    
    {"no":"","result":" success","html":"Messaggio inviato correttamente.","hide":false,"redirection":null}"

    I don’t have the older plugin but just the last one.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bgermann

    (@bgermann)

    I only get errors (with 403 HTTP status) on the POST. It has two leading empty lines, which can be the cause for jQuery not interpreting the response as JSON.
    These can be caused by any plugin.

    Something on your site is causing the inclusion of https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

    This is a very old jQuery version and could be the reason. Currently, WordPress itself comes with 1.12.x. You should find the theme or plugin responsible for the inclusion of this old version and get rid of it or convince the author to release a version without additional jQuery inclusion.

    The last solution would be forcing the cforms_setsuccessmessage caller (jQuery.post) to expect only JSON.

    Thread Starter giacgbj

    (@giacgbj)

    Thanks for pointing it out. I found where it was used and fixed the issue. Now the form works properly.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Form stuck on sending e-mail’ is closed to new replies.