Safari - Notice: Trying to get property of non-object... post-template.php on line 656

310 Views Asked by At

I'm having an issue with the navigation on one of my websites.

http://2b1.209.myftpupload.com/search/

Notice: Trying to get property of non-object in /home/content/a2pewpnaspod04_data02/10/41376210/html/wp-includes/post-template.php on line 656 class="archive page-template-default page page-id-9223372036854775807 mhmm-basic using-mhmm et_button_icon_visible et_pb_button_helper_class et_fullwidth_nav et_fixed_nav et_show_nav et_cover_background et_pb_gutter osx et_pb_gutters2 et_primary_nav_dropdown_animation_fade et_secondary_nav_dropdown_animation_fade et_pb_footer_columns4 et_header_style_left et_pb_svg_logo et_pb_pagebuilder_layout et_smooth_scroll et_full_width_page et_divi_theme et-db">

I'm getting this error and I believe it's breaking the responsive CSS in the nav/header.

This only happens on pages that have the Showcase IDX Listings or Search. These are templates that are dynamically generated. Not actual WordPress Pages or Posts. I haven't been able to find what exactly is breaking the CSS.

Check out the other pages that don't have the Showcase IDX Listing to see how the navigation should look/work: http://2b1.209.myftpupload.com/contact/

I have copied the LIVE site to a staging server where I'm using the Divi Theme (not a child), the Showcase IDX plugin, and the Mhmm. – Mighty Header & Menu Maker plugin so I can make sure there's not some other plugin conflict.

I've also tried different PHP versions on the GoDaddy Server. 5.6 - 7.2

I believe there's something different between the Showcase IDX Pages and the regular WordPress Pages.

The WordPress code in 'wp-includes/post-template.php' on line 656 may provide a hint. I've noticed the Showcase IDX pages have a class in the body called 'archive'.

    } elseif ( is_page() ) {
        $classes[] = 'page';

        $page_id = $wp_query->get_queried_object_id();

        $post = get_post($page_id);

        $classes[] = 'page-id-' . $page_id;

        if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) {
            $classes[] = 'page-parent';
        }

        if ( $post->post_parent ) {
            $classes[] = 'page-child';
            $classes[] = 'parent-pageid-' . $post->post_parent;
        }
    }

What would be the reason for the php notice in Safari?

Would this notice cause the CSS to break, not be seen by Safari?

Any insight or suggestions on how to solve this issue would be greatly appreciate. I'm running out of ideas here.

Thanks! Jackson

1

There are 1 best solutions below

0
On

Got this resolved. Showcase IDX needed a specific page defined. So I just had to create a page called Search and add the [showcase_idx] shortcode. Easy enough. Only took 6 hours of craziness to find this out.