contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

Hook "sqlCompileCommands" not called #68

Closed rabauss closed 7 years ago

rabauss commented 7 years ago

in the contao-standard-edition we have the problem with the extension "pct_customelements_customcatalog" that the hook "sqlCompileCommands" is not called, because a event-listener is missing.

in the managed-edition everything is fine, because there exists an event-listener (InstallCommandListener), that will call "Database/Installer->compileCommands", so that the hooks are executed.

is there an solution for the standard edition? or is the hook not available at the moment in standard-edition?

aschempp commented 7 years ago

What event listener is missing?

rabauss commented 7 years ago

I'm not so familiar with the event-listeners of the managerBundle, so I just guessed the listener because of the name. but don't know the right listener or service...

but i can give you the callstack which will execute the sqlCompileCommands-Hook in managedEdition:

Installer.php:165, Contao\InstallationBundle\Database\Installer->compileCommands()
Installer.php:60, Contao\InstallationBundle\Database\Installer->getCommands()
InstallationController.php:396, Contao\InstallationBundle\Controller\InstallationController->adjustDatabaseTables()
InstallationController.php:101, Contao\InstallationBundle\Controller\InstallationController->installAction()
HttpKernel.php:153, call_user_func_array:{/srv/apache2/www/intern/contao-4-man/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153}()
HttpKernel.php:153, Symfony\Component\HttpKernel\HttpKernel->handleRaw()
HttpKernel.php:68, Symfony\Component\HttpKernel\HttpKernel->handle()
Kernel.php:171, Symfony\Component\HttpKernel\Kernel->handle()
HttpCache.php:467, Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
HttpCache.php:59, Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward()
HttpCache.php:421, Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
ContaoCache.php:48, Contao\ManagerBundle\HttpKernel\ContaoCache->fetch()
HttpCache.php:191, Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
EventDispatchingHttpCache.php:98, Contao\ManagerBundle\HttpKernel\ContaoCache->handle()
app.php:30, {main}()

EDIT:

when i register the ContaoManagerBundle/Resources/config/services.yml in the standard-edition the Hook will also be called!

rabauss commented 7 years ago

ok the hook is called in standard-edtion - so you can close this issue! there was something wrong with my xdebug or phpstorm...