# Database Status Draft not working

**URL:** <https://forum.getkirby.com/t/database-status-draft-not-working/21004>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 1, 2021, 10:41am UTC](https://forum.getkirby.com/t/database-status-draft-not-working/21004 "2021-02-01T10:41:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gork](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gork/32/8110_2.png) [@gork](https://forum.getkirby.com/u/gork)\
**Post date:** [February 1, 2021, 10:41am UTC](https://forum.getkirby.com/t/database-status-draft-not-working/21004/1 "2021-02-01T10:41:59Z")

</div>

Heya

I am using a MySQL setup for a list of videos.  
I’ve setup everything (hopefully) according to the cookbook, but I can’t seem to get the `draft` status working. It always shows `unlisted`

Any idea?  
I’ll post all necessary code below:

```auto
# video.yml
title: Video

options:
  changeSlug: false
  changeTitle: false

fields:
  status:
    label: Status
    type: text
    disabled: true

```

```auto
#models/videos.php
class VideosPage extends Kirby\Cms\Page
{
	public function children()
	{
		$videos = [];

		foreach (Db::select('videos') as $video) {
			$videos[] = [
				'slug' => $video->slug(),
				'num' => $video->status() === 'listed' ? 0 : null,
				'template' => 'video',
				'model' => 'video',
				'content' => [
					'title' => $video->title(),
					(..)
					'status' => is_null($video->status()) ? 'draft' : $video->status()
				]
			];
		}

		return Pages::factory($videos, $this);
	}
}

```

even setting `'status' => 'draft'` does not change the panel preview ☹

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/e/e3370036e6edc2a974198984414ac6482fe65175.png)

Functions in `model/video.php` are per the cookbook.  
Database has a column called `status` and some entries with `draft` in it

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/c/c0cb904cc125ab24f734369c80201ad4d27b8211.png)

Any hint as to what I am missing?

Thanks!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 1, 2021, 10:55am UTC](https://forum.getkirby.com/t/database-status-draft-not-working/21004/2 "2021-02-01T10:55:57Z")

</div>

Is the `isDraft()` method defined in your page model for the single page?

---

<div class="post-metadata">

**Author:** ![gork](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gork/32/8110_2.png) [@gork](https://forum.getkirby.com/u/gork)\
**Post date:** [February 1, 2021, 11:35am UTC](https://forum.getkirby.com/t/database-status-draft-not-working/21004/3 "2021-02-01T11:35:49Z")

</div>

ah… too easy!  
found it in the cookbook, added it and now it works

thank you!!
