Frontier Post
[resolved] Posts still in database (6 posts)

  1. holgerhubbs
    Posted 2 years ago #

    This bug caused quite some confusion.
    In general, what determines if posts are being shown in the WP Admin POST list?


  2. finnj
    Plugin Author

    Posted 2 years ago #


    I am not sure, but I expect that only valid posts with a known (valid) status are shown.

    More info: Codex

    If I execute the following query in my test DB

    SELECT post_status, count(*) FROM wpt_posts GROUP BY post_status

    I get this result

    post_status count(*)
    afventergennemlsning 1
    auto-draft 8
    draft 4
    inherit 177
    pending 8
    publish 83
    trash 1
    udgivet 3

    afventergennemlsning is the Danish translation of pending, and udgivet is the Danish translation of publish - None of these 4 posts are shown in the admin panel

  3. holgerhubbs
    Posted 2 years ago #

    How to call those posts?
    Are you aware of a plugin to fix this issue?
    Thank you

  4. finnj
    Plugin Author

    Posted 2 years ago #


    I have uploaded a fix to the Development version which you can download here: Development version

    * Install the development version (has version number 1.6.0)
    * Create a new page (you could name it status fix), and insert shortcode [frontier-status-fix]
    * Publish the page, and press View page.
    * Then you will see a list of posts with wrong status, and a link so you can edit the posts from Frontier, and set a valid status

    I suggest that you save the post with status Draft, and then delete it from the admin interface if needed.

  5. finnj
    Plugin Author

    Posted 2 years ago #

    A bit more info on the fix:
    * It a copy of the list showing My Posts with a modified query showing posts with non valid post_status
    * It can only be executed by an administrator
    * In the list there is a link so you can edit the post in front end (and thereby change the status)
    * It does not change anything in the background, you need to edit the post.

    I believe it is a secure way of doing it.

    The modified quesry:

    SELECT *
     FROM $wpdb->posts
     WHERE $wpdb->posts.post_status NOT IN ('auto-draft', 'draft', 'future', 'inherit','pending', 'publish', 'trash')"

    As an alternative you can change the status manually in myphpadmin (MySQL tool from your provider). The SQL to use to list the posts

    SELECT *
     FROM wp_posts
     WHERE wp_posts.post_status NOT IN ('auto-draft', 'draft', 'future', 'inherit','pending', 'publish', 'trash')"

    You must replace "wp_" with the appropriate prefix (can be found in wp-config.php)

    $table_prefix  = 'wp_';
  6. holgerhubbs
    Posted 2 years ago #

    Thank you ;-)
    Maybe to say "GREAT! No posts with wrong status".

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frontier Post
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic