[BUG] Internal server error when disabling one or both frontends #8506
Labels
bug
Identifies a bug which needs to be addressed
old user interface
Issues with Old User interface
Platform UI
Related to the React based User Interface
question
This is a question
setup
Relates to the InvenTree setup / installation process
The default
config.yaml
file shipped features the boolean optionsplatform_frontend
andclassic_frontend
, to enable or disable the PUI or CUI respectively. However, setting either of these values tofalse
results in breakage.Disabling PUI, enabling CUI
Reproduction
To reproduce, set the following values in
config.yaml
:Note that setting
customize.hide_pui_banner
has no effect on this error.Then restart the InvenTree server and worker to apply changes. Since I'm running under Docker Compose, I use:
Results
When already logged in, most of the UI remains usable. However, any areas that would normally feature links to try PUI instead return a 500 Internal Server Error when accessed, notably including the settings page and the login page for visitors not yet authenticated:
Logs are presented below, in a
<details>
element for convenience:Click to toggle logs
Disabling CUI, enabling PUI
Reproduction
Make the opposite changes in
config.yaml
:Then restart the server and worker as before.
Results
An already logged-in user will be redirected from
/
to/platform/
to/platform/home/
, preserving functionality in the PUI. From my testing, the entire UI can be used without issue.A user that is not yet logged in can access
/platform/login/
without issue. However, accessing/
does not redirect and rather presents another 500 Internal Server Error, this time without styling:Click to toggle logs
Disabling both, for fun (?) and profit (??)
Yes, this is obviously a silly thing to do, but let's try it anyway:
Loading
/
gives us the Internal Server Error we've already seen:Loading
/platform
(no trailing slash) makes Firefox complain:Loading
/platform/
(with a trailing slash) redirects us to/platform/platform
. Adding a trailing slash again and loading/platform/platform/
redirects us to/platform/platform/platform
. All steps along the way involve the same redirect error shown above.Further information
stack.env
config.yaml
compose.yaml
Version information
I checked and didn't find a similar issue.
The text was updated successfully, but these errors were encountered: