[wp-trac] [WordPress Trac] #55638: Undefined property: WP_Post_Type::$post_type

WordPress Trac noreply at wordpress.org
Mon May 2 08:51:14 UTC 2022


#55638: Undefined property: WP_Post_Type::$post_type
-------------------------------+------------------------------
 Reporter:  pienoz             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  5.9.3
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by pienoz):

 1°)  I have delete all code after get_header();  (i have a blank page) and
 the message is still there.

 2°) I have add

 error_log(print_r($post,true)); in post-template.php line 649

 the error_log content :

 [02-May-2022 08:42:41 UTC] WP_Post_Type Object
 (
     [name] => emission
     [label] => Épisodes
     [labels] => stdClass Object
         (
             [name] => Épisodes
             [singular_name] => épisode
             [add_new] => Ajouter un épisode
             [add_new_item] => Ajouter
             [edit_item] => Editer
             [new_item] => Ajouter
             [view_item] => Voir un épisode
             [view_items] => Voir les articles
             [search_items] => Rechercher un épisode
             [not_found] => Aucune épisode trouvé
             [not_found_in_trash] => Aucun épisode trouvé
             [parent_item_colon] =>
             [all_items] => Tous les épisodes
             [archives] => Tous les épisodes
             [attributes] => Attributs d’articles
             [insert_into_item] => Insérer dans la publication
             [uploaded_to_this_item] => Téléversés sur cette publication
             [featured_image] => Image mise en avant
             [set_featured_image] => Définir l’image mise en avant
             [remove_featured_image] => Supprimer l’image mise en avant
             [use_featured_image] => Utiliser comme image mise en avant
             [filter_items_list] => Filtrer la liste des articles
             [filter_by_date] => Filtrer par date
             [items_list_navigation] => Navigation de la liste des articles
             [items_list] => Liste des articles
             [item_published] => Publication mise en ligne.
             [item_published_privately] => Publication mise en ligne en
 privé.
             [item_reverted_to_draft] => Publication reconvertie en
 brouillon.
             [item_scheduled] => Publication planifiée.
             [item_updated] => Publication mise à jour.
             [item_link] => Lien d’article
             [item_link_description] => Un lien vers une publication.
             [menu_name] => Épisodes
             [name_admin_bar] => épisode
         )

     [description] =>
     [public] => 1
     [hierarchical] =>
     [exclude_from_search] =>
     [publicly_queryable] => 1
     [show_ui] => 1
     [show_in_menu] => 1
     [show_in_nav_menus] => 1
     [show_in_admin_bar] => 1
     [menu_position] => 20
     [menu_icon] => dashicons-megaphone
     [capability_type] => page
     [map_meta_cap] => 1
     [register_meta_box_cb] =>
     [taxonomies] => Array
         (
         )

     [has_archive] => 1
     [query_var] => emission
     [can_export] => 1
     [delete_with_user] =>
     [template] => Array
         (
         )

     [template_lock] =>
     [_builtin] =>
     [_edit_link] => post.php?post=%d
     [cap] => stdClass Object
         (
             [edit_post] => edit_page
             [read_post] => read_page
             [delete_post] => delete_page
             [edit_posts] => edit_pages
             [edit_others_posts] => edit_others_pages
             [delete_posts] => delete_pages
             [publish_posts] => publish_pages
             [read_private_posts] => read_private_pages
             [read] => read
             [delete_private_posts] => delete_private_pages
             [delete_published_posts] => delete_published_pages
             [delete_others_posts] => delete_others_pages
             [edit_private_posts] => edit_private_pages
             [edit_published_posts] => edit_published_pages
             [create_posts] => edit_pages
         )

     [rewrite] => Array
         (
             [slug] => emission
             [with_front] => 1
             [pages] => 1
             [feeds] => 1
             [ep_mask] => 1
         )

     [show_in_rest] => 1
     [rest_base] =>
     [rest_namespace] => wp/v2
     [rest_controller_class] =>
     [rest_controller] =>
     [ID] => 0
     [filter] => raw
 )

 [02-May-2022 08:42:41 UTC] PHP Warning:  Undefined property:
 WP_Post_Type::$post_type in /mnt/data/web-test/fr.sudradio.www/wp-includes
 /post-template.php on line 651

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55638#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list