-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctype Links not updating #26041
Comments
Hi @ajiragroup, this issue is also happening in Version-14; grid_row.js:126 TypeError: Cannot read properties of undefined (reading 'name') ============================================ Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name') ============================================ Uncaught TypeError: Cannot read properties of undefined (reading '__checked') |
Hi @ajiragroup , To resolve this bug, please access the following file of the Frappe App (in your instance):- Please update this file with the added lines of code as per the attached file:- The following lines in bold were added to the attached "customize_form.js" file:- frappe.ui.form.on("DocType Link", { frappe.ui.form.on("DocType Action", { frappe.ui.form.on("DocType State", { @nabinhait @Nihantra-Patel please let me know whether I should submit a PR for this. |
Edited the frm.refresh_fields() statements above to add the specific fieldnames. |
Doctype Links not updating frappe#26041 frappe#26041
Doctype Links not updating frappe#26041 frappe#26041
Upon final testing, I realised that the frm.refresh_field() or frm.refresh_fields() are indeed redundant; |
Doctype Links not updating frappe#26041 frappe#26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name;
frappe#26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name;
In customize_form.js :- defined parent and parenttype as local variables in the event functions for child tables links, actions and states
…s on child-tables (#26344) * fix: Doctype Links not updating #26041 #26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name; * fix: Doctype Links not updating #26041 In customize_form.js :- defined parent and parenttype as local variables in the event functions for child tables links, actions and states * Revert "In customize_form.js :-" This reverts commit 6732f0a. * fix: Doctype Links not updating #26041 * style: amended spacing as per 'prettier' in precommit * style: added comma after last event definitions in child doctype, as per 'prettier' in precommit
…s on child-tables (#26344) * fix: Doctype Links not updating #26041 #26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name; * fix: Doctype Links not updating #26041 In customize_form.js :- defined parent and parenttype as local variables in the event functions for child tables links, actions and states * Revert "In customize_form.js :-" This reverts commit 6732f0a. * fix: Doctype Links not updating #26041 * style: amended spacing as per 'prettier' in precommit * style: added comma after last event definitions in child doctype, as per 'prettier' in precommit (cherry picked from commit b9f4845)
…s on child-tables (#26344) * fix: Doctype Links not updating #26041 #26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name; * fix: Doctype Links not updating #26041 In customize_form.js :- defined parent and parenttype as local variables in the event functions for child tables links, actions and states * Revert "In customize_form.js :-" This reverts commit 6732f0a. * fix: Doctype Links not updating #26041 * style: amended spacing as per 'prettier' in precommit * style: added comma after last event definitions in child doctype, as per 'prettier' in precommit (cherry picked from commit b9f4845)
…s on child-tables (#26344) (#26644) * fix: Doctype Links not updating #26041 #26041 In refresh_field(fieldname, txt) function of grid_row.js, added the comments :- // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables if (this.doc) field.docname = this.doc.name; * fix: Doctype Links not updating #26041 In customize_form.js :- defined parent and parenttype as local variables in the event functions for child tables links, actions and states * Revert "In customize_form.js :-" This reverts commit 6732f0a. * fix: Doctype Links not updating #26041 * style: amended spacing as per 'prettier' in precommit * style: added comma after last event definitions in child doctype, as per 'prettier' in precommit (cherry picked from commit b9f4845) Co-authored-by: Karan Wilson <48678570+karanwilson@users.noreply.github.com>
## [15.29.1](v15.29.0...v15.29.1) (2024-06-04) ### Bug Fixes * **address_query:** show search fields in description if set ([4db0b53](4db0b53)) * **address_query:** use title field if set ([01a00e3](01a00e3)) * allow creation of workspace based on desk role perms ([fb898f7](fb898f7)) * Auto Email Report not working when Add Total Row is enabled ([#26668](#26668)) ([e585657](e585657)) * Avoid concurrent TODO updates ([#26594](#26594)) ([cee96b9](cee96b9)) * bypass IP restriction for the methods required for our socketio backend ([42011c9](42011c9)) * **checkbox:** Fix checkbox size on small screens ([#26596](#26596)) ([#26612](#26612)) ([fc2a852](fc2a852)) * delete old user notification settings when merging users ([#26604](#26604)) ([#26619](#26619)) ([af1a47d](af1a47d)) * don't copy "Standard" on dashboard chart (backport [#26649](#26649)) ([#26651](#26651)) ([719522d](719522d)) * front-end bug in 'customize_form.js', triggered by delete actions on child-tables ([#26344](#26344)) ([b9f4845](b9f4845)), closes [#26041](#26041) [#26041](https://github.com/frappe/issues/26041) [#26041](#26041) * kanban filters fixes ([#26605](#26605)) ([#26610](#26610)) ([af7f550](af7f550)) * **link-preview:** Correct synchronization of preview data on change. ([#26641](#26641)) ([#26654](#26654)) ([c34c1d1](c34c1d1)) * **make_request:** don't blindly try to check the content-type ([2fc914f](2fc914f)) * **number_card:** ensure value is returned ([0a91f04](0a91f04)) * **UX:** multi-tab experience ([#26309](#26309)) ([#26646](#26646)) ([3e4fff7](3e4fff7)) ### Performance Improvements * memory leak on kanban refresh ([#26597](#26597)) ([#26599](#26599)) ([8b8a297](8b8a297)) * rearrange some frequent jobs ([#26591](#26591)) ([#26603](#26603)) ([d9b7d73](d9b7d73))
This issue has been resolved in Frappe version 15.29.1 and higher. |
Information about bug
I had added a doctype link to project doctype. Now I want to delete that link. When doing so, this happens:
1.mp4
Module
projects
Version
erpnext 15.16.2
frappe 15.17.1
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered: