Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Nov 26, 2025

Fixes #15015

When creating a queue in the management UI, selecting a non-/ virtual host, then a queue type different than the default for that virtual host causes the vhost selection to reset to /. This happens because changing the queue type calls update(), which re-renders the entire form to display specific data for that virtual host, losing the user's virtual host selection.

This change reorders the "Add a new queue" form fields so that "Type" appears before "Virtual host". Users now select the queue type first, triggering the form re-render before they make their vhost selection. This prevents the vhost reset without requiring JS wizardry/hacks to preserve form state across re-renders.


This is an automatic backport of pull request #15016 done by Mergify.

When creating a queue in the management UI, selecting a non-`/` virtual
host, then a queue type different than the default for that virtual host
causes the vhost selection to reset to `/`. This happens because
changing the queue type calls `update()`, which re-renders the entire
form to display specific data for that virtual host, losing the user's
virtual host selection.

This change reorders the "Add a new queue" form fields so that "Type"
appears before "Virtual host". Users now select the queue type first,
triggering the form re-render before they make their vhost selection.
This prevents the vhost reset without requiring JS wizardry/hacks to
preserve form state across re-renders.

(cherry picked from commit 50b5aae)
@michaelklishin michaelklishin added this to the 4.2.2 milestone Nov 26, 2025
@michaelklishin michaelklishin changed the title Reorder queue creation form to prevent vhost reset (backport #15016) Reorder queue creation form to make vhost dropdown reset less likely (backport #15016) Nov 26, 2025
@michaelklishin michaelklishin merged commit 4abd85b into v4.2.x Nov 26, 2025
575 of 576 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.2.x/pr-15016 branch November 26, 2025 00:44
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

Successfully merging this pull request may close these issues.

3 participants