Franz Holzinger

Verse of the day

Denn es ist ein Gott und ein Mittler zwischen Gott und den Menschen, nämlich der Mensch Christus Jesus, der sich selbst gegeben hat für alle zur Erlösung, daß solches zu seiner Zeit gepredigt würde;
1 Timotheus 2:5-6

© Bible Gateway's Verse of the Day


autor  
13-01-10 14:55:39 SQL Fehler nach Update auf 2.8.0
Daniel Völkel
Hallo,

gestern habe ich versucht von 2.7.1 auf 2.8.0 upzudaten. Nachdem alle Anpassungen der Datenbank erledigt waren, bleibt ein Fehler bestehen, sobald ich etwas in den Warenkorb gelegt habe. Anbei mal der Fehler mit der doch seltsamen Datenbankabfrage :)

caller t3lib_DB::exec_SELECTquery

ERROR You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND static_country_zones.hidden=0' at line 4

lastBuiltQuery SELECT static_country_zones.zn_name_de,static_country_zones.zn_name_local
FROM static_country_zones
WHERE
AND static_country_zones.hidden=0

debug_backtrace require#76 // include#446 // TSpagegen::renderContent#77 // tslib_cObj->cObjGet#332 // tslib_cObj->cObjGetSingle#444 // tslib_cObj->USER#572 // tslib_cObj->callUserFunction#724 // call_user_func_array#5870 // tx_templavoila_pi1->main_page# // tx_templavoila_pi1->renderElement#223 // tx_templavoila_pi1->processDataValues#330 // tslib_cObj->cObjGetSingle#565 // tslib_cObj->COBJ_ARRAY#502 // tslib_cObj->cObjGet#686 // tslib_cObj->cObjGetSingle#444 // tslib_cObj->USER#572 // tslib_cObj->callUserFunction#724 // call_user_func_array#5870 // tx_ttproducts_pi1->main# // tx_ttproducts_pi1_base->main#71 // tx_ttproducts_main->run#79 // tx_ttproducts_control->doProcessing#433 // tx_ttproducts_basket_view->getView#601 // tx_ttproducts_info_view->getRowMarkerArray#883 // tx_staticinfotables_div->getTitleFromIsoCode#467 // t3lib_DB->exec_SELECTquery#311 // t3lib_DB->debug#234

Eine WHERE Abfrage ohne Argument macht natürlich kein Sinn. Jetzt ist natürlich meine Frage, ob es an mir liegt, oder wirklich ein Fehler im Programm vorliegt.
16-01-10 08:21:28 falsche Version
Franz Holzinger
Diese Fehlerbeschreibung trifft nicht auf die aktuelle tt_products 2.8.0 rc8 zu.

Denn dort gibt es nur diese beiden Aufrufe von tx_staticinfotables_div->getTitleFromIsoCode:

$markerArray['###PERSON_ZONE_DISPLAY###'] = tx_staticinfotables_div::getTitleFromIsoCode('static_country_zones', array($zoneCodeArray['billing'],$countryCodeArray['billing']));
$markerArray['###DELIVERY_ZONE_DISPLAY###'] = tx_staticinfotables_div::getTitleFromIsoCode('static_country_zones', array($zoneCodeArray['delivery'],$countryCodeArray['delivery']));

Und diese stehen innerhalb der Funktion getRowMarkerArray in den Zeilen 443 und 444 der Datei view/class.tx_ttproducts_info_view.php.
20-01-10 10:29:36 RC8
Daniel Völkel
Hallo Franz,

ich habe inzwischen den RC8 installiert, der Fehler tritt weiterhin auf. Dieses Mal aber mit anderem debug_backtrace:

require#76 // include#446 // TSpagegen::renderContent#77 // tslib_cObj->cObjGet#332 // tslib_cObj->cObjGetSingle#444 // tslib_cObj->USER#572 // tslib_cObj->callUserFunction#724 // call_user_func_array#5870 // tx_templavoila_pi1->main_page# // tx_templavoila_pi1->renderElement#223 // tx_templavoila_pi1->processDataValues#330 // tslib_cObj->cObjGetSingle#565 // tslib_cObj->COBJ_ARRAY#502 // tslib_cObj->cObjGet#686 // tslib_cObj->cObjGetSingle#444 // tslib_cObj->USER#572 // tslib_cObj->callUserFunction#724 // call_user_func_array#5870 // tx_ttproducts_pi1->main# // tx_ttproducts_pi1_base->main#71 // tx_ttproducts_main->run#79 // tx_ttproducts_control->doProcessing#433 // tx_ttproducts_basket_view->getView#678 // tx_ttproducts_info_view->getRowMarkerArray#867 // tx_staticinfotables_div->getTitleFromIsoCode#443 // t3lib_DB->exec_SELECTquery#311 // t3lib_DB->debug#234

Ich gehe davon aus, dass dies dann die Zeilen 443 und 444 betrifft.

Ich frage mich nun, ob es eventuell daran liegt, dass ich gar keinen Marker für das Bundesland im Template habe, da ich dieses nicht benötige. Kann das daran liegen?

Viele Grüße,
Daniel
20-01-10 11:10:21 Patch für static_info_tables
Franz Holzinger
--- class.tx_staticinfotables_div.php (révision 21636)
+++ class.tx_staticinfotables_div.php (copie de travail)
@@ -281,7 +281,7 @@
$prefixedTitleFields[] = $table.'.'.$titleField;
}
$fields = implode(',', $prefixedTitleFields);
- $whereClause = '';
+ $whereClause = '1=1';
if (!is_array($isoCode)) {
$isoCode = array($isoCode);
}
@@ -291,13 +291,10 @@
$tmpField = tx_staticinfotables_div::getIsoCodeField($table, $code, TRUE, $index);
$tmpValue = $TYPO3_DB->fullQuoteStr($code,$table);
if ($tmpField && $tmpValue) {
- $whereClause .= ($whereClause!='' ? ' AND ':'').$table.'.'.$tmpField.' = '.$tmpValue;
+ $whereClause .= ' AND ' . $table . '.' . $tmpField . ' = ' . $tmpValue;
}
}
}
- if (strpos($whereClause,' AND ')===0) {
- $whereClause = '1=1'.$whereClause;
- }
if (is_object($TSFE)) {
$enableFields = $TSFE->sys_page->enableFields($table);
} else {

20-01-10 11:22:34 Patch
Daniel Völkel
Der Patch funktioniert einwandfrei!

Vielen Dank.
< Zurück zum Forum