Open zghib opened 4 years ago
Do you have the source code of your custom interface somewhere? Based on the error, it looks like it's trying to read from permissions that don't exist
PTAL https://github.com/zghib/directus-extensions commits per my steps
One more thing it appears in Permissions
This is interesting, I'm having the same issue as well. I tried copying the existing status interface without changes and still received the error.
I've noticed that adding an additional field that uses the "stock" status interface eliminates the error. So essentially two status fields, one with the custom interface and one with the stock one, works. Not really a solution that I'm resorting to at this point, but it's an additional clue.
My errors are coming from the routes/item.vue file.
The first error is coming from this section in the permission computed method:
if (this.status) { return permission.statuses[this.status]; }
"permission" was defined via this:
const permission = this.$store.state.permissions[this.collection];
@rijkvanzanten I know you're busy with v9 and life, but figured you might have an idea what the issue is based on these clues? I'm happy to work on the fix, if you have any ideas.
@ryanrobertsname Does your status interface have a status_mapping for options? Both app and API try to use the status mapping defined in the interface's options in order to extract what's permitted and what isn't.
I know you're busy with v9 and life
Absolutely 😁 Coming together nicely though! (v9 that is, though life isn't too bad now either)
@rijkvanzanten yeah it does, I literally just copied the stock status interface, renamed it and loaded it in the extensions folder.
Thanks for your feedback, I'll poke around a bit more and see if I can dig up anything.
Thanks for the work on v9, excited for it!
Hi everybody. I'm trying to show Status-field as dropdown in Directus 8.6.2 per docs https://docs.directus.io/guides/status.html#custom-status-interfaces
My steps to reproduce:
vue.runtime.esm.js:1888 TypeError: Cannot read property 'draft' of undefined at a.permission (item.vue:513) at nr.get (vue.runtime.esm.js:4479) at nr.evaluate (vue.runtime.esm.js:4584) at a.permission (vue.runtime.esm.js:4836) at a.se (item.vue?bd7a:1) at vue-composition-api.module.js:604 at te (vue-composition-api.module.js:565) at a.t.render (vue-composition-api.module.js:604) at a.e._render (vue.runtime.esm.js:3548) at a.r (vue.runtime.esm.js:4066)
Any help?