Project

General

Profile

Actions

Bug #14367

closed

class.tslib_content.php function getUpdateJS produce JS error messages

Added by Bernd Hanisch over 19 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Content Rendering
Target version:
-
Start date:
2004-10-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.7.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

this function forget to add a ";" after each generated javascript line so that the IE popup with a error message if you visit a page. you can reproduce this on a direct mail subscriptions page. i fixed it by change this lines:
5679: updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',unescape('".rawurlencode($Nvalue)."'));";
and
5684: updateForm('".$formName."','".$arrPrefix."[".$fKey."]',unescape('".rawurlencode($value)."'));";

(issue imported from #M434)


Files

0000434.diff (767 Bytes) 0000434.diff Administrator Admin, 2007-10-18 12:03

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17687: Function getUpdateJS doesn't work properly (eg. Front End User Registration)ClosedThomas Hempel2007-10-16

Actions
Actions #1

Updated by Franz Holzinger over 17 years ago

This is a bug.
I cannot attach this as a file. So it comes here. This is neeed for sr_feuser_register, too.
see http://bugs.typo3.org/view.php?id=3986

--------------------
function getUpdateJS($dataArray, $formName, $arrPrefix, $fieldList) {
$JSPart='';
$updateValues=t3lib_div::trimExplode(',',$fieldList);
while(list(,$fKey)=each($updateValues)) {
$value = $dataArray[$fKey];
if (is_array($value)) {
reset($value);
while(list(,$Nvalue)=each($value)) {
$JSPart.="
updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).");";
}

} else {
$JSPart.="
updateForm('".$formName."','".$arrPrefix."[".$fKey."]',".t3lib_div::quoteJSvalue($value, true).");";
}
}
$JSPart='<script type="text/javascript">
/*<![CDATA[*/ '.$JSPart.'
/*]]>*/
</script>
';
Actions #2

Updated by Thomas Hempel over 16 years ago

Wow... This is an old one.
Because the problem, still exists. I've added a patch for 4.2.

Greets,
Thomas

Actions #3

Updated by Thomas Hempel over 16 years ago

Commited to trunk and branch 4.1

Actions

Also available in: Atom PDF