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

104 posts
  • Attended a Community Meetup
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
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?

373 posts
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
kaaz says

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

104 posts
  • Attended a Community Meetup
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
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
373 posts
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
kaaz says

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

104 posts
  • Attended a Community Meetup
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
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.

373 posts
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
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).

104 posts
  • Attended a Community Meetup
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
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?

373 posts
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Most Wanted Bounty Winner
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
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

104 posts
  • Attended a Community Meetup
  • Australia
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
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