Jump to content

there is 1 error


fandrionie

Recommended Posts

sebelumnya pake modul/modifikasi tambah captcha di halaman kontak (ContactController) ?

 

karena pesen eror "image verification error" g ada di builtin PrestaShop.

 

@prestanesia

 

dari awal tidak pakai modul/modifikasi captcha di halaman kontak,

 

kira2 ada modul atau modifikasi yang bisa untuk halaman kontak supaya tidak terjadi error "image verification error" ?

Link to comment
Share on other sites

Ini cuplikasi error message pas submit kontak (g ada pesen image verification error)

if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from))
	$this->errors[] = Tools::displayError('Invalid email address.');
elseif (!$message)
	$this->errors[] = Tools::displayError('The message cannot be blank.');
elseif (!Validate::isCleanHtml($message))
	$this->errors[] = Tools::displayError('Invalid message');
elseif (!($id_contact = (int)Tools::getValue('id_contact')) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id))))
	$this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
elseif (!empty($file_attachment['name']) && $file_attachment['error'] != 0)
	$this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5)), $extension))
	$this->errors[] = Tools::displayError('Bad file extension');

di cek di PS 1.4, 1.5, 1.6 ga ada juga. Jadi kemungkinan pake modul/controller diatas dah dimodif/kustom. Coba cek di controllers\front\ContactController.php atau overrides/controllers\front\ContactController.php

 

ada ga eror msg "Image verification error"

Link to comment
Share on other sites

  • 4 weeks later...

Ini cuplikasi error message pas submit kontak (g ada pesen image verification error)

if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from))
	$this->errors[] = Tools::displayError('Invalid email address.');
elseif (!$message)
	$this->errors[] = Tools::displayError('The message cannot be blank.');
elseif (!Validate::isCleanHtml($message))
	$this->errors[] = Tools::displayError('Invalid message');
elseif (!($id_contact = (int)Tools::getValue('id_contact')) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id))))
	$this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
elseif (!empty($file_attachment['name']) && $file_attachment['error'] != 0)
	$this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
elseif (!empty($file_attachment['name']) && !in_array(Tools::strtolower(substr($file_attachment['name'], -4)), $extension) && !in_array(Tools::strtolower(substr($file_attachment['name'], -5)), $extension))
	$this->errors[] = Tools::displayError('Bad file extension');

di cek di PS 1.4, 1.5, 1.6 ga ada juga. Jadi kemungkinan pake modul/controller diatas dah dimodif/kustom. Coba cek di controllers\front\ContactController.php atau overrides/controllers\front\ContactController.php

 

ada ga eror msg "Image verification error"

 

di overrides/controllers\front\ContactController.php ada 

 

else if (mackstorescustomerreg::recaptcha_en_dis_contact() == 1 && isset($resp) && !$resp->is_valid)

$this->errors[] = Tools::displayError('Image Verification ERROR, Please try again');
 
jadi yang ada di line ini saya delete alhasil sukses mengirim pesan di contact us page
 
terima kasih reply nya prestanesia  :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...