Skip to:
Content

Opened 5 years ago

Closed 4 years ago

#1164 closed defect (bug) (fixed)

Single blog post display issue in 1.1

Reported by: oracleappscommunity Owned by:
Milestone: 1.2 Priority: minor
Severity: Version:
Component: Keywords: blogd post display, needs-patch
Cc:

Description

When a single blog post is viewed it doesn't display the blog spot. When list of blog posts viewed it displays correctly.

Whole thing worked in 1.0.3, defect found in BP 1.1

WPMU 2.8.4
BP 1.1
BuddyPress default theme

Change History (8)

comment:1 stwc5 years ago

Looking at page.php in bp-sn-parent, the loop is simply not running, or not finding any posts.

Throwing in a piece of text before the loop, and that text appears on the page (individual post to the admin blog), fixing the layout, although the post content itself is not displayed.

<div class="page" id="blog-page">
<p>THIS IS SOME STATIC DEBUG TEXT</p>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

On the other hand, throw something in after the loop begins, and it gets swallowed like a black hole along with any post content. This

<div class="page" id="blog-page">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<p>THIS IS SOME STATIC DEBUG TEXT</p>

displays nothing.

The really weird thing is that the main page of the blog lists the posts just fine. It's only when looking at an individual post that it fails.

I'm really trying to be helpful with this bug reporting here: any ideas from anyone?

Come to think of it, I'm a little confused as to why it's page.php that is running at all in this case, but it absolutely is.

comment:2 oracleappscommunity5 years ago

Noticed the same issue when browsed by categories. Browsing by tags is working fine.
Strange behaviour.

comment:3 oracleappscommunity5 years ago

  • Priority changed from major to critical

comment:4 DJPaul5 years ago

  • Priority changed from critical to major

This works fine on my website and also on http://testbp.org/. Hmm. I have seen your forum threads http://buddypress.org/forums/topic/no-output-from-the-loop-on-bp11-admin-blog and http://buddypress.org/forums/topic/single-blog-post-display-issue-new-11-install.

Problem is the have_posts loop ("The Loop") is part of WordPress. Not my area of expertise so I'm not sure what to suggest. Does have_posts() return true? If it does, before that 'while', see what the $wp_query global. i.e. global $wp_query; die(print_r($wp_query));

comment:5 oracleappscommunity5 years ago

after checking the testbp.org, I found the rootcause of this issue and possible workaround.

In my permalink settings I removed the 'blog', so my setting is

domain.com/subdirectory/post-id/prost-name

If I change the permalink to below to include 'blog' it works just fine.

domain.com/subdirectory/blog/post-id/post-name

I still think this is a bug, because it used to work in 1.0.3

comment:6 apeatling5 years ago

  • Priority changed from major to minor

Downgrading to minor as this only occurs in select setups.

comment:7 DJPaul5 years ago

  • Keywords needs-patch added; 1.1 removed

comment:8 hempsworth4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

This isn't occurring in current 1.2 trunk... I've tested with a multitude of different permalink settings and its appearing fine in all.

I'm closing this as I think it must have been fixed when the new single.php was introduced in [2170]

Note: See TracTickets for help on using tickets.