Bug #17687
closed
Function getUpdateJS doesn't work properly (eg. Front End User Registration)
Added by Philip Almeida about 17 years ago.
Updated over 16 years ago.
Description
To transverse array with LIST I add to change the from:
$JSPart='';
$updateValues=t3lib_div::trimExplode(',',$fieldList);
TO:
$JSPart='';
$updateValues=t3lib_div::trimExplode(',',$fieldList);
+ reset($updateValues);
I add -> reset($updateValues);
This function is in file: /sysext/cms/tslib/class.tslib_content.php
This function is used for example in ext srfeuserregister.
The function is not updating fields correctly.
(issue imported from #M6531)
Files
Can you describe this issue a bit more detailed?
I can't see the point. What's going wrong without the patch?
Greets,
Thomas
Hello Thomas,
Without the patch the code does not retrieve this:
<script type="text/javascript">
/*<![CDATA[*/
updateForm('fe_users_form','FE[fe_users][username]','philip.almeidas@gmail.com')
updateForm('fe_users_form','FE[fe_users][password]','e10adc3949ba59abbe56e057f20f883e')
updateForm('fe_users_form','FE[fe_users][usergroup]','96677859')
updateForm('fe_users_form','FE[fe_users][name]','philip')
updateForm('fe_users_form','FE[fe_users][address]','')
updateForm('fe_users_form','FE[fe_users][telephone]','')
updateForm('fe_users_form','FE[fe_users][fax]','')
/*]]>*/
</script>
It just retrieves this:
<script type="text/javascript">
/*<![CDATA[*/
/*]]>*/
</script>
Hi Philip,
I uploaded a little bit cleaner patch file but I didn't changed anything in the patch. The RFC is commited to core list.
Greets,
Thomas
Commited to trunk and branch 4.1
Also available in: Atom
PDF