[Bug]: UI error re locale use on numbers when assigning quota values
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
I have tried this more than once, using latest (32?) version.
Create a new user. Go to set quota, enter value "1000GB". Press return.
See that the value is "1,000 GB" (this is critical). It looks ok. I want it to mean 1 TB for this user.
There is a locale error here in how this number is going to get interpreted, of US vs European numbers and use of commas vs periods. Upon hitting Enter, NC has take the value I typed and interpreted it into something looks ok as a US number, but then it decides, because of the US vs European locale difference, that I entered 1.000 GB, and it give me a quota of 1 GB. I expect that many variations of this would produce the same failure.
Steps to reproduce
- create new user
- go to give them a custom quota value of 1000TB
- see that that 1000 has been changed to 1,000 -- that means something different between US and Europe. To me in the US it means one thousand, in Europe it means one exactly
- try uploading 2 GB of files. This will error out from exceeding quota, because the number I entered got modified by the software to a very different number, because there's a locale failure here somewhere.
Expected behavior
If I enter 1000, I should get 1000, not "1,000"
Nextcloud Server version
32
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
the config is the default that happens when you install Ubuntu. I haven't made any changes to that. whatever that install does is what I have in place. I don't know what web-server, database, etc. Whatever the defaults are are what I have.
List of activated Apps
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Nextcloud Signing status
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Nextcloud Logs
unknown. I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space
Additional info
I've just done a full reinstall so I can fix the regrettably bizarre business about the real size of the default LVM leaving a huge amount of disk as unallocated free space.
Having figured out the bug, and a workaround, I will be doing that now.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the new-user flow: open the custom quota field, enter 1000GB, and press Enter under the affected locale. Trace the quota value from that UI entry point through parsing and display, then verify that 1000 is retained as 1000 and that a user can upload within the resulting quota.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100