Repository navigation
Keep the time zone on save, let guests be saved, stop losing the first click (2.4.x) - #1006
Merged
Merged
Conversation
added 3 commits
November 1, 2026 07:33
The installer leaves the store's time zone empty, so dates follow the server, but the select had no empty option. It showed its first zone, and saving General settings stored that zone, moving every date shown. An empty option keeps the value empty. A configured zone that resolves but is not listed, such as a Windows id on Linux, gets its own option so that saving does not change it. The option's text has a default: a database already on 2.4 does not import the 2.4 resources again.
The edit validator lowercased the posted email and the update trimmed it without checking it, so saving a guest, who has none, returned a 500. The email is now required unless the customer has none stored and is not being moved to the Registered group. The required message is also localized now: WithMessage covered only EmailAddress, so an empty field showed the FluentValidation default.
The message appeared on mousedown, when an autofocused field lost focus, and moved the layout. The button under the pointer slid away before mouseup and the click was lost, on the login page among others. An untouched empty field, unticked checkbox or empty group now reports nothing until the form is submitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No linked issue: these defects were found testing
developand fixed there in #1004. This brings over the three that affect every installation, MongoDB included.Type: bugfix
Issue
DefaultStoreTimeZoneIdempty, so dates follow the server, but the select has no empty option. It shows its first zone (UTC-12 on Windows), and saving the page stores that zone, whatever was being edited. Every date shown then moves.CustomerValidatorcallsx.Email.ToLower()andUpdateCustomerModelcallsmodel.Email.Trim(), and a guest has no email. An empty email on any customer also shows the FluentValidation default text instead of the localized message, becauseWithMessagecovers onlyEmailAddress().Solution
GetStoreTimeZoneOptionsadds an empty "Server time zone" option, used by the Admin and Store settings pages. Saving it keeps the value empty, so the store keeps following the server. A configured zone that resolves but is not listed, such as a Windows id on Linux, gets its own option so that saving does not change it.Different from #1004: the new resource is in
DefaultLanguage.xmlanden_240.xml, but a database already on 2.4 does not run the 2.4 resource import again. The option therefore reads the resource with the default text "Server time zone", so those installations see that text and not a raw key. Ondevelopthe resource arrives throughen_250.xml, so this default is not needed there.Not included: the LiteDB fixes from #1004 and #997 (mapper warm-up, installation, null guards in the gift voucher and order filters, removal of the
Singletonoption).Breaking changes
None.
GeneralCommonin the Admin panel gains a[FromServices]parameter, which MVC supplies. No model, route, setting or stored field changes. A store that already saved a zone keeps it, because that cannot be told from a deliberate choice; choosing "Server time zone" and saving clears it.Testing
On a MongoDB install:
/loginwithout touching anything. Press and hold the login button with the mouse: nothing moves. Release it: the click registers and the required messages appear./register, tab past the checkbox: no message. Submit the form: the message appears.Automated: all test projects in
GrandNode.slnxpass, with new tests inCustomerValidatorTests,CustomerViewModelServiceTestsandDateTimeServiceExtensionsTests. A guest moved to the Registered group without an email is covered there.Steps 1 to 4 were also run on this branch against MongoDB, on a database without the new resource. Login click, measured with a real mouse press: before the fix the button moved 24 px and no click happened; after it the button stayed put and the click registered. The Store panel's settings page was not opened in a browser; it uses the same helper.