Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone number can't be set at user profile #25931

Closed
gr4ssi opened this issue Mar 4, 2021 · 11 comments
Closed

Phone number can't be set at user profile #25931

gr4ssi opened this issue Mar 4, 2021 · 11 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@gr4ssi
Copy link

gr4ssi commented Mar 4, 2021

Steps to reproduce

  1. Install Nextcloud 21.0.0
  2. try to set user phone numberin profile

Expected behaviour

It should save the phone number.

Actual behaviour

Error Message: Ungültige Telefonnummer kann nicht festgelegt werden

I used 017612345678 as a phone number...
then 0049712345678
then +49123456789
it all didn't work...

image

Server configuration

cloud server - installed via the nextcloud_production_install.sh script.
postgres / php 7.4 on ubuntu 20.04, 2 cpu's 4GB RAM

@gr4ssi gr4ssi added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 4, 2021
@hellblue
Copy link

hellblue commented Mar 4, 2021

I received the same message, but the phone number is still saved in my profile

@gr4ssi
Copy link
Author

gr4ssi commented Mar 5, 2021

The error miraculously disappeared after a day. Now I can enter the phone number just fine, no warnings. :-/

@HigH-HawK
Copy link

Someone reported this on the forums: https://help.nextcloud.com/t/unable-to-set-phone-number/111782

He however confirmed, that it does not save the phone number for him.

@simonspa
Copy link
Contributor

The issue lies in this piece of code:

https://github.com/nextcloud/server/blob/master/lib/private/Accounts/AccountManager.php#L94-L121

which essentially means:

  • the field only accepts phone numbers with country code (starting with + that is) if no default_phone_region is configured
  • the field only accepts phone numbers from the configured region if the default_phone_region is configured.

Especially the latter seems to be a string restriction because it essentially means all users of an instance have to be from the same country, or at {least|worse} their phone numbers have to be.

@simonspa
Copy link
Contributor

This is the original PR: #24486

@nickvergessen is there a way to allow multiple/all phone number regions?

@nickvergessen
Copy link
Member

I think the actual problem you are facing is #26370
The feedback was not cleared in between and after a successful save. Update to 21.0.1 and test again.

https://github.com/nextcloud/server/blob/master/lib/private/Accounts/AccountManager.php#L94-L121

it actually means:

  • the field only accepts phone numbers with country code (starting with + that is) if no default_phone_region is configured
  • the field accepts phone numbers with country code and phone numbers without country code from the configured region if the default_phone_region is configured.

@simonspa
Copy link
Contributor

Okay, I see, and I could reproduce this now. How about also accepting numbers starting with double-zero in case there is no region set? They also represent valid international-format phone numbers and should be allowed IMHO.

Also, when reading the documentation of libphonenumber to me it seems like using EN as default region is not the best way to go - maybe we should pass null as region in that case?

@nickvergessen
Copy link
Member

Well there is a warning in the admin section to add the default region, so not going to optimize the unset-case.
And as soon as you set a default phone region double-zero also works, so I think that's also already solved.

And as said, this issue would mostlikely not be here when the "failed" error would disappear on success which we solved with 21.0.1 already, so I will close this.

@BrokerT
Copy link

BrokerT commented Aug 8, 2023

This obviously has not been resolved still have an issue after just installing in 2023

@lukas-schaetzle
Copy link

lukas-schaetzle commented Oct 7, 2023

Same (with NC 27.1.2). Please reopen this issue.
I type in a number, a checkmark shows that it's valid but when I reload the page I see that the number has not been saved. default_phone_region is set to 'DE' in config file. Note, that I get no error message like shown above.

Edit: Actually it does work when I type in a real valid phone number and not just 1234 etc. But it's still confusing that the fake number showed the checkmark in the field after typing it in but then it did not save it...

@aurisnoctis
Copy link

aurisnoctis commented Aug 22, 2024

EDIT: The phone number is not visible in the second screenshot, but the phone symbol itself can be clicked - it links to tel:<phone number. So the below text isn't relevant to this issue.

Nextcloud version 29.0.5 (Nextcloud Hub 8), hosted by Webo

  1. phone number can be entered and is saved in profile (persistently visible when editing profile) ✔️
  2. phone number is not shown in profile view (when not in edit mode) ❌
  3. phone number is shown in system address book ✔️

How can the phone number be made visible in the profile?

➡️ Is this related to the problem here or should I open a new issue?

https://help.nextcloud.com/t/unable-to-set-phone-number/111782/8 suggests either ‘default_phone_region’ => ‘optional’, or ‘default_phone_region’ => ‘DE’, or maybe both (?).

Would setting any of this fix our problem that the phone number is set and visible in the system address book but currently not shown in the profile?

Thanks in advance 👍

Screenshots for the 3 points above

2024-08-22_171935_firefox


2024-08-22_171810_firefox


2024-08-22_171756_firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

8 participants