• Hello, I wonder if you can help me. I have a few php errors on my site causing issues. After some investigating it looks like ‘easy photography portfolio’ is clashing with yoast, and when that combination is active it messes with SG Optimister causing it not to save any settings.

    PHP Fatal error: Uncaught Error: Call to a member function get() on null in /home/customer/www/zoealexandraphotography.com/public_html/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php:288
    Stack trace:
    #0 /home/customer/www/zoealexandraphotography.com/public_html/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php(68): Photography_Portfolio\Core\Query->get_queried_object_id()
    #1 /home/customer/www/zoealexandraphotography.com/public_html/wp-content/plugins/photography-portfolio/compatibility/wordpress-seo.php(6): Photography_Portfolio\Core\Query->is_portfolio_home()
    #2 /home/customer/www/zoealexandraphotography.com/public_html/wp-includes/class-wp-hook.php(287): phort_add_yoast_seo_compatibility(0)
    #3 /home/customer/www/zoealexandraphotography.com/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(0, Array)
    #4 /home/customer/www/zoealexandraphotography.com/public_html/wp-content/plugins/wordpress-seo/src/helpers/current-page-helper.php(99): apply_filters(‘wpseo in /home/customer/www/zoealexandraphotography.com/public_html/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php on line 288

Viewing 1 replies (of 1 total)
  • Yes, it clashes with Yoast SEO, but only if you try to edit a post in the backend in my installation.
    I fixed it by changing the method to:

            protected function get_queried_object_id() {
    
                    $id = (int) get_queried_object_id();
    
                    if ( ! $id ) {
                            if(!is_null($this->original_query)){
                                $id = (int) $this->original_query->get( 'page_id' );
                            }
                            else{
                                    $id=0;
                            }
                    }
    
                    return $id;
            }

    Had no impact on my site so far

    • This reply was modified 4 years, 4 months ago by kbueltemann.
Viewing 1 replies (of 1 total)
  • The topic ‘Plugin Clash with Yoast’ is closed to new replies.