Possibility to disable/ignore `contao:maintenance-mode enable`
The recent Twig BC breaks showed that you can inadvertently maneuver Contao into a broken state of which you cannot get out of via the Contao Manager alone. The update to twig/twig 3.10.1 breaks the contao:maintenance-mode enable command. To fix these BC issues a downgrade to twig/twig 3.9.x is necessary (appropriate conflicts were added to contao/conflicts for this). However, this is impossible to do via the Contao Manager, as it always wants to execute contao:maintenance-mode enable first - which fails. And thus the subsequent composer update - which would execute the downgrade to fix the issue - is never executed.
There needs to be a way to run a composer update directly (i.e. without prior execution of contao:maintenance-mode enable).
Btw. in this situation the safe mode is not offered. The safe mode would help as contao:maintenance-mode enable is not executed there. May be there just needs to be a way to manually enable the safe mode?
I think the maintenance task just needs to be accepted to fail, right?
I think the maintenance task just needs to be accepted to fail, right?
Not sure, depends on what the user wants I think. There might be other situations where you do not want the composer update or composer install to go ahead if the maintenance mode cannot be enabled.
An EnableSafemode within the maintenance view wouldn't hurt (currently implementing it and trying to test my dev build if it runs through with 3.10.1 in safemode as well)
@fritzmg Having safe-mode on wouldn't solve the issue in this case :/ - I was on 3.10.0 when testing it, hence why it bypassed it.
@aschempp It would help if we would completely skip enabling the maintenance-mode whilst installing within safe-mode since it's usally something when stuff is already broken (or if I add it as an extra option, an expert-setting).
Wdyt?
An
EnableSafemodewithin the maintenance view wouldn't hurt (currently implementing it and trying to test my dev build if it runs through with 3.10.1 in safemode as well)
I don't like that option. It would mean that a user has to know internals to know how to fix the system. The Contao Manager should either skip the maintenance mode if it breaks, or possibly allow the task to continue otherwise. Enabling the safe mode manually makes little sense to me.
You basically mean a rerun when an error occured that doesn't enable the maintenance mode at all, right?
But again, that's may be not something you want. If an error occurs, you might not want to continue at all.
So what would you propose @fritzmg ? If we wanna keep it as simple as possible for the normal user, it should retry without the maintenance mode then, do you agree?
Ideally the Contao Manager would ask the user to confirm to continue without enabling maintenance mode - but putting another UI layer like that in is presumably hard 🙈.
I think we need to have tasks that are allowed to fail and the user can then choose whether to continue or not. I have some ideas how to implement that 😊
Implemented in 4d11c8fae18c0b25949d738b391d241f7d1e95b5