Skip to content

Commit

Permalink
* bugfix: Error case with wrong product uid in string form must show …
Browse files Browse the repository at this point in the history
…correct HTML formatted output.
  • Loading branch information
franzholz committed Nov 16, 2021
1 parent 5715afc commit 1dd4f3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2021-11-16 Franz Holzinger <[email protected]>
* bugfix: Error case with wrong product uid in string form must show correct HTML formatted output.

2021-10-26 Franz Holzinger <[email protected]>
* bugfix compatibility TYPO3 10.4: FAL must always be used for TYPO3 10, no matter what has been configured for tt_products.

Expand Down
10 changes: 3 additions & 7 deletions control/class.tx_ttproducts_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b
// Save the original flexform in case if we need it later as USER_INT
$this->cObj->data['_original_pi_flexform'] = $this->cObj->data['pi_flexform'];
$this->cObj->data['pi_flexform'] = GeneralUtility::xml2array($this->cObj->data['pi_flexform']);
$this->javaScriptObj = GeneralUtility::makeInstance('tx_ttproducts_javascript');

$config['code'] =
tx_div2007_alpha5::getSetupOrFFvalue_fh004(
Expand Down Expand Up @@ -270,7 +271,6 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b
if ($config['displayCurrentRecord']) {
$row = $this->cObj->data;
$this->tt_product_single['product'] = $row['uid'];

} else {
$error_detail = '';
$paramArray = array('product', 'article');
Expand All @@ -291,13 +291,11 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b

if ($error_detail != '') {
$errorCode[0] = 'wrong_' . $error_detail;
$errorCode[1] = $paramVal;
$errorCode[1] = htmlspecialchars($paramVal);
return false;
}
}



// image
$imageObj = GeneralUtility::makeInstance('tx_ttproducts_field_image');
$imageObj->init($pibaseObj->cObj);
Expand Down Expand Up @@ -330,8 +328,6 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b
$graduatedPriceViewObj = GeneralUtility::makeInstance('tx_ttproducts_graduated_price_view');
$graduatedPriceViewObj->init($graduatedPriceObj);

$this->javaScriptObj = GeneralUtility::makeInstance('tx_ttproducts_javascript');

// JavaScript
$this->javaScriptObj->init(
$pibaseObj,
Expand Down Expand Up @@ -760,7 +756,7 @@ public function &run ($pibaseClass, &$errorCode, $content = '', $bRunAjax = fals
$messageArr = explode('|', $message = $languageObj->getLabel($indice));
$contentTmp .= '<b>' . $languageObj->getLabel('tt_products') . ': ' . $messageArr[0] . '</b>';
} else {
$contentTmp .= '<b>' . $indice . $messageArr[$i] . '</b>';
$contentTmp .= '<b>' . $indice . htmlspecialchars($messageArr[$i]) . '</b>';
}
$i++;
}
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'version' => '2.9.20',
'constraints' => [
'depends' => [
'div2007' => '1.11.5-0.0.0',
'div2007' => '1.11.5-1.11.99',
'php' => '5.5.0-7.4.99',
'table' => '0.7.7-0.0.0',
'tsparser' => '0.2.5-0.0.0',
Expand Down

0 comments on commit 1dd4f3d

Please sign in to comment.