You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If some errors happen while running InstallationController::runPostInstallCommands for example, the errors will not be displayed to the user and the installation might be left in an incomplete state without him knowing. For instance, if some errors happen while creating the symlinks, e.g.:
------- ------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------
Symlink Target / Error
------- ------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------
ERROR system/themes/flexible Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?
ERROR web/assets Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?
ERROR web/system/themes Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?
ERROR system/logs Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?
------- ------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------
These errors are catched by the command and then written to the SymfonyStyle object, which creates the styled output for the command line. That output will go nowhere though, since InstallationController::runPostInstallCommands uses a NullOutput
$command->run(newArgvInput([]), newNullOutput());
So they are not visible nor logged anywhere.
May be these post-install-commands should be put in an InstallService for example, so that errors can be handled differently by the callers? The contao:symlinks command would then call these functions from the InstallService, catch the errors and display them on the command line as usual, while the InstallationController can catch the errors and then display them in the Install Tool instead.
The text was updated successfully, but these errors were encountered:
fritzmg
changed the title
install tool does not (cannot) display errors happening during setup
install tool does not (cannot) display errors of install commands
Oct 4, 2016
Btw. the same problem exists on various other places, where commands are invoked. For instance, if the creation of symlinks fails here: core-bundle/src/Resources/contao/dca/tl_files.php#L685 there will be no entry in the symfony log or system log indicating what the problem might have been.
If some errors happen while running
InstallationController::runPostInstallCommands
for example, the errors will not be displayed to the user and the installation might be left in an incomplete state without him knowing. For instance, if some errors happen while creating the symlinks, e.g.:These errors are catched by the command and then written to the
SymfonyStyle
object, which creates the styled output for the command line. That output will go nowhere though, sinceInstallationController::runPostInstallCommands
uses aNullOutput
So they are not visible nor logged anywhere.
May be these post-install-commands should be put in an
InstallService
for example, so that errors can be handled differently by the callers? Thecontao:symlinks
command would then call these functions from theInstallService
, catch the errors and display them on the command line as usual, while theInstallationController
can catch the errors and then display them in the Install Tool instead.The text was updated successfully, but these errors were encountered: