Forums / Bug Reports / [NOT A BUG] Minor bug in account edit template

[NOT A BUG] Minor bug in account edit template

Locked

Views: 1,489

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
1 May 2010, 9:02 PM
#1
jdcncsolutions avatar

jdcncsolutions

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

[NOT A BUG] Minor bug in account edit template

Just figured I would post about a very minor bug that I found today in \zen-cart-v1.3.9a-full-fileset-04192010\includes\templates\template_default\templates\tpl_account_edit_default.php

The issue is that for each input field, the id is placed into the type in the html code. ie <input type="id="something&quote;"...

In order to fix this minor issue, which from what I tested does not affect the functionality of updating an account, is to change each line of code containing the zen_draw_input_field. See the example below as to how to fix the bug:

original:

<?php echo zen_draw_input_field('firstname', $account->fields['customers_firstname'], 'id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>

change to:

<?php echo zen_draw_input_field('firstname', $account->fields['customers_firstname'] . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>

The change is from "], 'id="firstname"'" to "] . ' id="firstname"'".

Have a nice day,

-John
http://www.jdcncsolutions.com/

1 May 2010, 10:33 PM
#2
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: [NOT A BUG] Minor bug in account edit template

Hi,

I cannot reproduce the error with a clean install of v1.3.9a and the original code looks correct.

Are you seeing the problem on a clean install or a modified one?

Regards,
Christian.

1 May 2010, 10:56 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: [NOT A BUG] Minor bug in account edit template

I agree with CJPinder.
The suggested coding change is actually syntactically incorrect. The root problem is not with the template, but must be with something else on your site.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 May 2010, 12:37 AM
#4
jdcncsolutions avatar

jdcncsolutions

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

Re: [NOT A BUG] Minor bug in account edit template

Hey guys,

My apologies... I just looked over my work again and found that from the source files I had made some changes to the file a long time ago (further than I can remember making them :D) in a past template and just found the error as I was checking a new template that I working on. :oops:

Take care,

-John
http://www.jdcncsolutions.com/