frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.86k stars 7.33k forks source link

Black Comment being added on each save #18933

Closed ahmadpak closed 5 years ago

ahmadpak commented 5 years ago

Every time I save a document for example Customer a blank comment is added. This happens when editing custom doctypes.

image

desk.min.js:1 Traceback (most recent call last): File "/home/ahmad/erpnext12/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 271, in save return self._save(*args, **kwargs) File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 310, in _save self._validate() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 463, in _validate self._sanitize_content() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/base_document.py", line 661, in _sanitize_content sanitized_value = sanitize_html(value, linkify=df.fieldtype=='Text Editor') AttributeError: 'NoneType' object has no attribute 'fieldtype'

desk.min.js:1 Traceback (most recent call last): File "/home/ahmad/erpnext12/apps/frappe/frappe/app.py", line 60, in application response = frappe.api.handle() File "/home/ahmad/erpnext12/apps/frappe/frappe/api.py", line 55, in handle return frappe.handler.handle() File "/home/ahmad/erpnext12/apps/frappe/frappe/handler.py", line 21, in handle data = execute_cmd(cmd) File "/home/ahmad/erpnext12/apps/frappe/frappe/handler.py", line 56, in execute_cmd return frappe.call(method, frappe.form_dict) File "/home/ahmad/erpnext12/apps/frappe/frappe/init.py", line 1036, in call return fn(*args, *newargs) File "/home/ahmad/erpnext12/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 271, in save return self._save(args, kwargs) File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 310, in _save self._validate() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/document.py", line 463, in _validate self._sanitize_content() File "/home/ahmad/erpnext12/apps/frappe/frappe/model/base_document.py", line 661, in _sanitize_content sanitized_value = sanitize_html(value, linkify=df.fieldtype=='Text Editor') AttributeError: 'NoneType' object has no attribute 'fieldtype'

Don-Leopardo commented 5 years ago

+1. I have the same issue. Tried in Help Article

ahmadpak commented 5 years ago

Issue has been fixed in V12.1.1 please update @Don-Leopardo

Don-Leopardo commented 5 years ago

@MohammadAhmad1990 In my instance the blank comment is still being added. I'm in the last version of frappe and ERPNext. Can you check if it generates a new comment when you save the customer? Are you self hosted?