Post by parkookk » Tue Mar 28, 2023 12:02 am

Hi,
I have OC3031 and currently get the following erros:
How can I fix them?

PHP Notice: Undefined index: name in .../catalog/controller/information/contact.php on line 145
PHP Notice: Undefined index: email in .../catalog/controller/information/contact.php on line 149
PHP Notice: Undefined index: enquiry in .../catalog/controller/information/contact.php on line 153

PHP Notice: Undefined index: password in .../catalog/controller/account/login.php on line 174
PHP Notice: Undefined index: email in .../catalog/controller/account/login.php on line 160, 167, 174, 177

PHP Notice: Undefined index: firstname in .../catalog/controller/account/register.php on line 221
PHP Notice: Undefined index: lastname in .../catalog/controller/account/register.php on line 225
PHP Notice: Undefined index: email in .../catalog/controller/account/register.php on line 229, 233
PHP Notice: Undefined index: telephone in .../catalog/controller/account/register.php on line 237
PHP Notice: Undefined index: password in .../catalog/controller/account/register.php on line 263, 267
PHP Notice: Undefined index: confirm in .../catalog/controller/account/register.php on line 267

Regards,
Morty
Last edited by parkookk on Fri Mar 31, 2023 6:53 pm, edited 1 time in total.

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by by mona » Tue Mar 28, 2023 12:27 am

in contact put in the required fields:
name, email, enquiry
before pressing the submit button

in login put in the required fields:
password, email
before pressing the submit button

in register put in the required fields
firstname, lastname, email, telephone, password, confirm
before pressing the submit button

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by parkookk » Tue Mar 28, 2023 5:12 pm

by mona wrote:
Tue Mar 28, 2023 12:27 am
in contact put in the required fields:
name, email, enquiry
before pressing the submit button

in login put in the required fields:
password, email
before pressing the submit button

in register put in the required fields
firstname, lastname, email, telephone, password, confirm
before pressing the submit button
Thanks, customers and bots do whatever they like and it's out of our control. Is there a way to prevent this in the first place by imporving the code?

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Tue Mar 28, 2023 5:17 pm

For now I have changed it as the following codes

in php.ini

find
error_reporting = E_ALL;
replace with
error_reporting = E_ALL & ~E_NOTICE;

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by JNeuhoff » Tue Mar 28, 2023 5:57 pm

As long as you have a proper web theme for the information/contact.twig, these fields should always be submitted anyway, even if some of them are empty, in which case the validation would notice and generate regular error messages in its response, and not as PHP Notice messages!

The only way you can get these strange PHP Notice errors is from spambots. Try our SpamBot Buster to stop them.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by parkookk » Tue Jun 06, 2023 8:10 pm

I now use OC3038 with default theme and 7 small extensions.
On a working website, is it safe to have "error_reporting = E_ALL & ~E_NOTICE" in php.ini?
If no, then how else is safe to see the errors?
Thanks

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by parkookk » Thu Sep 19, 2024 7:16 pm

I think it's fixed now. Recently I realised all of my OC sites have registration issue. The page registers people but doesn't show a new page as if nothing has happend.
So thanks to @mona, I have now found out that years ago I probably needed an edit and found a spam code that doesn't do anything but to create this conflict and I have used it in:
catalog/controller/account/register.php
Then found and removed it:

Code: Select all

if (!isset($this->request->post['firstname']) || !isset($this->request->post['lastname']) || !isset($this->request->post['email']) || !isset($this->request->post['telephone']) || !isset($this->request->post['password']) || !isset($this->request->post['register'])) return false;
And now users can register and get a success message. :drunk:

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 7 guests