Zen Cart Logo
Forums / General Questions / Uncaught TypeError: Cannot set property 'className' of null - Create Account

Uncaught TypeError: Cannot set property 'className' of null - Create Account

Views: 3,005

Results 1 to 5 of 5
25 May 2016, 6:32 PM
#1
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Uncaught TypeError: Cannot set property 'className' of null - Create Account

Hi

Getting this on tpl_module_create_account

document.getElementById("stText").className = 'hiddenField';

There's no id "stText" on that file ... I've check on the template_default files....and on the update 155a.

I Only have a <br class="clearBoth" id="stBreak" /> ...witch had luck, cause I usually get rid of all them <br>

No one else got this error ?
What should I be hiding ?

Thanks

25 May 2016, 6:41 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: Uncaught TypeError: Cannot set property 'className' of null - Create Account

The block of HTML that "should" include the stText value is present in /includes/modules/create_account.php (or in your template's override /includes/modules/YOUR_TEMPLATE/create_account.php).

It sounds like you've got a bad merge on your upgrade.

25 May 2016, 7:13 PM
#3
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Uncaught TypeError: Cannot set property 'className' of null - Create Account

...sorry, but I can't find that...
I didn't override this file... I've downloaded 155a just now and can't find stText anywhere on that file.
Somewhere else ?

Thanks

25 May 2016, 7:27 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Uncaught TypeError: Cannot set property 'className' of null - Create Account

Apparently you're using a combination of countries+states/zones that doesn't normally trigger that issue.

But, you're right: stText no longer exists in v155.

You can remove the 4 javascript lines that reference it in all the jscript_addr_pulldowns.php files.

25 May 2016, 8:33 PM
#5
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Uncaught TypeError: Cannot set property 'className' of null - Create Account

Ok , thanks, I'll try that.