Monviech / os-caddy-plugin

Caddy Plugin with GUI for OPNsense
Other
38 stars 0 forks source link

Validation Model stopped displaying error messages in 24.1 #94

Closed Monviech closed 6 months ago

Monviech commented 6 months ago

I just found out that my validation model doesn't display messages anymore. I don't know when this regression started, but I think it has to do with the upgrade to 24.1, since before it still worked.

Right now, the validation check on the full model are still happening in the background, but the user can save anything without getting feedback, and also delete anything without getting feedback.

When a Form is saved in "General Settings", the Apply button can get stuck because the form can't be saved if the validation fails in the background.

This needs to be investigated.

usr/plugins/devel/caddy/src/opnsense/mvc/app/models/Pischem/Caddy/Caddy.php

Monviech commented 6 months ago

This is especially bad since new users of the plugin can now have configurations that could potentially break if the validation model is introduced again in a working state.

Maybe I will remove it and work with the Caddyfile validation instead, since that won't break.

https://github.com/Monviech/os-caddy-plugin/issues/93

Monviech commented 6 months ago

This might be an upstream issue... maybe. I'm careful with those statements because I'm still pretty new at this.

I found out it affects VXLAN in the opnsense core too.

https://github.com/opnsense/core/issues/7255

Monviech commented 6 months ago

The bug seems to be on my implementation, I have to fix some aspects of the validation model.

Monviech commented 6 months ago

Fixed with https://github.com/Monviech/os-caddy-plugin/commit/755f454ccc76a3b446cab0d947b83b59fd8bb12b