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

Possibility to disable/ignore contao:maintenance-mode enable #808

Open
fritzmg opened this issue May 13, 2024 · 11 comments
Open

Possibility to disable/ignore contao:maintenance-mode enable #808

fritzmg opened this issue May 13, 2024 · 11 comments

Comments

@fritzmg
Copy link
Contributor

fritzmg commented May 13, 2024

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).

@fritzmg
Copy link
Contributor Author

fritzmg commented May 13, 2024

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?

@aschempp
Copy link
Member

I think the maintenance task just needs to be accepted to fail, right?

@fritzmg
Copy link
Contributor Author

fritzmg commented May 13, 2024

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.

@zoglo
Copy link

zoglo commented May 13, 2024

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)

@zoglo
Copy link

zoglo commented May 13, 2024

@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?

@aschempp
Copy link
Member

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)

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.

@zoglo
Copy link

zoglo commented May 15, 2024

You basically mean a rerun when an error occured that doesn't enable the maintenance mode at all, right?

@fritzmg
Copy link
Contributor Author

fritzmg commented May 15, 2024

But again, that's may be not something you want. If an error occurs, you might not want to continue at all.

@zoglo
Copy link

zoglo commented May 20, 2024

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?

@fritzmg
Copy link
Contributor Author

fritzmg commented May 20, 2024

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 🙈.

@aschempp
Copy link
Member

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 😊

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