eloquent-driver icon indicating copy to clipboard operation
eloquent-driver copied to clipboard

Query params on content API broken

Open marcusand opened this issue 4 years ago • 2 comments

Hi!

After migrating my existing data to the db, query params on the content API stoped working. For example, when I try to set fields=id,title,slug I am getting

local.ERROR: Call to a member function cascade() on null {"exception":"[object] (Error(code: 0): Call to a member function cascade() on null at /Volumes/Daten/meso/statamic-v3/vendor/statamic/cms/src/Entries/Entry.php:705)

Setup: Statamic 3.1.9 Pro Laravel 7.30.4 PHP 8.0.3 statamic/eloquent-driver 0.1.1

Any ideas?

marcusand avatar Apr 21 '21 10:04 marcusand

Got this error too

shirowayfy avatar Feb 25 '22 19:02 shirowayfy

This is the same as #26, as I said there:

It works fine for me on v1, as long as one of the fields is collection... if you dont select it then you dont get the blueprint, so it throws an error when trying to augment fields.

So either we update the code to always select collection, or we just make people aware they need to?

ryanmitchell avatar Sep 16 '22 06:09 ryanmitchell