Jump to content

Upgraded to 6.1.14 now contact form won't send


Claudia M

Recommended Posts

I just upgraded to 6.1.14 and now I get this red error when I send the contact form.

The following errors were detected:

  • There was an error sending your message, please try again.

i've tested my email in store settings advanced settings and it did send the test email. I'm using recaptcha 2. PHP mail () function

I get this error in debug

[Warning] /home/claudias/public_html/classes/cubecart.class.php:1435 - sprintf() [function.sprintf.php]: Too few arguments[Notice] /home/claudias/public_html/classes/seo.class.php:506 - Undefined variable: title

All help is appreciated

Link to comment
Share on other sites

This one:

cubecart.class.php:1435 - sprintf() [function.sprintf.php]: Too few arguments

suggests that there is an inconsistency between the number of %s placeholders in:

definitions.xml, group = "contact":

    <string name="email_content" introduced="5.0.0"><![CDATA[%s <%s> wrote to %s:
        ---------------
        %s
        ---------------

This email is sent from the store's master email address but it is possible to reply directly to the sender using the reply button on your email software.]]></string>

(there are four) and the number of values to be put in those placeholders:

1. $_POST['contact']['name'],
2. $_POST['contact']['email'],
3. $department,
4. html_entity_decode(strip_tags($_POST['contact']['enquiry']),ENT_QUOTES)

In admin, Languages, edit the language the store is using, select "Contact" from the drop-down, and scroll to 'email_contact'.

Precisely on the phrase email_content, click once. This makes the text entry field editable. Make sure there are four %s placeholders.

There may be a small clock icon to the right of the text entry field.

Also, the error message I mentioned above (cubecart.class.php:1435), that line actually appears on line 1424 in CC6114 (on line 1422 in CC6113).

Have you made any edits to the stock CC6114 cubecart.class.php file?

And, actually, that just affects what appears in the body of the email, but should not affect the actual sending of the email.

Link to comment
Share on other sites

"In admin, Languages, edit the language the store is using, select "Contact" from the drop-down, and scroll to 'email_contact'.

Precisely on the phrase email_content, click once. This makes the text entry field editable. Make sure there are four %s placeholders.

There may be a small clock icon to the right of the text entry field."

I had added fields to the contact form for international shipping, but had deleted them in the contact form when I upgraded. That caused the inconsistency. I didn't remember about having to change it in admin. Thanks, Brian.  My contact form is working now.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...