bootstrapwp-Twitter-Bootstrap-for-WordPress icon indicating copy to clipboard operation
bootstrapwp-Twitter-Bootstrap-for-WordPress copied to clipboard

function bootstrapwp_autoset_featured_img

Open Interned opened this issue 12 years ago • 10 comments

Hi,

I don't know if I'm the only one who gets issue from that function but anytime I want to change the template file for a page in the back-end, I've got php warnings refered to the function bootstrapwp_autoset_featured_img, specifically these lines : $already_has_thumb = has_post_thumbnail($post->ID); $attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); set_post_thumbnail($post->ID, $attachment_id); with "Notice: Trying to get property of non-object" and : Notice: Trying to get property of non-object in .../wordpress/wp-includes/post.php on line 5186 Notice: Trying to get property of non-object in .../wordpress/wp-includes/post.php on line 4912 Notice: Trying to get property of non-object in .../wordpress/wp-includes/post-template.php on line 30

Interned avatar Apr 20 '12 09:04 Interned

What version of WordPress are you running? And is this still an issue?

rachelbaker avatar Jun 21 '12 12:06 rachelbaker

I'm having the same issues. Running a brand new vanilla install of 3.4.1

AaronHolbrook avatar Jun 29 '12 21:06 AaronHolbrook

Thanks for the information, Aaron. Does this happen only when trying to change a page/post template?

rachelbaker avatar Jun 29 '12 21:06 rachelbaker

I was just getting it when I went to Appearance -> Menus for the very first time and added a menu.

Also - was getting a bunch of errors on the home page right after installation. Had something to do with a walker class or something, I'll look later.

Aaron

On Jun 29, 2012, at 4:22 PM, Rachel Baker wrote:

Thanks for the information, Aaron. Does this happen only when trying to change a page/post template?


Reply to this email directly or view it on GitHub: https://github.com/rachelbaker/bootstrapwp-Twitter-Bootstrap-for-WordPress/issues/46#issuecomment-6678531

AaronHolbrook avatar Jun 29 '12 21:06 AaronHolbrook

Aaron, are you running PHP 5.4? I think that is issue.

rachelbaker avatar Jun 29 '12 21:06 rachelbaker

Running 5.3.6

Aaron

On Jun 29, 2012, at 4:48 PM, Rachel Baker wrote:

Aaron, are you running PHP 5.4? I think that is issue.


Reply to this email directly or view it on GitHub: https://github.com/rachelbaker/bootstrapwp-Twitter-Bootstrap-for-WordPress/issues/46#issuecomment-6679090

AaronHolbrook avatar Jun 29 '12 21:06 AaronHolbrook

Thanks, I will check it out this weekend.

rachelbaker avatar Jun 29 '12 22:06 rachelbaker

Both php errors are fixed in this commit on the 1-WIP branch: https://github.com/rachelbaker/bootstrapwp-Twitter-Bootstrap-for-WordPress/commit/c3b607a905242d9450a60cde9c1d46f78a069dbc

rachelbaker avatar Jul 06 '12 02:07 rachelbaker

Awesome, will have to test it out

AaronHolbrook avatar Jul 06 '12 03:07 AaronHolbrook

Oops, looks like there are still errors on the "add new" post or page screens.

Looking into if this is fixable.

rachelbaker avatar Jul 07 '12 16:07 rachelbaker