Closed 1stevengrant closed 1 month ago
What's the output of php please support:details
?
Environment
Application Name: Local Platform
Laravel Version: 10.48.9
PHP Version: 8.3.4
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: local.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Scout: algolia
Session: file
Sentry
Enabled: MISSING DSN
Environment: local
Laravel SDK Version: 3.8.2
PHP SDK Version: 3.22.1
Release: NOT SET
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: NOT SET
Sample Rate Profiling: NOT SET
Send Default PII: DISABLED
Statamic
Addons: 1
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.0.2 PRO
Statamic Addons
statamic/eloquent-driver: 4.0.0
Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: file
Revisions: file
Taxonomies: file
Terms: eloquent
API endpoint for a taxonomy works swell.
Before I go digging into it is there any chance you've got a cached api response? It defaults to caching for 60 minutes, so if you clear the artisan cache it should give you a fresh response.
Thanks Ryan, should have said that I already cleared caches and issue still persisted.
I'm not able to see any reason for this not to be working to be honest - I've tested a couple of v5 installs and they seem to work fine. Is it possible to get access to this site, or for you to give Statamic support access?
Hi,
I'm running into the same issue.
One thing I've noticed is that collections that don't use the publish dates option don't return any data, while my collections that do use the publish dates option seem to work fine.
Digging in a bit I can see it generates the following query with a date condition, but the date
for my entries is null
since it doesn't use the publish date option.
select * from `entries` where `collection` = ? and `published` = ? and ((`collection` = ? and `date` < ?))
Maybe that helps a little?
@edmundayris thats really helpful, thank you. If you're right, then this PR (or whatever replaces it) should help
I can't reproduce this. Could someone please provide us with a site that has this issue?
Sure @jasonvarga - I'll get a repo up.
here's an example repo with sqlite db
Hi,
I'm running into the same issue.
One thing I've noticed is that collections that don't use the publish dates option don't return any data, while my collections that do use the publish dates option seem to work fine.
Digging in a bit I can see it generates the following query with a date condition, but the
date
for my entries isnull
since it doesn't use the publish date option.select * from `entries` where `collection` = ? and `published` = ? and ((`collection` = ? and `date` < ?))
Maybe that helps a little?
can confirm this is the case. If I enable date publishing on the collections, they return fine
I think you can workaround it by removing these lines:
(Or making them both public
)
Have the eloquent driver working in terms of being able to manage and see content in the CP.
I did have to update the entries array to
'model' => \Statamic\Eloquent\Entries\UuidEntryModel::class,
in order to create without an error.All well and good.
However, when I attempt to hit our content API
/content-api/collections/events/entries
thedata
array is empty.I thought this might be due to the collections using the file driver and entries using the eloquent driver but even having both set to eloquent, yields the same result.
If I change both to
file
then the API behaves as expected.Here's the API config
and here's the eloquent driver config