AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: G. O. on April 07, 2025, 06:30:08 AM

Title: Contact Us Form on v.1.4.1
Post by: G. O. on April 07, 2025, 06:30:08 AM
Hello,

when i tried the contact us form i got next error as on screenshot. i use last V.1.4.1 with php 7.3

also i noticed that to required fields in the form settings are off but on the interface they are appearing active and required.

here is the link to the form: https://abcotex. com/index.php?rt=content/contact


here is the error log:


2025-04-07 13:22:54 - Unknown Error: AbanteCart core v.1.4.1 Symfony\Component\Mime\Address::__construct(): Argument #2 ($name) must be of type string, null given, called in /home/u0768522/abcotex.com/core/lib/mail.php on line 142
Trace:
#0 /home/u0768522/abcotex.com/core/lib/mail.php(142): Symfony\Component\Mime\Address->__construct()
#1 /home/u0768522/abcotex.com/storefront/controller/pages/content/contact.php(136): AMail->setSender()
#2 /home/u0768522/abcotex.com/core/engine/dispatcher.php(306): ControllerPagesContentContact->main()
#3 /home/u0768522/abcotex.com/core/engine/dispatcher.php(341): ADispatcher->dispatch()
#4 /home/u0768522/abcotex.com/core/engine/page.php(108): ADispatcher->dispatch()
#5 /home/u0768522/abcotex.com/core/engine/router.php(204): APage->build()
#6 /home/u0768522/abcotex.com/core/engine/router.php(86): ARouter->route()
#7 /home/u0768522/abcotex.com/index.php(101): ARouter->processRoute()
#8 {main} in /home/u0768522/abcotex.com/vendor/symfony/mime/Address.php on line 42
2025-04-07 13:23:22 - Unknown Error: AbanteCart core v.1.4.1 Symfony\Component\Mime\Address::__construct(): Argument #2 ($name) must be of type string, null given, called in /home/u0768522/abcotex.com/core/lib/mail.php on line 142
Trace:
#0 /home/u0768522/abcotex.com/core/lib/mail.php(142): Symfony\Component\Mime\Address->__construct()
#1 /home/u0768522/abcotex.com/storefront/controller/pages/content/contact.php(136): AMail->setSender()
#2 /home/u0768522/abcotex.com/core/engine/dispatcher.php(306): ControllerPagesContentContact->main()
#3 /home/u0768522/abcotex.com/core/engine/dispatcher.php(341): ADispatcher->dispatch()
#4 /home/u0768522/abcotex.com/core/engine/page.php(108): ADispatcher->dispatch()
#5 /home/u0768522/abcotex.com/core/engine/router.php(204): APage->build()
#6 /home/u0768522/abcotex.com/core/engine/router.php(86): ARouter->route()
#7 /home/u0768522/abcotex.com/index.php(101): ARouter->processRoute()
#8 {main} in /home/u0768522/abcotex.com/vendor/symfony/mime/Address.php on line 42





how to fix these errors please?

Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 07, 2025, 07:10:34 AM
how to fix these errors please?

do you see such message in the form manager edit form page?
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 07, 2025, 07:17:04 AM
how to fix these errors please?

do you see such message in the form manager edit form page?

no
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 07, 2025, 07:45:13 AM
how to fix these errors please?

do you see such message in the form manager edit form page?

no

To solve set first_name field as mandatory via admin->design->form manager->edit ContactUs form
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 07, 2025, 10:18:37 AM
how to fix these errors please?

do you see such message in the form manager edit form page?

no

To solve set first_name field as mandatory via admin->design->form manager->edit ContactUs form


i did that too, i tired many options and also doesn't work yet. what could be done else?
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 07, 2025, 05:20:16 PM
try to disable all 3d-party extensions and retry
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 08, 2025, 03:40:11 AM
try to disable all 3d-party extensions and retry

if you talk about google reCAPTCHA already tried that too. on website now there is the default CAPTCHA and i tried next options

1. when using:
 Processing Controller: Contact Us Page(*)

Success page: content/contact

on website form page not showing me a notification that to form been submitted successfully and on Admin side i get this notification message:

New Inquiry From m****** (info@test.com)
Message status:
notice
Date:
08.04.2025 10:12:09 AM
Number of repetitions:
0
Enquiry: First Name: m****** Last Name: h****** Gender: Mr: Email: info@test.com Departments: Sales Country: T***** Telephone | Cellphone: 0123456789 Inquiry: Note: bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla, Rate Us: 100 % reCAPTCHA: b60001 IP Address: 9*.1*.1**.1**

in the error log i get these errors:
2025-04-08 10:09:07 - App Error: AbanteCart core v.1.4.1 NOT EXIST Form with name ContactUsFrm
Trace:
#0 abcotex.com/core/engine/form.php on line 171
#1 abcotex.com/core/engine/form.php on line 125
#2 abcotex.com/storefront/controller/pages/content/contact.php on line 39
#3 abcotex.com/core/engine/dispatcher.php on line 306
#4 abcotex.com/core/engine/dispatcher.php on line 341


2. when using:
Processing Controller: Default Email(*)

Success page: forms_manager/default_email
on website form page showing me a notification that Form was submitted successfully! but on email inbox nothing and on admin panel page also nothing.


Not:  i tried also to make the field of Success page: empty in both options and gave it a try but nothing too.

finally, i should say that the contact us form in my website not working since v.1.3.2 on AbanteCart, there must be some missing codes which effecting on the form structure and on Google reCAPTCHA and that's made this conflict in the form process.


  DO YOU HAVE ANY SUGGESTION IN THIS CASE?
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 08, 2025, 03:55:36 AM

Success page: content/contact


why such route?
Should be content/contact/success
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 08, 2025, 05:15:49 AM

Success page: content/contact


why such route?
Should be content/contact/success

even your suggestion tried and the result as you see in the screenshot but there is nothing arrived, not to email and not to admin dashboard.   I think the best option is resetting the Form codes to default and replace them. so tell me what to replace? maybe will solve my problem. 
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 08, 2025, 05:38:51 AM
what about email template with id 'storefront_contact_us_mail' ?
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 08, 2025, 07:04:07 AM
what about email template with id 'storefront_contact_us_mail' ?

HERE IS THE HTML BODY CODE:
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>{{ title }}</title>
</head>
<body>
<table style="font-family: Verdana,sans-serif; font-size: 11px; color: #374953; width: 600px;">
   <tr>
      <td class="align_left">
         <a href="{{ store_url }}" title="{{ store_name }}">
            {{# logo_uri }}
               <img src="{{ logo_uri }}" alt="{{ store_name }}" style="border: none;">
            {{/ logo_uri }}
            {{# logo_html }}
               {{ logo_html }}
            {{/ logo_html }}            
         </a>
      </td>
   </tr>
   <tr>
      <td>&nbsp;</td>
   </tr>
   <tr>
<td>&nbsp;</td>
   </tr>
   <tr>
      <td class="align_left"
          style="background-color: #069; color:#FFF; font-size: 12px; font-weight: bold; padding: 0.5em 1em;">{{ entry_enquiry }}</td>
   </tr>
   <tr>
      <td class="align_left"
          style=" font-size: 12px; padding: 0.5em 1em;">{{{ enquiry }}}</td>
   </tr>
   <tr>
      <td>&nbsp;</td>
   </tr>
   <tr>
      <td>
         <table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #FFFFFF;">
            {{# tpl_form_fields }}
            <tr>
            <td style="padding: 0.3em; background-color: #EEEEEE; color: #000;">{{ name }}</td>
               <td style="padding: 0.3em; background-color: #EEEEEE; color: #000;">{{ value }}</td>
            </tr>
            {{/ tpl_form_fields }}
         </table>
      </td>
   </tr>
   <tr>
      <td>&nbsp;</td>
   </tr>
   <tr>
      <td class="align_center"
          style="font-size: 10px; border-top: 1px solid #069; text-decoration: none; color: #374953;">
         <a href="{{ store_url }}"
            style="color: #069; font-weight: bold; text-decoration: none;">{{ store_name }}</a><br>
      </td>
   </tr>
</table>
</body>
</html>


AND HERE IS THE BODY TEXT:

{{ store_name }}

{{ entry_enquiry }}
{{{ enquiry }}}


{{# tpl_form_fields }}
{{ name }}  {{ value }}
{{/ tpl_form_fields }}
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 09, 2025, 07:11:55 AM
Can you provide access to your admin side via private message?
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 10, 2025, 05:41:02 AM
Can you provide access to your admin side via private message?

check you inbox plz
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 10, 2025, 10:38:43 AM
Can you provide access to your admin side via private message?

check you inbox plz

try to replace your files with this
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/storefront/controller/pages/content/contact.php
and
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/core/engine/form.php

and let us know
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 12:33:44 AM
Can you provide access to your admin side via private message?

check you inbox plz

try to replace your files with this
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/storefront/controller/pages/content/contact.php
and
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/core/engine/form.php

and let us know


i replaced those files and after testing the contact us form i got these error log: and when submitting the form i got next screen as you can see in my screenshot

ERROR LOG:
2025-04-11 6:59:47 - Unknown Error: AbanteCart core v.1.4.1 Call to undefined method ALanguage::getAndReplace()
Trace:
#0 /home/core/engine/dispatcher.php(306): ControllerPagesContentContact->main()
#1 /home/core/engine/dispatcher.php(341): ADispatcher->dispatch()
#2 /home/core/engine/page.php(108): ADispatcher->dispatch()
#3 /home/core/engine/router.php(204): APage->build()
#4 /home/core/engine/router.php(86): ARouter->route()
#5 /home/index.php(101): ARouter->processRoute()
#6 {main} in /home/storefront/controller/pages/content/contact.php on line 50
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 11, 2025, 03:46:41 AM
Can you provide access to your admin side via private message?

check you inbox plz

try to replace your files with this
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/storefront/controller/pages/content/contact.php
and
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/core/engine/form.php

and let us know


i replaced those files and after testing the contact us form i got these error log: and when submitting the form i got next screen as you can see in my screenshot

ERROR LOG:
2025-04-11 6:59:47 - Unknown Error: AbanteCart core v.1.4.1 Call to undefined method ALanguage::getAndReplace()
Trace:
#0 /home/core/engine/dispatcher.php(306): ControllerPagesContentContact->main()
#1 /home/core/engine/dispatcher.php(341): ADispatcher->dispatch()
#2 /home/core/engine/page.php(108): ADispatcher->dispatch()
#3 /home/core/engine/router.php(204): APage->build()
#4 /home/core/engine/router.php(86): ARouter->route()
#5 /home/index.php(101): ARouter->processRoute()
#6 {main} in /home/storefront/controller/pages/content/contact.php on line 50

oh, sorry, forgot this file
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/core/engine/language.php#L184
Please replace too
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 04:12:25 AM
Can you provide access to your admin side via private message?

check you inbox plz

try to replace your files with this
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/storefront/controller/pages/content/contact.php
and
https://github.com/abantecart/abantecart-src/blob/2724b43aa1c9cb122734acdfe9b7173542f528a7/public_html/core/engine/form.php

and let us know


i replaced those files and after testing the contact us form i got these error log: and when submitting the form i got next screen as you can see in my screenshot

ERROR LOG:
2025-04-11 6:59:47 - Unknown Error: AbanteCart core v.1.4.1 Call to undefined method ALanguage::getAndReplace()
Trace:
#0 /home/core/engine/dispatcher.php(306): ControllerPagesContentContact->main()
#1 /home/core/engine/dispatcher.php(341): ADispatcher->dispatch()
#2 /home/core/engine/page.php(108): ADispatcher->dispatch()
#3 /home/core/engine/router.php(204): APage->build()
#4 /home/core/engine/router.php(86): ARouter->route()
#5 /home/index.php(101): ARouter->processRoute()
#6 {main} in /home/storefront/controller/pages/content/contact.php on line 50

oh, sorry, forgot this file
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/core/engine/language.php#L184
Please replace too



i replaced the required file and tested again the form and just on screen got a notification that the (Your inquiry has been successfully sent to the store owner!) but nothing arrived no on admin no on email and no error logs at all.
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 11, 2025, 05:23:45 AM
Looks like trouble in gmail that you use as mailer.
Can you try to set your sender email (abcotex.llc@***.com) as store email (instead info@***.com) ?
Looks like google don't like when sender email address not equal real sender account
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 07:55:01 AM
Looks like trouble in gmail that you use as mailer.
Can you try to set your sender email (abcotex.llc@***.com) as store email (instead info@***.com) ?
Looks like google don't like when sender email address not equal real sender account


after replacing the files codes you advised i found that the form is working but all emails forms appearing only in the sender (sent box) only and not appearing in the inbox or admin messages notifications as also it is printing all form's fields even the CAPTCHA code too, as also the required and not required fields. 
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 09:59:44 AM
i just discovered that there is an option should be activated for getting notification on admin dashboard for the contact us form enquiry details.  still i need to know how to push the form enquiry to arrive to email inbox and without the unnecessary fields as well as the CAPTCHA and Google reCAPTCHA codes.
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 11, 2025, 10:13:00 AM
Looks like trouble in gmail that you use as mailer.
Can you try to set your sender email (abcotex.llc@***.com) as store email (instead info@***.com) ?
Looks like google don't like when sender email address not equal real sender account


after replacing the files codes you advised i found that the form is working but all emails forms appearing only in the sender (sent box) only and not appearing in the inbox or admin messages notifications as also it is printing all form's fields the required and not required fields.

1. Try to create and send new email from you to yourself (email loop) via email page (gmail etc) and let us know if you got this email in the inbox.

2. Regarding uploaded files. There are two limitations, first in on php.ini side. see post_max_size (https://www.php.net/manual/en/ini.core.php#ini.post-max-size), upload_max_size (https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize).
So if you plan to receive files via contactUs form you should to test with some small images and then increase values of php-directives.
Second limitation related to mailer. Usually mail server do not send emails greater than 7Mb.

Regarding other data.
I'll test this part of code a bit later and let you know
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 10:30:53 AM
Looks like trouble in gmail that you use as mailer.
Can you try to set your sender email (abcotex.llc@***.com) as store email (instead info@***.com) ?
Looks like google don't like when sender email address not equal real sender account


after replacing the files codes you advised i found that the form is working but all emails forms appearing only in the sender (sent box) only and not appearing in the inbox or admin messages notifications as also it is printing all form's fields the required and not required fields.

1. Try to create and send new email from you to yourself (email loop) via email page (gmail etc) and let us know if you got this email in the inbox.

2. Regarding uploaded files. There are two limitations, first in on php.ini side. see post_max_size (https://www.php.net/manual/en/ini.core.php#ini.post-max-size), upload_max_size (https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize).
So if you plan to receive files via contactUs form you should to test with some small images and then increase values of php-directives.
Second limitation related to mailer. Usually mail server do not send emails greater than 7Mb.

Regarding other data.
I'll test this part of code a bit later and let you know

yes, i can confirm that i got the email in my inbox as you can see in my attachment
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 11, 2025, 11:42:56 AM
yes, i can confirm that i got the email in my inbox as you can see in my attachment

check spam on mailbox side.
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 11, 2025, 12:09:27 PM
i just discovered that there is an option should be activated for getting notification on admin dashboard for the contact us form enquiry details.  still i need to know how to push the form enquiry to arrive to email inbox and without the unnecessary fields as well as the CAPTCHA and Google reCAPTCHA codes.

Fix with captcha here
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/core/engine/form.php
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/storefront/controller/pages/content/contact.php
Just replace files.
Regarding uploaded files. You should find them in admin->system->data->file uploads.

Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 11, 2025, 02:17:41 PM
i just discovered that there is an option should be activated for getting notification on admin dashboard for the contact us form enquiry details.  still i need to know how to push the form enquiry to arrive to email inbox and without the unnecessary fields as well as the CAPTCHA and Google reCAPTCHA codes.

Fix with captcha here
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/core/engine/form.php
https://github.com/abantecart/abantecart-src/blob/1.4.2/public_html/storefront/controller/pages/content/contact.php
Just replace files.
Regarding uploaded files. You should find them in admin->system->data->file uploads.


according to your recommendation i did replaced the files with the new ones and the results as you see in the screenshot but i should say that the contact us form fulfilled as usual but in the result only showing the enquiry message without name surname, gender, etc...

spam is empty

still emails appearing in sent box as before.
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 12, 2025, 09:35:22 AM
Your contactUs form works as expected.
I created new customer, changed store email to mine
and i got this email to another mailbox address.
See screenshot

Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 12, 2025, 10:24:17 AM
Your contactUs form works as expected.
I created new customer, changed store email to mine
and i got this email to another mailbox address.
See screenshot

according to your answer I placed the store email as (abcotex.llc@***.com). ContactUsFrm emails now arriving to inbox of Gmail mentioned in the website store email but I don't know how you got that screenshot result but i just tested the form again and as i said in the previous answer that only (Enquiry) appearing in the email and admin side notification message.  can you try to submit the contact us form now and give it a try please?
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 12, 2025, 02:35:18 PM
Your contactUs form works as expected.
I created new customer, changed store email to mine
and i got this email to another mailbox address.
See screenshot

 i see that you tried the form and here in the screenshot pics the results i got.
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 12, 2025, 06:06:50 PM
the final solution i did followed as next:

I placed my Gmail email in the extension of forms then store email and activated the Google reCAPTCHA v3 and in the form settings i did as you can see in the screenshot pics and form working fine and emails arriving to my Gmail inbox with all details in the form but the only problems i have now is on admin dashboard there is no notification message telling me there is an enquiry and in the arrival email to my inbox the sender of form's name doesn't appearing in the details, also the sender of orders receiving an email not as a sender of orders but as a web store owner which says You have received an order. I think we are very near to solve these small issues.   
Title: Re: Contact Us Form on v.1.4.1
Post by: abolabo on April 13, 2025, 08:35:56 AM
try to remove all messages. i guess nofitication depends on repeating
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 13, 2025, 10:59:23 AM
try to remove all messages. i guess nofitication depends on repeating

actually i do this step every time i try something new so that's also passed.
Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 17, 2025, 03:28:44 AM
any updates related to this issue planned maybe for next version ?
Title: Re: Contact Us Form on v.1.4.1
Post by: llegrand on April 17, 2025, 10:29:40 AM
Hello,  a couple of things that may help solve your ongoing issues.

First in your original post you indicated PHP 7.3,  I assumed that was a typo as cart v 1.4.1  only works on 8.2 or 8.3
You can check the PHP recommendations here.

https://abantecart.atlassian.net/wiki/spaces/AD/pages/3768390/AbanteCart+System+Requirements (https://abantecart.atlassian.net/wiki/spaces/AD/pages/3768390/AbanteCart+System+Requirements)

Next,  Gmail and Yahoo both started REQUIRING DMARC be enabled for your site.   Here is the Google article
https://support.google.com/a/answer/2466580?hl=en (https://support.google.com/a/answer/2466580?hl=en)

Title: Re: Contact Us Form on v.1.4.1
Post by: G. O. on April 19, 2025, 06:09:32 AM
Hello,  a couple of things that may help solve your ongoing issues.

First in your original post you indicated PHP 7.3,  I assumed that was a typo as cart v 1.4.1  only works on 8.2 or 8.3
You can check the PHP recommendations here.

https://abantecart.atlassian.net/wiki/spaces/AD/pages/3768390/AbanteCart+System+Requirements (https://abantecart.atlassian.net/wiki/spaces/AD/pages/3768390/AbanteCart+System+Requirements)

Next,  Gmail and Yahoo both started REQUIRING DMARC be enabled for your site.   Here is the Google article
https://support.google.com/a/answer/2466580?hl=en (https://support.google.com/a/answer/2466580?hl=en)

sorry, i use 8.3 but a mistake been when clicking on numbers.