Support » Plugin: Slide Anything - Responsive Content / HTML Slider and Carousel » Trying to get property ‘ID’ of non-object

  • Resolved mikeywil

    (@mikeywil)


    Hi there – great plugin, so a big thank you. I hope this is a helpful piece of feedback…

    Previously, an issue was raised about Trying to get property ‘ID’ of non-object. I have stumbled across the same issue, but only in a specific situation…

    I’m seeing the following (with debug mode on), but only when looking at a backend admin page for the Pods plugin. The first four errors relate to the Slide Anything plugin, and the fifth one points at the GeneratePress theme.

    Notice: Trying to get property 'ID' of non-object in /Users/Michael/mampsites/ks-demo5/wp-content/plugins/slide-anything/php/slide-anything-admin.php on line 437
    
    Notice: Trying to get property 'ID' of non-object in /Users/Michael/mampsites/ks-demo5/wp-content/plugins/slide-anything/php/slide-anything-admin.php on line 438
    
    Notice: Trying to get property 'ID' of non-object in /Users/Michael/mampsites/ks-demo5/wp-content/plugins/slide-anything/php/slide-anything-admin.php on line 439
    
    Notice: Trying to get property 'ID' of non-object in /Users/Michael/mampsites/ks-demo5/wp-content/plugins/slide-anything/php/slide-anything-admin.php on line 440
    
    Notice: Trying to get property 'ID' of non-object in /Users/Michael/mampsites/ks-demo5/wp-content/themes/generatepress/inc/meta-box.php on line 52

    Here are the corresponding lines of code:

    $info_added = get_post_meta($post->ID, 'sa_info_added', true);
    $info_deleted = get_post_meta($post->ID, 'sa_info_deleted', true);
    $info_duplicated = get_post_meta($post->ID, 'sa_info_duplicated', true);
    $info_moved = get_post_meta($post->ID, 'sa_info_moved', true);
    if ( $blog_id && (int) $blog_id === (int) $post->ID ) {

    I raised this with GeneratePress and they’ve agreed it needs a fix.

    Perhaps this is something that could be looked at again?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author simonpedge

    (@simonpedge)

    Have you go WordPress Debug enabled?
    Here’s an article on how to enable/disable WP Debug:
    https://docs.themeisle.com/article/819-how-to-turn-on-off-debugging-in-wordpress

    I’ve disabled debug on my edgewebpages.com site, and I’m not getting these errors on the backend (or the front-end). This site is running WP ver 5.6 and my hosting is running PHP ver 7.3.26.

    What version of PHP and WP are are you running?
    You mentioned that you are only seeing this in a ‘specific situation’ – can you elaborate?

    • This reply was modified 3 months, 1 week ago by simonpedge.
    Thread Starter mikeywil

    (@mikeywil)

    Hi

    I noticed you’d suggested that for someone else, but I don’t believe that hiding the message (turning debugging off) fixes the problem.

    WP ver 5.6 and PHP 7.4.9.

    The specific situation is that it shows up on an admin page within the Pods plugin.

    Thanks for looking into this.

    Plugin Author simonpedge

    (@simonpedge)

    I can actually look into this on my “Slide Any Post” site (https://edgewebpages.com/sap/), where I’ve installed both PODS and Slide Anything.

    I do see the PHP notice on the PODS Admin page, but ONLY if I enable Debugging within the “wp-config.php” file.

    I’m not sure why Slide Anything code is being executed within the PODS Admin pages – that should not be the case & the Slide Anything admin PHP code should only be executing within “SA Sliders” menu in the Dashboard…

    Plugin Author simonpedge

    (@simonpedge)

    Ok, upgrade Slide Anything to the latest version just released, version 2.3.31 – this issue should now be resolved.

    Please let me know if it is and then I’ll close this topic.

    Thread Starter mikeywil

    (@mikeywil)

    Excellent news – 2.3.31 installed and the error message is no longer appearing.

    Many thanks for looking into this and solving it.

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