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

Isotope-Update not possible after installation of contao-isotope-stock-bundle 0.1.3 #3

Open
sgei opened this issue Dec 19, 2024 · 11 comments

Comments

@sgei
Copy link

sgei commented Dec 19, 2024

With the installed contao-isotope-stock-bundle it is not possible to run the Isotope-Update. The Database-Migration fails...

Exception in file vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php on line 118An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
#0 vendor/doctrine/dbal/src/Connection.php(1939): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
#1 vendor/doctrine/dbal/src/Connection.php(1881): Doctrine\DBAL\Connection->handleDriverException()
#2 vendor/doctrine/dbal/src/Connection.php(1106): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
#3 vendor/heimrichhannot/contao-isotope-stock-bundle/src/Migration/MigrateFieldsSqlMigration.php(76): Doctrine\DBAL\Connection->executeQuery()
#4 vendor/heimrichhannot/contao-isotope-stock-bundle/src/Migration/MigrateFieldsSqlMigration.php(32): HeimrichHannot\IsotopeStockBundle\Migration\MigrateFieldsSqlMigration->migrateFields()
#5 vendor/contao/core-bundle/src/Migration/MigrationCollection.php(47): HeimrichHannot\IsotopeStockBundle\Migration\MigrateFieldsSqlMigration->shouldRun()
#6 vendor/contao/core-bundle/src/Migration/MigrationCollection.php(58): Contao\CoreBundle\Migration\MigrationCollection->getPending()
#7 vendor/contao/core-bundle/src/Command/MigrateCommand.php(262): Contao\CoreBundle\Migration\MigrationCollection->getPendingNames()
#8 vendor/contao/core-bundle/src/Command/MigrateCommand.php(209): Contao\CoreBundle\Command\MigrateCommand->executeMigrations()

@internethering
Copy link

I got this problem too

@koertho
Copy link
Contributor

koertho commented Jan 3, 2025

Hi, I just tried to reproduce the error. Can you please give more context? Contao-, PHP-, Isotope- (from and to version), MySQL- and Doctrine-Version?

@sgei
Copy link
Author

sgei commented Jan 5, 2025

Contao: 4.13.50
Isotope: 2.9.5 -> 2.9.6
PHP: 8.3.14
Server-Version: 10.5.26-MariaDB - MariaDB Server
doctrine/common 3.4.5
doctrine/dbal 3.9.3

@internethering
Copy link

Contao: 4.13.50
Isotope: 2.9.6
PHP: 8.1.30
MariaDB: 10.11.10
doctrine/common 3.5.0
doctrine/dbal 3.9.3

@koertho
Copy link
Contributor

koertho commented Jan 13, 2025

I still can't reproduce the error. Can you provide the field definitions of your stock, initialStock and maxOrderSize fields? Are the fields empty or already filled?

@sgei
Copy link
Author

sgei commented Jan 13, 2025

Hallo,

ich habe es gerade noch einmal nachgestellt...

Ausgangssituation:

PHP: 8.3.15
Contao: 4.13.50
doctrine/common: 3.4.5
doctrine/dbal: 3.9.3
Isotope: 2.9.5
heimrichhannot/contao-isotope-stock-bundle: 0.1.3

Konfiguration stock-bundle:

Im Produkttyp ist nur "Bestand" aktiv, "Anfangsbestand" und "Maximale Bestellmenge" nicht.
Im Bestellstatus "Storniert" habe ich "Bestand-erhöhender Bestellstatus" aktiviert.

Der Bestand ist bei den Produkten noch nicht gepflegt, also alle Tabellenfelder (maxOrderSize, initialStock, stock) noch "NULL".

Aktualisierung auf Isotpe 2.9.6:

  • Installation über den Contao-Manger läuft bis zur Aktualisierung der DB
  • Ausführung "Runonce file: app/Resources/contao/config/runonce.php"

Exception in file vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php on line 118An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

#0 vendor/doctrine/dbal/src/Connection.php(1939): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
#1 vendor/doctrine/dbal/src/Connection.php(1881): Doctrine\DBAL\Connection->handleDriverException()
#2 vendor/doctrine/dbal/src/Connection.php(1106): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
#3 vendor/heimrichhannot/contao-isotope-stock-bundle/src/Migration/MigrateFieldsSqlMigration.php(76): Doctrine\DBAL\Connection->executeQuery()
#4 vendor/heimrichhannot/contao-isotope-stock-bundle/src/Migration/MigrateFieldsSqlMigration.php(32): HeimrichHannot\IsotopeStockBundle\Migration\MigrateFieldsSqlMigration->migrateFields()
#5 vendor/contao/core-bundle/src/Migration/MigrationCollection.php(47): HeimrichHannot\IsotopeStockBundle\Migration\MigrateFieldsSqlMigration->shouldRun()
#6 vendor/contao/core-bundle/src/Migration/MigrationCollection.php(58): Contao\CoreBundle\Migration\MigrationCollection->getPending()
#7 vendor/contao/core-bundle/src/Command/MigrateCommand.php(262): Contao\CoreBundle\Migration\MigrationCollection->getPendingNames()
#8 vendor/contao/core-bundle/src/Command/MigrateCommand.php(209): Contao\CoreBundle\Command\MigrateCommand->executeMigrations()
#9 vendor/contao/core-bundle/src/Command/MigrateCommand.php(109): Contao\CoreBundle\Command\MigrateCommand->executeCommand()
#10 vendor/symfony/console/Command/Command.php(298): Contao\CoreBundle\Command\MigrateCommand->execute()
#11 vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run()
#12 vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand()
#13 vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()
#14 vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun()
#15 vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()
#16 vendor/contao/manager-bundle/bin/contao-console(38): Symfony\Component\Console\Application->run()
#17 {main}

@koertho koertho mentioned this issue Jan 15, 2025
@koertho
Copy link
Contributor

koertho commented Jan 15, 2025

I still can't reproduce the error so I have to made a wild guess :)
Can you please test if the fix in #4 fix the error?

@sgei
Copy link
Author

sgei commented Jan 16, 2025

Hello,
I have manually applied the fix in the file “src/Migration/MigrateFieldsSqlMigration.php” in my installation and then installed the update to Isotope 2.9.6.
This time it went through without any problems, including the database migration.
Do I have to do anything to the “rector.php”? I have not installed the contao/rector package.
Steffen

@koertho
Copy link
Contributor

koertho commented Jan 16, 2025

@sgei Sounds good.
No, you can ignore the rector part :)

Thanks for testing, I will merge it soon!

@sgei
Copy link
Author

sgei commented Jan 23, 2025

The new release 0.1.4 does not fix this issue.

Steffen

@internethering
Copy link

internethering commented Jan 27, 2025

I still can't reproduce the error so I have to made a wild guess :) Can you please test if the fix in #4 fix the error?

this fix works for me :) thanks

@sgei it's not yet part of 0.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants