[Resolved] Custom-Post-Type-Tax Post Meta Error in 3.0

Home Forums Support [Resolved] Custom-Post-Type-Tax Post Meta Error in 3.0

Home Forums Support Custom-Post-Type-Tax Post Meta Error in 3.0

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1471034
    Randall

    Hi,

    I’ve installed 3.0rc1 and GP Premium 1.12.0 On a development copy of my site. I had previously installed GP Premium 1.12.0 without issue, this issue occurred after installing 3.0 rc1.

    I am using a snippet that allows me to use a custom post type taxonomy in that post type’s meta along with one other custom meta item. The function is based on this post: #1284466

    With 3.0, I’m getting an “undefined index” error from debug that points to generatepress/inc/structure/post-meta.php on line 350.

    I’ve tried to figure out how to filter or hook into the new function “generate_disable_post_meta_items” at that location, but am not having much luck. And not sure if that is what is required?

    I’ve provided login details and a link to the snippet in private details.

    #1471955
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Thanks for reporting this!

    I believe I see the issue – any chance you can try the fix?

    If so, replace this on line 350 in post-meta.php:

    if ( ! apply_filters( $disable_filter_names[ $item ], $default_display ) ) {
        $items = array_diff( $items, array( $item ) );
    }

    With this:

    if ( isset( $disable_filter_names[ $item ] ) && ! apply_filters( $disable_filter_names[ $item ], $default_display ) ) {
        $items = array_diff( $items, array( $item ) );
    }

    Let me know ๐Ÿ™‚

    #1472025
    Randall

    No problem and yes, can confirm that fix works for me.

    Thanks Tom!

    #1472135
    Tom
    Lead Developer
    Lead Developer

    Awesome, thanks for letting me know! Really appreciate it ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.