ERPNext Conference 2019* ERPNext.com Blog

V12.0.9 Doc Save Error - Comment added automatically


#1

A dummy comment gets added every time the save button is clicked for the document.


#2

This is happening for all the documents.


#3

I can confirm this

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’


#4

Yeah - deleting the comment can temporarily allow you to continue working in the document.

However this does not work for Events.


#5

Issue has been fixed in V12.1.1 please update
@Iulian_Olaru @govindsmenokee