Editing existing records in a module fails to load #2623
-
I have a Twill 2 install that works fine but one of the models that previously worked now doesn't and I've no idea why, it's a problem I've not seen before. Whenever you go in to edit an existing record you get the ajax loading dots appear and the edit page fails to load. The browser dev tools reveal that the first item (data) of the Twill store datatable is empty causing this error: Uncaught TypeError: Cannot read properties of undefined (reading 'STORE'). What could cause that ?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I resolved this, it was due to a function I was calling in the controller for my module failing. So for the record, I am using transformIndexItems() to create a new alias column in the listing page for this module which is a truncated version of an answer field which normally contains long values. I now use the Laravel Str::limit() to truncate the actual answer field and all is fine.
|
Beta Was this translation helpful? Give feedback.
I resolved this, it was due to a function I was calling in the controller for my module failing.
So for the record, I am using transformIndexItems() to create a new alias column in the listing page for this module which is a truncated version of an answer field which normally contains long values. I now use the Laravel Str::limit() to truncate the actual answer field and all is fine.