bootstrapwp-Twitter-Bootstrap-for-WordPress
bootstrapwp-Twitter-Bootstrap-for-WordPress copied to clipboard
function bootstrapwp_autoset_featured_img
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
What version of WordPress are you running? And is this still an issue?
I'm having the same issues. Running a brand new vanilla install of 3.4.1
Thanks for the information, Aaron. Does this happen only when trying to change a page/post template?
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
Aaron, are you running PHP 5.4? I think that is issue.
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
Thanks, I will check it out this weekend.
Both php errors are fixed in this commit on the 1-WIP branch: https://github.com/rachelbaker/bootstrapwp-Twitter-Bootstrap-for-WordPress/commit/c3b607a905242d9450a60cde9c1d46f78a069dbc
Awesome, will have to test it out
Oops, looks like there are still errors on the "add new" post or page screens.
Looking into if this is fixable.