Skip to content

Fatal error on Pages/Posts list: PostModel::load() Argument #1 ($id) must be of type int, null given #1705

Closed

Description

@michaelerbe74-alt

Bug description
On the Pages (and likely Posts) admin list screen, the "Future Action" column
(expirationdate) throws a fatal error for every published page, making the
entire list table unrenderable. Draft posts are unaffected — only published
ones trigger it.

Error
PublishPress\Future\Modules\Workflows\Models\PostModel::load(): Argument #1
($id) must be of type int, null given, called in
.../post-expirator/src/Modules/Workflows/Controllers/PostsList.php on line 102

Preceded by:
Warning: Attempt to read property "ID" on null in
.../post-expirator/src/Modules/Workflows/Controllers/PostsList.php on line 102

Environment

  • PublishPress Future: 4.10.5
  • WordPress: 7.1
  • PHP: 8.2.33
  • Affects: every published page in the site (86/86 tested), 0 drafts affected

Steps to reproduce

  1. On a site with published pages, go to Pages → All Pages, filtered to "Published".
  2. Fatal error occurs while rendering the "Future Action" column for each row.

Expected behavior
The Future Action column should render normally (or show "—") for posts
without a scheduled action, instead of passing a null post ID into
PostModel::load().

Workaround
Deactivating the plugin restores the list view. Confirmed via direct testing
that do_action('manage_pages_custom_column', 'expirationdate', $post_id)
throws this error for every published page on the site, while working fine
(no output) for draft posts — suggesting PostsList::managePostsCustomColumn()
at line 102 is not receiving/resolving the post ID correctly in some cases
tied to published status.

Activity

  1. added this to the 4.11.3 milestone on Oct 23, 2026
  2. andergmartins commented on Oct 23, 2026

    @andergmartins
    Member

    Thanks for the report @michaelerbe74-alt

  3. added
    confirmed bugThe reporter has tested and confirmed on more than 1 site
    and removed
    unconfirmed bugThis needs more testing. Can often be used when a member of the public posts.
    on Oct 23, 2026
  4. added a commit that references this issue on Oct 23, 2026
    2cb01bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions