Post by Aladdin » Wed Apr 25, 2012 5:21 pm

Hello,
I am using version 1.5.2.1 with default template, and I keep getting these errors every time I change to different language from account/register page:

PHP Notice: Undefined index: firstname in catalog/controller/account/register.php on line 282
PHP Notice: Undefined index: lastname in catalog/controller/account/register.php on line 286
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 290
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 290
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 294
PHP Notice: Undefined index: telephone in catalog/controller/account/register.php on line 298
PHP Notice: Undefined index: address_1 in catalog/controller/account/register.php on line 302
PHP Notice: Undefined index: city in catalog/controller/account/register.php on line 306
PHP Notice: Undefined index: country_id in catalog/controller/account/register.php on line 312
PHP Notice: Undefined index: postcode in catalog/controller/account/register.php on line 314
PHP Notice: Undefined index: country_id in catalog/controller/account/register.php on line 318
PHP Notice: Undefined index: zone_id in catalog/controller/account/register.php on line 322
PHP Notice: Undefined index: password in catalog/controller/account/register.php on line 326
PHP Notice: Undefined index: confirm in catalog/controller/account/register.php on line 330
PHP Notice: Undefined index: password in catalog/controller/account/register.php on line 330


Please note that you dont see these errors if you visit the page first time from the default language, they are only shown up when you change to other language from account/register page (create account page).

Any idea?

Regards
Aladdin

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by Avvici » Wed Apr 25, 2012 5:51 pm

You are getting errors from the following function :

Code: Select all

private function validate() {
    	if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen($this->request->post['firstname']) > 32)) {
      		$this->error['firstname'] = $this->language->get('error_firstname');
    	}
Your custom template either does not have the correct variable name in the .tpl, OR, the language file is missing some variables. You should check both.

Template: catalog/view/theme/your_theme/template/account/register.tpl
Make sure you see

Code: Select all

<input type="text" name="firstname" value="<?php echo $firstname; ?>" />
And in your language file:
catalog/language/your_language/account/register.php
Make sure you see:

Code: Select all

$_['error_firstname']      = 'First Name must be between 1 and 32 characters!';
Use this test for all of your errors:)

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Aladdin » Wed Apr 25, 2012 9:13 pm

Thanks for your reply, however both files (tpl and languages files) definitely include all variables with their correct values . I've just double checked them.

The errors are also shown in affiliate/register page (same thing, when you change the language on this page)
It must be something else ?

Regards
Aladdin

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by cs378 » Fri May 11, 2012 4:01 am

I have the same error shown.

I can't seem to figure out where the problem is occurring.

If anyone figures it out, please post the solution here.

Thank you

Newbie

Posts

Joined
Fri Apr 29, 2011 6:18 am

Post by straightlight » Sat May 12, 2012 9:58 am

Try this.

Attachments

Last edited by straightlight on Sat May 12, 2012 11:49 am, edited 1 time in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Aladdin » Sat May 12, 2012 10:39 am

Thanks Straightlight, but the problem still there.
Please note that errors shows up only when you change language in any form page (such as account/register page):
Again, the errors are:
PHP Notice: Undefined index: firstname in catalog/controller/account/register.php on line 282
PHP Notice: Undefined index: lastname in catalog/controller/account/register.php on line 286
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 290
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 290
PHP Notice: Undefined index: email in catalog/controller/account/register.php on line 294
PHP Notice: Undefined index: telephone in catalog/controller/account/register.php on line 298
PHP Notice: Undefined index: address_1 in catalog/controller/account/register.php on line 302
PHP Notice: Undefined index: city in catalog/controller/account/register.php on line 306
PHP Notice: Undefined index: country_id in catalog/controller/account/register.php on line 312
PHP Notice: Undefined index: postcode in catalog/controller/account/register.php on line 314
PHP Notice: Undefined index: country_id in catalog/controller/account/register.php on line 318
PHP Notice: Undefined index: zone_id in catalog/controller/account/register.php on line 322
PHP Notice: Undefined index: password in catalog/controller/account/register.php on line 326
PHP Notice: Undefined index: confirm in catalog/controller/account/register.php on line 330
PHP Notice: Undefined index: password in catalog/controller/account/register.php on line 330

Regards
A.T

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by straightlight » Sat May 12, 2012 11:01 am

If you switch from English to any other languages you have and switch back to English, do you still see these error messages ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Aladdin » Sat May 12, 2012 11:05 am

Yes, I do, every single click you change language back and forward , the errors show up in error log file.
Regards
A.t

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by straightlight » Sat May 12, 2012 11:11 am

From your database, in the address table, do you see the firstname, lastname fields as well as the email field from the customers table ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Aladdin » Sat May 12, 2012 11:19 am

Yes, I do, if not i wont be able to store form data into DB . Nothing wrong with data storage,
Regards
Aladdin

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by straightlight » Sat May 12, 2012 11:24 am

Then this issue is obviously about posted variables from the form not being sessionized which these values during the previous event may be lost when switching languages. For instance, if you remain on the first language without switching, I presume you don't encounter any problems but only when you switch to another language, this problem occurs.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Aladdin » Sat May 12, 2012 11:32 am

True , any solution for this?
Regards

New member

Posts

Joined
Tue Apr 24, 2012 5:03 pm

Post by Avvici » Sat May 12, 2012 11:43 am

I installed a fresh 1.5.2.1 to try and replicate your error....no success. Works fine for me with 2-3 different languages changing on registration page. Did you upgrade to 1.5.2.1?

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by straightlight » Sat May 12, 2012 11:50 am

During while, I have updated my XML file above.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Daniel » Sat May 12, 2012 9:10 pm

this is a spam bot going around trying to post spam to forms. just ignore it.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by big2142 » Tue May 15, 2012 7:09 pm

same error to me in account/register

Newbie

Posts

Joined
Fri May 04, 2012 3:56 pm

Post by straightlight » Tue May 15, 2012 8:31 pm

Have you tried the XML file ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by big2142 » Tue May 15, 2012 8:36 pm

straightlight wrote:Have you tried the XML file ?
yes, the error desapeared, but the account was not created.

Newbie

Posts

Joined
Fri May 04, 2012 3:56 pm

Post by big2142 » Tue May 15, 2012 8:40 pm

More data, when you create the account from the payment form, there is no problem, the account appears etc, when you uses the index.php?route=account/register, is when the hells appears.

Newbie

Posts

Joined
Fri May 04, 2012 3:56 pm

Post by byens » Fri Apr 12, 2013 4:43 pm

you should check your account/register.tpl file from custom theme and see what the different from original files.

For me changing

Code: Select all

$('#payment-address select[name=\'customer_group_id\']:checked').trigger('change');
into

Code: Select all

$('#payment-address input[name=\'customer_group_id\']:checked').trigger('change');
and no more php notice error

Selling Kristik - Jasa Foto Aura - Kapas Vapor - supplier baju anak -


Active Member

Posts

Joined
Sat Dec 11, 2010 12:29 pm
Location - Surabaya
Who is online

Users browsing this forum: Semrush [Bot] and 12 guests