Uncaught TypeError: e.startTracking is not a function when trying to open a M2O field before saving the parent
#25 geöffnet am 25.10.2018
Repository-Metriken
- Stars
- (2 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
From directus created by iKonrad : directus/directus#2023
Hi all
Thanks for the amazing library, I'm stoked on how flexible and versatile this tool is.
I'm having an issue with a Many to one relationship here.
Version Info
- Directus version and branch: 93ceb86f3171e7369d6bd376d2cd8c13024edd28
- PHP version: 7.1.12
- MySQL version: mysql Ver 14.14 Distrib 5.7.20
- Web server: Apache
- OS name and version: Ubuntu 16
Expected Behavior
Actual Behavior
So, let's say we have a User and Addresses tables.
On Addresses, I've added an INT field with a M2O relationship to the User, with an option to Add addresses and Choose from existing dynamically. The problem is when you want to create a new user, add a new address (saves just fine), then go back to the unsaved user and click on the Address again (without saving the user), the JavaScript will fail with the following error:

Steps to Reproduce
- Create a
Usertable - Create an
Addressestable - On
Addressestable, create an INT column and set it up as a M2O relationship to user - On
Usertable, create a One-to-many relationship and point toAddressestable. Also, make sure to haveAdd Button,Choose Button,Remove Buttonoptions selected in Interface options. - Now, go to the Users section and open the "New item" menu.
- Add a new address item in the menu, save the address to get back to the New user menu.
- Now, without hitting the save button for the user, click on the Address that you have just created.
Something worth mentioning: If, after the step 6, you saved the User item and opened it again, you could access the address property just fine.
Schema Dump, Logs, or Screenshots
No logs available as this is a JS issue.