I just installed today Nextcloud on our server and on the user profile it is impossible to save phone numbers. Nextcloud send the error message:
“Unable to set invalid phone number✖”
It doesn’t seem to matter how you configure the format of the phone number. The software just rejects it.
This issue has also been reported here by another user:
I hope someone here could help me in the right direction on how to solve this issue.
Thank you very much in advance.
Anyone here that maybe could help me out with this please?
Well, there is a related bug report, unless there is more information or a fix, there is not much we can do here. Ref:
did you configure the
default_phone_region setting in your
config.php as suggested by the Admin overview page suggestions?
This setting came out of nowhere for me after upgrading to 21.0.1
Been so long since I looked at the Admin overview pages I’m going to have to find them again.
No we haven’t done that, (yet). But will that not also limit the phone field to accept one county?
We have employees from several different countries so it must accept different formats.
I’ve been digging a bit in the code and it looks like
- 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.
That’s quite a bummer and I would consider this a bug that should be reported on Github.
PS: the relevant code is this here:
This is indeed a bummer and quite counter productive thing. (Since the normal mode doesn’t work).
Thanks for looking into this @simonspa .
I guess there is not so much that can be done here.
The Nextcloud dev team needs to fix this bug (?) and until then we can only wait for it to happen, right?
As @nickvergessen pointed out, it actually accepts any international (valid!) number in addition to the local number of the configured region - this seems to work for me, could you confirm?
@simonspa thanks again.
I’ve added the setting and will test it shortly.
That work-around actually does the trick. I’ve tested and it works too.
Still the faulty default mode is something I think should be considered as a bug though and hopefully be fixed in a never version. Right?
Just my 5 cents.
The phone string syntax is important and this may be what is causing consternation after updating the config with your phone zone.
Example for US:
DOES NOT WORK: 3721231234
phone region has to be in capital letter
‘default_phone_region’ => ‘FR’,
how come this kind of settings can’t be set through the User Interface ?