The MU forums have moved to

Odd post_type = 'pos' issue (4 posts)

  1. musnake
    Posted 12 years ago #


    All plugins deactivated. Mu 1.5.1, PHP5

    After creating many categories, I created three test posts to attribute to various cat's. The posts did not display.

    Eventually, wp_1_posts.post_type showed a value of 'pos' not 'post' for all three posts. In phpmyadmin, I changed the 'pos' values to 'post' and the posts displayed on the home page. They did not however list on the admin/manage posts list (although the 'published' filter count showed '3'). Changing the post_type values back to 'pos' resulted in the posts being listed on the admin side (but not on the home.php).

    How odd. I searched for 'pos' in the code but found nothing. This seems like a simple gotcha' but I'm approaching 5 hours hahaaha! sigh.


  2. musnake
    Posted 12 years ago #

    More data...

    When I 'View Form Information' using FireFox's webdev sugar,

    I see that the post_type is set to 'pos' for existing posts only. The value is 'post' for new posts.

    Any ideas?

    Id	Name	Method	Action
    post	post	post	post.php
    Index	Id	Name	Type	Value	Label	Size	Maximum Length	State
    0	_wpnonce	_wpnonce	hidden	a3d9091a20
    1	_wp_http_referer hidden
    2	user-id	user_ID	hidden	1
    3	hiddenaction	action	hidden	editpost
    4	originalaction	originalaction	hidden	editpost
    5	post_author	post_author	hidden	2
    6	post_type	post_type	hidden	pos

    Where does the form get it's post information? The form exists in edit-form-advanced.php and I see that post.php contains ` $post = get_post_to_edit($post_ID);


    and following the trail back through get_post_to_edit is not yielding joy...

    I would appreciate someone teaching me how to set a trace/watch/breakpoint on post_type or better yet, showing me how to figure out the source/dependencies of the vars used by edit-form-advanced.php
    I've been inching my way through includes for a while now :)

  3. musnake
    Posted 12 years ago #


    After truncating the wp_1_posts and wp_1_postmeta tables and creating new posts...

    The post_type value is 'pos' for new posts in phpmyadmin as well... The posts are listed in the manage post list.

    How frustrating.

    There is a limited number of calls which set the value of post_type. Please, how would I nail down each and every one of these suckers?


  4. musnake
    Posted 12 years ago #

    Ok, I'm pretty sure I've found the ball park.

    A plugin called trim usernames. Toggling the activation status toggles the issue.

    The active ingredient seems innocent enough!

    $username = trim($username,' :\"\t');

    I'll look into it later. Moving on...

About this Topic