Troubleshooting
My data isn't saving!
I've set up an Enso CRUD type. I've added the fields. It looks great! But when I click save the data isn't saved! What's wrong?
You've forgotten to add the field name to fillable on the model, haven't you.
Vue Loader not working
When compiling front-end assets you get something like this:
Module parse failed: /Users/me/vms/website/resources/assets/js/vendor/enso/crud/components/forms/section.vue Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
Make sure that the vue-loader npm module is installed. If it is, maybe try installing a newer version.
Images aren't showing in image upload fields
Rollback to vue2-dropzone v2.2.4. At some point we will need to update enso to work with later version. but for now:
yarn add [email protected]
Something's wrong with my Javascript in the admin area!
Nuke your
node_modules.rm -rf node_modulesReinstall everything.
yarn installRepublish assets.
php artisan vendor:publish --force --tag=assetsCross fingers.
Recompile everything.
npm run dev
DBAL doesn't like JSON columns
[Doctrine\DBAL\DBALException]
Unknown database type json requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.
This will happen when you are altering a table that contains json columns, even if you're not altering the json columns themselves. This is a known restriction with DBAL 2.5. Once we upgrade to PHP 7.1 we can use DBAL 2.6 and then the problem should go away. In the meantime we can use the patch suggested here but use the following config instead:
```php
//....
'types_mapping' => [
'json' => 'json_array',
],
```
Function name must be a string
You have probably missed a comma in a CRUD config. E.g.
(new TextField('email')),
(new TextField('phone')) // <-- There should be a comma here
(new TextareaField('address')),