[wp-trac] [WordPress Trac] #57147: custom post types no longer saving/retrieving correctly

WordPress Trac noreply at wordpress.org
Fri Nov 18 15:15:37 UTC 2022


#57147: custom post types no longer saving/retrieving correctly
-------------------------------+------------------------------
 Reporter:  wellituser         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  6.1
 Severity:  major              |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> Following the 6.1 update my custom post type feature is no longer
> retrieving the meta data for the saved post in the WordPress dashboard
> area. It only stores the title and does not save/retrieve any custom
> field data. Here are the opening lines from each key part:
>
> ***
> register_post_type( 'cal_loans',
>         array()
>
> ***
>
> function cd_meta_box_cb() {
>     global $post;
>
>     $values = get_post_custom( $post->ID );
>
> ***
>
> add_action( 'save_post', 'cd_meta_box_save' );
>
> function cd_meta_box_save( $post_id )
> {
>
> ***
>
> This was working previously up to 6.0.3

New description:

 Following the 6.1 update my custom post type feature is no longer
 retrieving the meta data for the saved post in the WordPress dashboard
 area. It only stores the title and does not save/retrieve any custom field
 data. Here are the opening lines from each key part:
 {{{
 ***
 register_post_type( 'cal_loans',
         array()

 ***

 function cd_meta_box_cb() {
     global $post;

     $values = get_post_custom( $post->ID );

 ***

 add_action( 'save_post', 'cd_meta_box_save' );

 function cd_meta_box_save( $post_id )
 {

 ***
 }}}
 This was working previously up to 6.0.3

--

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


More information about the wp-trac mailing list