# isDraft function (content with database) not working anymore when upgrading to kirby4

**URL:** <https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748>\
**Category:** Questions\
**Tags:** v4\
**Created:** [May 31, 2024, 10:18am UTC](https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748 "2024-05-31T10:18:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmajort](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kmajort/32/11181_2.png) [@kmajort](https://forum.getkirby.com/u/kmajort)\
**Post date:** [May 31, 2024, 10:18am UTC](https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748/1 "2024-05-31T10:18:22Z")

</div>

Hi,  
I’m working with the code from this tutorial from the website.

> **[Content from a database](https://getkirby.com/docs/guide/virtual-content/content-from-database)**
>
> Create pages from a database and edit, add or delete entries in the Panel

But when i update my project to kirby4 the isDraft function is not working. It’s not possible to create a new item when i override this function.  
I think the $this-\>content() causes troubles at that point. Any one know how to fix this so that i can still use draft/unlisted/listed in my project.

```auto
public function isDraft(): bool
{
    return in_array($this->content()->status(), ['listed', 'unlisted']) === false;
}

```

---

<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:** [May 31, 2024, 10:26am UTC](https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748/2 "2024-05-31T10:26:47Z")

</div>

I’m aware of the issue ([Content from a database Error - #8 by texnixe](https://forum.getkirby.com/t/content-from-a-database-error/30821/8)), but haven’t managed to look into it yet.

---

<div class="post-metadata">

**Author:** ![kmajort](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kmajort/32/11181_2.png) [@kmajort](https://forum.getkirby.com/u/kmajort)\
**Post date:** [October 30, 2024, 10:36am UTC](https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748/3 "2024-10-30T10:36:11Z")

</div>

Hi,

I just wanted to kindly check if there’s been any progress on this issue.  
I need this function in some new projects and in projects i need to upgrade.

Thanks.

---

<div class="post-metadata">

**Author:** ![kmajort](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/kmajort/32/11181_2.png) [@kmajort](https://forum.getkirby.com/u/kmajort)\
**Post date:** [May 28, 2025, 2:21pm UTC](https://forum.getkirby.com/t/isdraft-function-content-with-database-not-working-anymore-when-upgrading-to-kirby4/31748/4 "2025-05-28T14:21:02Z")

</div>

Hi,

Any idea if this will be fixed in the future?

Or is there a way to remove the draft status in the change status box in the blueprint? If this is possible i could only work with only unlisted and public items.  
But when i try this i still see the draft radio button.

```auto
status:
 unlisted:
   label: unlisted
   text: Unlisted item
 listed:
   label: listed
   text: Public item

```
