bug adding/deleting ids from begining of form field names?

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
kazkas

bug adding/deleting ids from begining of form field names?

Post by kazkas »

That's the first time it is happened to me and I think is not such common thing, but:

1. I created hidden field with

Code: Select all

$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));


2. Checked generated page with FF, it has

Code: Select all

<input type="hidden" name="1id1" value="1" />
- everything is great so far, 1 is added to beginning of all field names in the form, as usual.

3. Did print_r ($params) in target file and got ['id']=1, not ['id1']!

4. Changed line from

Code: Select all

$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id1', 1));
to

Code: Select all

$this->smarty->assign('id1', $this->CreateInputHidden($id, 'id2', 1));
- now everything works fine, I have $params['id2'] now, not $params['id'] like in first time!

5. Next step - created

Code: Select all

$this->smarty->assign('id1', $this->CreateInputHidden($id, 'i1111d2', 1));
, got

Code: Select all

<input type="hidden" name="1i1111d2" value="1" />
in HTML and guess what? $params showed [id2]=>1 after submitting form!

Logic says, that there is a bug in routine that generates $params variable, deleting "1" (or whatever was added in the beginning of form fields) not only from beginning, but from all field name. Am I right?
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: bug adding/deleting ids from begining of form field names?

Post by irish »

It's possible that you can't have 'id' in as a input field name or any combination of 'id'. It seems there are some reserved words that can't be used as form fields. I found having a form field name of 'action' will throw errors.

So basically try renaming the hidden field to something different.
kazkas

Re: bug adding/deleting ids from begining of form field names?

Post by kazkas »

yeh, I did that, and it worked. Just made a point for developers, that this part should be redone better in CMS MS
Locked

Return to “[locked] Quality Assurance”