Support » Plugin: Easy Photography Portfolio » Fatal error with Portfolio

  • Hello
    When I try to access to an entry of my portfolio, I have this message :
    “Fatal error: Uncaught Error: Call to a member function get() on null in /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php:288 Stack trace: #0 /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php(68): Photography_Portfolio\Core\Query->get_queried_object_id() #1 /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-content/plugins/photography-portfolio/compatibility/wordpress-seo.php(6): Photography_Portfolio\Core\Query->is_portfolio_home() #2 /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-includes/class-wp-hook.php(287): phort_add_yoast_seo_compatibility(0) #3 /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-includes/plugin.php(206): WP_Hook->apply_filters(0, Array) #4 /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-content/plugins/wordpress-seo/src/helpers/current-page-helper.php(99): apply_filters(‘wpseo_front in /homepages/2/d758667187/htdocs/clickandbuilds/ArtShooting/wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php on line 288”

    I think that I have this error since the last wordpress update.

    For information my version is : 5.4.1–fr_FR

    Thank you for feedback.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author pyronaur

    (@pyronaur)

    Hey there!

    Can you deactivate wordpress-seo plugin to see if there’s perhaps a conflict somewhere?

    You are right, if I deactivate Yoast SEO, Portfolio works.
    How can I fix this conflict ?

    Plugin Author pyronaur

    (@pyronaur)

    Not sure. I just installed the plugin and it works for me.

    I have a few questions:

    * Do you have any custom settings set?
    * Are the portfolio settings configured?
    * Is a page there set? Does it exist?
    * What are you using as your homepage?
    * Where exactly does the error appear?

    • This reply was modified 3 months, 1 week ago by pyronaur.

    I have the exact same issue. I’m still on WP 5.3.3, so maybe it’s not related to upgrading to 5.4, per OP. I did however install Yoast a couple of weeks ago, and started getting these errors after that, so seems like a clash between the two plugins. I’ll deactivate Yoast for a while, to see if that helps.

    robaa

    Plugin Author pyronaur

    (@pyronaur)

    @robaa Can you have a look a the questions above? I can’t reproduce the issue, so it’s likely that some setting is clashing, I just don’t know how to reproduce to fix this.

    Hello, it looks like I am having the same issue (https://wordpress.org/support/topic/plugin-clash-with-yoast/) and would like to help resolve this conflict. I have the same
    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 triggered by the call to the function $this->original_query->get('page_id') on line 288 of Query.php. I have tested this in an environment with only Easy Photography Portfolio (which I’ll just call EPP) and Yoast installed, but it is most easily detected for me with a third plugin (SG Optimizer) installed. Both EPP and Yoast play nicely with SG Optimizer by themselves, so there is no clash there; however, when both EPP and Yoast are installed, the SG Optimizer plugin cannot load properly.

    Thanks a lot for developing the plugin and for your help resolving this,
    Zoë

    Here are the responses to your questions:
    1. Settings:

    MAIN
    Portfolio Home Page: None
    In Portfolio Home Page: Show all Portfolio entries
    
    LAYOUT
    Single Portfolio Layout: Masonry
    
    POP-UP GALLERY SETTINGS
    Pop-up Gallery: PhotoSwipe (recommended)
    
    PhotoSwipe is recommended. However, if you need video support or gallery thumbnails, use lightGallery.
    
    TITLES & DESCRIPTIONS
    Show Archive Titles & Descriptions: Disable
    Album Subtitle: Disable
    Image Captions: Show only in pop-up galleries
    
    THEME COMPATIBILITY
    Wrapper CSS Classes: <blank>

    2. See above? I have the Portfolio menu, if that’s what you mean?

    3. There is no home page set.

    4. See 3.

    5. The error appears in php_errorlog, but as I mentioned it is very easily observed when using the SG Optimizer plugin, as it cannot load and immediately triggers the php error in the log file.

    UPDATE:
    It looks like it is related to not having a home page set. I edited is_portfolio_home() in wp-content/plugins/photography-portfolio/Photography_Portfolio/Core/Query.php to simply return FALSE (since I know I don’t have a home page set) and now it all works.

    • This reply was modified 1 month, 3 weeks ago by zoeyoffe.
    • This reply was modified 1 month, 3 weeks ago by zoeyoffe.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.