question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plus button missing in Connections

See original GitHub issue

Bildschirmfoto 2021-06-02 um 16 13 26

User: Administrator

Reproduce

For some DocTypes, the frm.refresh() function throws an error. For example, in ERPnext Item, the following:

script_manager.js:24 ƒ (frm) {
		if (frm.doc.is_stock_item) {
			frm.add_custom_button(__("Stock Balance"), function() {
				frappe.route_options = {
					"item_code": frm.doc.name
				}
				frappe.set_route("query-report"…
_handler @ script_manager.js:24
runner @ script_manager.js:100
(anonymous) @ script_manager.js:118
Promise.then (async)
(anonymous) @ dom.js:265
frappe.run_serially @ dom.js:263
trigger @ script_manager.js:132
(anonymous) @ form.js:447
Promise.then (async)
(anonymous) @ dom.js:265
frappe.run_serially @ dom.js:263
render_form @ form.js:437
trigger_onload @ form.js:387
refresh @ form.js:278
(anonymous) @ VM21411:1
undefined
form.js:1137 Uncaught (in promise) TypeError: Cannot read property 'parent' of undefined
    at FrappeForm.add_custom_button (form.js:1137)
    at refresh (item__js:105)
    at _handler (script_manager.js:22)
    at runner (script_manager.js:100)
    at script_manager.js:118

When an error happens, the plus buttons and custom buttons will no get rendered.

To reproduce, you can install this example app along with ERPNext

Observed

Plus (“+”) buttons missing. Hard to create records of connected DocTypes.

You could say that it’s normal that things don’t work after an error happens. But JS-errors happen quite often, even on the stable (version-13) branch. That the form (connections, custom buttons) becomes unusable in this case is quite a problem.

Expected

Plus (“+”) button next to each DocType in the “Connections” section.

Version

ERPNext: v13.4.1 (version-13) Frappe Framework: v13.4.1 (version-13)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
barredterracommented, Jun 3, 2021

@ankush thanks for trying! Meanwhile I was able to reproduce this and added detailed instructions.

0reactions
barredterracommented, Aug 30, 2022

Should be resolved. I notice that your erpnext version lags behind the frappe version. Maybe try upgrading both to the most recent release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing connect button on profile | LinkedIn Help
You won't see the Connect button on a member's profile if: You haven't confirmed your primary email, the email bounced, or new email...
Read more >
Missing plus/add button at contact apps - Apple Community
Try going into Settings > iCloud and toggle 'Contacts' off and on and see if you then get the '+' in the Contacts...
Read more >
Missing The “Connect” Button? It's There. - McMillion Consulting
If the connect button is missing, follow these two simple steps: Click the “More” button inside the person's profile.
Read more >
Dashboard: how to enable adding related record - ERPNext
I have managed to get the related DocTypes to show on the dashboard. However, how to I enable the “plus” button to directly...
Read more >
Troubleshooting the Pokémon GO Plus - Niantic Support
The indicator light on the Pokémon GO Plus will flash red and vibrate to indicate that the connection is lost. Verify that your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found