Franz Holzinger

Verse of the day

Bei Gott ist mein Heil, meine Ehre, der Fels meiner Stärke; meine Zuversicht ist auf Gott.
Psalm 62:7

© Bible Gateway's Verse of the Day


autor  
13-12-21 11:22:12 tt_products - Productlist
Erwin Seher
Hallo liebe tt_products Comunity.

Ich habe aktuell ein Problem mit einer Typo3 10.4.21 und tt_products.
Die Auflistung der Produkte funktioniert leider nicht. Wenn ich das default Template einbinde, werden keine Produkte gefunden. Hab die Pids im Template soweit alle richtig gesetzt. Im Admin Panel bekomme ich folgende Meldungen:

Invalid database result detected: function TYPO3\CMS\Typo3DbLegacy\Database\DatabaseConnection->sql_fetch_assoc called from file ml/public/typo3conf/ext/tt_products/view/class.tx_ttproducts_list_view.php in line 1742.
Invalid database result detected: function TYPO3\CMS\Typo3DbLegacy\Database\DatabaseConnection->sql_free_result called from file ml/public/typo3conf/ext/tt_products/view/class.tx_ttproducts_list_view.php in line 1818.

Im Backend bekomme ich von typo3_legacy folgenden Fehler/Warn:

Core: Error handler (FE): PHP Warning: Use of undefined constant PATH_site - assumed 'PATH_site' (this will throw an Error in a future version of PHP) in /var/www/html/public/typo3conf/ext/typo3db_legacy/Classes/Database/DatabaseConnection.php line 1855

Wenn ich eine Detailansicht auf ein Produkt einrichte funktionierts einwandfrei.

Vielen Dank im Voraus.
13-12-21 12:08:06 welches tt_products?
Franz Holzinger
keine Version angegeben

Ggf. die Ausgabe über die Extension debug_mysql_db ansehen.
13-12-21 13:37:50 re tt_products - Productlist
Erwin Seher
Hallo Herr Holzinger!

Vielen Dank für die rasche Antwort.
Das wäre die aktuelle Verison aus dem ter 2.9.20.
1)

SQL ERROR = => 'Expression #1 of ORDER BY clause is not in SELECT list, references column 'd
b.tt_products_cat.sorting' which is not in SELECT list; this is incompatible
with DISTINCT' (166 chars)

2)

Bekomme zwei Errors aus dem debug mysql db:

caller => 'TYPO3\CMS\Typo3DbLegacy\Database\DatabaseConnection::exec_SELECTquery' (69 chars)
ERROR => 'Expression #1 of ORDER BY clause is not in SELECT list, references column 'd
b.tt_products_cat.sorting' which is not in SELECT list; this is incompatible
with DISTINCT' (166 chars)
13-12-21 17:08:03 MySQL Mode
Franz Holzinger
Der MySQL Mode muss umgestellt werden.

Siehe dazu
https://stackoverflow.com/questions/36829911/how-to-resolve-order-by-clause-is-not-in-select-list-caused-mysql-5-7-with-sel

Über MySQL:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Oder in der my.cnf Datei:

sql_mode=''
13-12-21 17:27:27 re tt_products - Productlist
Erwin Seher
Tatsächlich, es war der SQL mode.
Komisch, ist eine standardmäßige docker ddev installation.

Vielen Dank!!!!!!
17-12-21 10:46:05 re tt_products - Productlist
Erwin Seher
Falls jemand noch auf selbes Problem stößt und ddev in Verwendung hat:

Im Ordner .ddev einen neuen Ordner mysql erstellen und darin ein config file für den mysql (my.cnf). Darin dann den Sql-Mode richtigstellen (oder bereinigen mit sql-mode = "").

Wenn man das ganze mit SET GLOBAL lösen will wird nach dem neuestart der ddev umgebung die variable wieder zurückgesetzt.
< Zurück zum Forum