edalzell / statamic-feed

Statamic Addon to create Atom/JSON feeds
MIT License
3 stars 0 forks source link

Feed pulls through draft/unpublished articles #4

Closed benfurfie closed 5 years ago

benfurfie commented 5 years ago

The addon is currently pulling through unpublished/draft entries from collections. In theory, it should be checking the published status before buildng the array of items.

edalzell commented 5 years ago

@benfurfie can you verify this fixes your issue? Line 59 in FeedController.php:

        $this->entries = EntryAPI::whereCollection(array_get($config, 'collections', []))
            ->removeUnpublished()
            ->removeFuture()
            ->multisort('date:desc|title:asc')
            ->limit(20);