Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with post_checkboxes type #32

Open
ghost opened this issue Feb 1, 2013 · 5 comments
Open

issue with post_checkboxes type #32

ghost opened this issue Feb 1, 2013 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 1, 2013

Warning: Illegal offset type in /home/u478232299/public_html/wp-includes/post.php on line 1097

array(
        'label' => 'Работы', // <label>
        'desc'  => 'Список работ.', // description
        'id'    =>  $prefix.'works_list', // field id and name
        'type'  => 'post_checkboxes', // type of field
        'post_type' => array('works_type') // post types to display, options are prefixed with their post type
    ),

file wp-icludes/posts.php lines 1081 through 1101:

function get_post_type_object( $post_type ) {
    global $wp_post_types;

    if ( empty($wp_post_types[$post_type]) )
        return null;

    return $wp_post_types[$post_type];
}
@tammyhart
Copy link
Owner

Where are you getting this error, on the back end or front end?

@ghost
Copy link
Author

ghost commented Feb 11, 2013

Right under the checkboxes of posts in admin (backend).

@ghost
Copy link
Author

ghost commented Feb 11, 2013

disappeared after i upgraded to git version

@ghost ghost closed this as completed Feb 11, 2013
@ghost ghost reopened this Feb 12, 2013
@ghost
Copy link
Author

ghost commented Feb 12, 2013

 SAUCE WordPress
appeared again!! maybe this is php version issue?

@wesdekoninck
Copy link

I was having the same issue, and was able to resolve it by removing this line from the meta_box.php case for 'post_checkboxes':

$post_type_object = get_post_type_object( $post_type );
echo '</ul> ' . $desc , ' &nbsp;<span class="description"><a href="' . admin_url( 'edit.php?post_type=' . $post_type . '">Manage ' . $post_type_object->label ) . '</a></span>';

And replacing it with this, effectively removing the "Manage" link and my error went away.

echo '</ul> ';

So it may have to do with the

get_post_type_object()
function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants