I try to create new user, after Save form, i get issue “Please Set the Document Name”.
Anyone can help to solved this issue?
Thankyou
I try to create new user, after Save form, i get issue “Please Set the Document Name”.
Anyone can help to solved this issue?
Thankyou
We tested in v15 latest, we haven’t found this type of issue.
If you version is not updated, then update it or migrate the site and check it.
version already up to date.
The problem is only on the site cause in another sites it’s no problem.
response is:
"exception": "frappe.exceptions.ValidationError: Please set the document name",
"exc_type": "ValidationError",
"exc": "[\"Traceback (most recent call last):\\n File \\\"apps/frappe/frappe/app.py\\\", line 110, in application\\n response = frappe.api.handle(request)\\n File \\\"apps/frappe/frappe/api/__init__.py\\\", line 49, in handle\\n data = endpoint(**arguments)\\n File \\\"apps/frappe/frappe/api/v1.py\\\", line 36, in handle_rpc_call\\n return frappe.handler.handle()\\n File \\\"apps/frappe/frappe/handler.py\\\", line 49, in handle\\n data = execute_cmd(cmd)\\n File \\\"apps/frappe/frappe/handler.py\\\", line 85, in execute_cmd\\n return frappe.call(method, **frappe.form_dict)\\n File \\\"apps/frappe/frappe/__init__.py\\\", line 1716, in call\\n return fn(*args, **newargs)\\n File \\\"apps/frappe/frappe/utils/typing_validations.py\\\", line 31, in wrapper\\n return func(*args, **kwargs)\\n File \\\"apps/frappe/frappe/desk/form/save.py\\\", line 39, in savedocs\\n doc.save()\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 335, in save\\n return self._save(*args, **kwargs)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 357, in _save\\n return self.insert()\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 313, in insert\\n self.run_post_save_methods()\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 1125, in run_post_save_methods\\n self.run_method(\\\"on_update\\\")\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 959, in run_method\\n out = Document.hook(fn)(self, *args, **kwargs)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 1319, in composer\\n return composed(self, method, *args, **kwargs)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 1301, in runner\\n add_to_return_value(self, fn(self, *args, **kwargs))\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 956, in fn\\n return method_object(*args, **kwargs)\\n File \\\"apps/frappe/frappe/core/doctype/user/user.py\\\", line 204, in on_update\\n self.send_password_notification(self.__new_password)\\n File \\\"apps/frappe/frappe/core/doctype/user/user.py\\\", line 356, in send_password_notification\\n self.send_welcome_mail_to_user()\\n File \\\"apps/frappe/frappe/core/doctype/user/user.py\\\", line 440, in send_welcome_mail_to_user\\n self.send_login_mail(\\n File \\\"apps/frappe/frappe/core/doctype/user/user.py\\\", line 480, in send_login_mail\\n frappe.sendmail(\\n File \\\"apps/frappe/frappe/__init__.py\\\", line 789, in sendmail\\n return builder.process(send_now=now)\\n File \\\"apps/frappe/frappe/email/doctype/email_queue/email_queue.py\\\", line 704, in process\\n q = EmailQueue.new({**queue_data, **{\\\"recipients\\\": recipients}}, ignore_permissions=True)\\n File \\\"apps/frappe/frappe/email/doctype/email_queue/email_queue.py\\\", line 99, in new\\n doc.insert(ignore_permissions=ignore_permissions)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 284, in insert\\n self.set_new_name(set_name=set_name, set_child_names=set_child_names)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 494, in set_new_name\\n set_new_name(self)\\n File \\\"apps/frappe/frappe/model/naming.py\\\", line 164, in set_new_name\\n set_name_from_naming_options(autoname, doc)\\n File \\\"apps/frappe/frappe/model/naming.py\\\", line 204, in set_name_from_naming_options\\n _prompt_autoname(autoname, doc)\\n File \\\"apps/frappe/frappe/model/naming.py\\\", line 523, in _prompt_autoname\\n frappe.throw(_(\\\"Please set the document name\\\"))\\n File \\\"apps/frappe/frappe/__init__.py\\\", line 600, in throw\\n msgprint(\\n File \\\"apps/frappe/frappe/__init__.py\\\", line 565, in msgprint\\n _raise_exception()\\n File \\\"apps/frappe/frappe/__init__.py\\\", line 516, in _raise_exception\\n raise exc\\nfrappe.exceptions.ValidationError: Please set the document name\\n\"]",
"_server_messages": "[\"{\\\"message\\\": \\\"Newly created user <strong>nanang@gmail.com</strong> has no roles enabled.\\\", \\\"title\\\": \\\"No Roles Specified\\\", \\\"indicator\\\": \\\"orange\\\", \\\"primary_action\\\": {\\\"label\\\": \\\"Add Roles\\\", \\\"client_action\\\": \\\"frappe.set_route\\\", \\\"args\\\": [\\\"Form\\\", \\\"User\\\", \\\"nanang@gmail.com\\\"]}}\", \"{\\\"message\\\": \\\"Please set the document name\\\", \\\"title\\\": \\\"Message\\\", \\\"indicator\\\": \\\"red\\\", \\\"raise_exception\\\": 1, \\\"__frappe_exc_id\\\": \\\"46dd568ef88ba017e523462665fee974b7f9f6f732540ed5350e7143\\\"}\"]"
}
Then any customization is added so check it. otherwise, migrate the site and check it.
Hi,
You might send mail to user when user is getting generated
Please check that customization, that should work “after insert” not on validate or before validate
After migrate still get issue,but now after unchecklist “send welcoming email” it’s work.
Okay thankyou, it’s work