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

124 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+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?

382 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
+2 more
kaaz says

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

124 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+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
382 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
+2 more
kaaz says

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

124 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+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.

382 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
+2 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).

124 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+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?

382 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
+2 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

124 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+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.

by
by
by
by
by
by