Notice: Trying to get property of non-object in C:\ - My last head scratcher hopefully...

145 posts
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Located in Australia
+3 more
ThemeChills says

Hi everyone,

So here is the last error I am receiving in my debugging session…


Notice: Trying to get property of non-object in C:\paths\...\inc\shortcodes\shortcode-clearing.php on line 82

And here is the snippet of code where line 82 falls under, specifically on the $post->ID declaration.


        /* Set up the default variables. */
        $output = '';
        $column_classes = '';
        $fearued_class = '';

        /* Set up the default arguments. */
        $defaults = apply_filters(
            'req_clearing_defaults',
            array(
                'order'      => 'ASC',
                'orderby'    => 'menu_order ID',
                'id'         => $post->ID,
                'columns'    => 3,
                'size'       => 'full',
                'include'    => '',
                'exclude'    => '',
                'featured'   => ''
            )
        );

        $attr = shortcode_atts( $defaults, $attr );

Any idea?

386 posts
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
+3 more
kaaz says

Please paste full source code of that file(shortcode-clearing.php) here: http://pastebin.com/

145 posts
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Located in Australia
+3 more
ThemeChills says

Please paste full source code of that file(shortcode-clearing.php) here: http://pastebin.com/

That’s a cool little tool, never heard of it… here you go @kaaz.

http://pastebin.com/wjc40Mjz
386 posts
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
+3 more
kaaz says

Could you please explain purpose of [clearing] shortcode and use cases, Using this shortcode in editor, echos whole post content again

145 posts
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Located in Australia
+3 more
ThemeChills says

Could you please explain purpose of [clearing] shortcode and use cases, Using this shortcode in editor, echos whole post content again

Hi @kaaz,

So what this shortcode does is creates a grid using the foundation framework. This grid is referred to as “clearing”. You can see it in action here: http://themes.required.ch/docs/shortcodes/

Does that clarify things?

Update: The grid I’m referring to is the gallery. It comes with an inbuilt lightbox feature.

386 posts
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
+3 more
kaaz says

I’ve added two images in a post and used [clearing] shortcode. It outputs the images of current post as expected with grid without any error or notice(which you reported).

145 posts
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Located in Australia
+3 more
ThemeChills says

I’ve added two images in a post and used [clearing] shortcode. It outputs the images of current post as expected with grid without any error or notice(which you reported).

Could you share how you added these in your editor?

386 posts
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
+3 more
kaaz says

i58.tinypic.com/ephc46.jpg

Upload images for the current page/post but do not insert them into the post editor. Under media library tab “Uploaded to this page/post” images will be your grid gallery images

145 posts
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Located in Australia
+3 more
ThemeChills says

i58.tinypic.com/ephc46.jpg Upload images for the current page/post but do not insert them into the post editor. Under media library tab “Uploaded to this page/post” images will be your grid gallery images

Yeah I didn’t insert them in the page. Here is my screenshot as to how I included the grid.

http://cl.ly/image/3f0a2y3M2i1r


FYI – The other shortcode surround forms part of an external container.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by