Every seat in the picker's basket panel carries a rate dropdown. Changing it posts op: category to the place-op endpoint, and the endpoint can refuse: when the place is no longer held it answers 409 with {ok: false, error: 'Not held.'}, which happens if the hold lapsed while the panel sat open.

The picker ignores the refusal. The change handler re-renders and updates the seat's rate only inside its success branch, and there is no else and no catch, so on a refusal nothing at all happens: the dropdown keeps showing the rate the server rejected, while the total, which is only recomputed by that same re-render, goes on showing the old one. The panel ends up contradicting itself, and a network error is a silent unhandled rejection.

What makes it stand out is that the neighboring refusals are all handled. A seat someone else has taken turns unavailable and is announced. A pooled area that cannot give another unit corrects its counter and says why. Only the rate dropdown fails silently.

The fix is small, because re-rendering the panel restores the dropdown from the rate the seat is actually held at. On a refusal, re-render (which reverts the control) and announce it, matching what the seat and pool paths already do. A catch should do the same with a generic message.

Found while adding browser coverage in #3614039: Add FunctionalJavascript coverage for the place map and calendar JavaScript. The test there covers changing a rate successfully and notes in a comment that the refusal path is deliberately not asserted, because it was this bug rather than behavior worth pinning; that test should be extended once this is fixed.

Issue fork yoyaku-3614199

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed f505ab15 on 1.x
    fix: #3614199 A refused rate change on the place map is silently ignored...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably’s picture

Merged to 1.x as f505ab1.

A refused rate change now takes the seat again at the rate that was asked for, reusing the existing toggle op, and drops the line when the seat has been taken by somebody else in the meantime. Reverting the control was tried first and discarded: it left the panel showing a seat as held that nobody held, and the rate could then never be changed at all, because every further attempt met the same refusal.

Two FunctionalJavascript tests in VenueMapPickerTest cover both branches, and both were confirmed to fail without the fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.