Closed alekmlynek closed 2 years ago
Probably get more useful info out of it if you remix nova-flexible-content for dev:
cd vendor/whitecube/nova-flexible-content
npm i
composer update
npm --prefix='vendor/laravel/nova' ci
npm run dev
You're right, thanks. I got a log entry and am working on this to see if I've done something that is likely the case. It appears it's getting stuck on a null value somewhere.
[stacktrace]
\Flexible), 0)`
I've been able to get Flexfield working on a new installation of a recent installation of Nova 4. The project I'm working on was an upgrade from 3 -> 4, and perhaps this is the cause. Regardless, I've followed all the instructions. The weird part is, my "fields" function for this project uses NovaRequest while the other project that works, is using Illuminate Request even though the Nova docs say to use NovaRequest.
Super confused, unsure if it is related but will keep looking.
Yeah, in Nova 3 it required the request to be Illuminate\Http\Request
and therefore Laravel\Nova\Http\Requests\NovaRequest
would work, as it extends Illuminate request.
Nova 4 requires NovaRequest
and as such Request
wont work.
Thanks Ian. I think this is a red herring. For some reason Request DOES work on my other Nova 4 project, I think we moved the Nova views from another project, and maybe forgot to change these. Flex works on that one.
On THIS project, I'm using NovaRequest and Flex does not work. So I'm just all out confused.
I'll keep poking at this. I think I'm getting closer. The error message has changed to:
TypeError:
can't access property "_c", t._self is undefined
render nova-grid-system:1
zn runtime-core.esm-bundler.js:893`
So Flex no longer complains but the grid system is, even though I've tried turning it off. No Laravel log messages this time and flex doesn't show up.
Ok, that was it. codenco-dev/nova-grid-system is not compatible with FlexField. Thankfully, I was simply experimenting with it and forgot I had it installed. For some reason, I thought it was part of Nova, but removing it from Composer solved the issue.
Leaving full description incase anyone else runs into this:
Nova 4 (Laravel 9) is throwing this error:
TypeError: can't access property "_c", t._self is undefined
I've removed all other fields, and all layouts, to try and get this to work. This error is in all results.
I've not tested a fresh install, but my versions are: flexfield 1.0 laravel 9.12.1 nova 4.5.1