Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product-Variantlist: SQL-query error #2030

Closed
Xirdion opened this issue Mar 27, 2019 · 0 comments
Closed

Product-Variantlist: SQL-query error #2030

Xirdion opened this issue Mar 27, 2019 · 0 comments
Labels
Milestone

Comments

@Xirdion
Copy link
Contributor

Xirdion commented Mar 27, 2019

Hello.

There is a sql-error when showing a product-variant-list. The syntax of the query is not correct.
Isotope-Version: 2.5.12
Contao-Version: 4.4.36

It seems that in Line 40 in ProductVariantList.php there is a closing parenthesis too much.

An exception occurred. {"exception":"[object] (Doctrine\DBAL\Exception\SyntaxErrorException(code: 0): An exception occurred while executing

'SELECT ... FROM ... WHERE tl_iso_product.language='' AND tl_iso_product.published='1' AND (tl_iso_product.start='' OR tl_iso_product.start<'1553680320') AND (tl_iso_product.stop='' OR tl_iso_product.stop>'1553680380') AND ((tl_iso_product.pid=0 AND tl_iso_product.type NOT IN (SELECT id FROM tl_iso_producttype WHERE variants='1')) OR tl_iso_product.pid>0)) AND c.page_id IN (...) GROUP BY tl_iso_product.id, translation.id'

So the error is in this part of the query:
((tl_iso_product.pid=0 AND tl_iso_product.type NOT IN (SELECT id FROM tl_iso_producttype WHERE variants='1')) OR tl_iso_product.pid>0))

SQLSTATE[42000]: Syntax error or access violation: 1064 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 c.page_id IN (...) GROUP BY tl_iso_product' at line 4 at /.../vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:99, Doctrine\\DBAL\\Driver\\PDOException(code: 42000): 
SQLSTATE[42000]: Syntax error or access violation: 1064 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 c.page_id IN (...) AND GROUP BY tl_iso_product' at line 4 at /.../vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:109, PDOException(code: 42000): 
SQLSTATE[42000]: Syntax error or access violation: 1064 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 c.page_id IN (...) AND tl_iso_product.basic=1 GROUP BY tl_iso_product' at line 4 at /.../vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:107)"} []
@aschempp aschempp added the bug label Apr 4, 2019
@aschempp aschempp added this to the 2.5.13 milestone Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants