Erpnext: API does not accept names containing a '#'

Created on 7 Jun 2020  路  5Comments  路  Source: frappe/erpnext

grafik

It's fine for UI:
grafik

Remedy:

  1. Don't accept this kind of special characters in the first place
  2. If character is accepted, query via API should work when containing it.

This is 3 hrs worth of extra work for me (on a sunday) to workaround this S**T ...
Sorry, I'm loosing my patience.
Thank you very very much.

invalid question

Most helpful comment

This is not an issue with ERPNext. Please read up on URL fragments, as that part of the URL is not sent to the server by the browser at all. The only way to fix your "issue" would be to follow the industry standard and encode the URL before making a request.

judging by their over exagerated self esteem. And then you see the same stupid mistakes you know for more than 20 years now.

This industry standard for URL Fragments has existed since 2005, as defined in RFC3986. The URL needs to be percent-encoded before the request is made. There is nothing anybody can do about it, other than sending a url-encoded request.

All 5 comments

It's annoying stumbling over the same silly bugs since the late 90's.

Again and Again, as if predecessor generations hadn't made the same mistakes .... and learned from it.

Young developers know everything better - do everything better ... judging by their over exagerated self esteem. And then you see the same stupid mistakes you know for more than 20 years now.

I'm really P*ED.

Gotta do the same process all over again, simply to get rid of a silly little character.

Note this InvalidNameError added to v13 in April https://github.com/frappe/frappe/pull/10030

@clarkejj that name validation is for user name fields including first and last name. I don't think that's the cause in here.

@grolode, have you tried encoding the URL before passing it through the API? You do not need to get rid of anything.

This is not an issue with ERPNext. Please read up on URL fragments, as that part of the URL is not sent to the server by the browser at all. The only way to fix your "issue" would be to follow the industry standard and encode the URL before making a request.

judging by their over exagerated self esteem. And then you see the same stupid mistakes you know for more than 20 years now.

This industry standard for URL Fragments has existed since 2005, as defined in RFC3986. The URL needs to be percent-encoded before the request is made. There is nothing anybody can do about it, other than sending a url-encoded request.

Thanks very much for your especially patient informative notes Chinmay...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nabinhait picture nabinhait  路  4Comments

ioweb-gr picture ioweb-gr  路  4Comments

gbard picture gbard  路  4Comments

jboilesen picture jboilesen  路  3Comments

rmehta picture rmehta  路  3Comments