View previous topic :: View next topic |
Author |
Message |
Glutnix
Joined: 28 Mar 2002 Posts: 32 Location: New Zealand
|
Posted: Tue Aug 13, 2002 9:15 am Post subject: b2 0.60pre4 - every single post shows up |
|
|
do'h! Just installed b2 0.60pre4 and for some weird reason, b2 is insistant it wants to show every single post in it's db, all the way back to march for me. Not cool... any ideas?
http://www.webfroot.co.nz/b2new/ _________________
|
|
Back to top |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Tue Aug 13, 2002 3:58 pm Post subject: |
|
|
Simple question there, do you have $cat= something before you include blog.header.php ?
Because now, when you select a category it displays ALL posts.
If you must absolutely rely on setting a category, you may just use pre4 with pre3's blog.header.php file. |
|
Back to top |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Tue Aug 13, 2002 4:56 pm Post subject: |
|
|
y $cat will list all the post in the cat? would't it take a long time to load
Maybe Listing 8 of 100 posts could be added and next and prev page
Just a thought though _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
DarkWulf

Joined: 13 Aug 2002 Posts: 18
|
Posted: Wed Aug 14, 2002 1:50 am Post subject: |
|
|
thats strange...
i did that, and for awhile it was showing all the posts. then mysteriously, it got better.
now it does its job properly... lol.
if only we could control that. |
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Fri Aug 16, 2002 6:19 pm Post subject: Same error |
|
|
Hi Michel,
what do you mean with Quote: | Simple question there, do you have $cat= something before you include blog.header.php ? |
In my template the $cat something is far away behind the includeblog.header...
I have the same bug/feature: If i try to load the index.php, b2 starts to load ALL posts (about 3000) and fials to load the complete page with an error.
But that sounds very good for me: Quote: | Because now, when you select a category it displays ALL posts. |
My dreams are fulfilled if i can get this to work
Any hints?
THANX and greetings |
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Sat Aug 17, 2002 5:24 pm Post subject: errror still there |
|
|
Hi,
i have followed the instructions and used the standard temlates with b2, the error still exists: If i load the page, b2 tries to show all entries for all categories.
I have checked my templates for the described $cat, but everything seemst to be ok
If i use the pre3's blog.header.php the think works, but with the old bug: When i select a category, it shows only entries from the recent index.php (last 7 days).
I have updated from pre3 to pre4.
Is there any hope?????? |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Sun Aug 18, 2002 4:36 pm Post subject: |
|
|
SMASH ONE DUMB BUG!!!!
In your 6pre4 'blog.header.php' file at about line 180 you should see:
Code: | $where .= ' AND post_date > \'$otherdate\''; |
That needs to be:
Code: | $where .= ' AND post_date > \''. $otherdate. '\''; |
You may have noticed that your query string contain a string like $otherdate, this should not have been there, and it caused mysql to treat it like some date (or at least attempt to) and that effectivly created a date way back in time, most likey well before your first post!
This bug shows up when you have 'days' selected in your b2 options page. It it set to posts, this behavior is not seen. One of the reasons some people did not see this issue.
This should fix it.
Michael e |
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Sun Aug 18, 2002 5:35 pm Post subject: Thanks, but... |
|
|
i am biting in my carpet
Now the page loads, but the error is till there: i click a category and only the entries from the last 7 days are shown
I have made an test: I have created a page and included the old blog.header.php -> it doesnt work.
I included the unmodified (without your fix) newpre4 blogheader.php and called it b2kat.php. If i call the page with for example b2kat.php?cat=4 it works like a charm.
On this page i can call the other categories also. But when i call only the b2kat.php without ?cat=xx the page starts to load and load and load. The same if i change in the options from 7 days to 50 posts...
You can check it here:
http://log.netbib.de/b2kat.php?cat=5
But thanks for your wonderful support, i am still hoping  |
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Mon Aug 19, 2002 9:52 am Post subject: |
|
|
I'm having this same problem and I have ALL off. It seems it only shows all the post for a selected category when I use "show last 10 posts" in the options. If I change it to days and select a category, the category returns the set number of days as it should.
I am repeating here what I said over here http://tidakada.com/board/viewtopic.php?t=1012
If someone already fixed this, please feel free to repeat yourself, because I missed it the first time. |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Mon Aug 19, 2002 3:33 pm Post subject: |
|
|
Edlef,
Ok, I'll try again. Is this what you want:
just index page >> last # posts or last #days [option setting]
index w/ cat=x >> all posts from a category, ignoring post/day option
If this is true, that one more change is needed blog.header.php:
We need to skip the limit logic if the $cat set and skip the day logic if days set in options.
I'll take a look some more shortly. |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Mon Aug 19, 2002 5:21 pm Post subject: |
|
|
Edlef and Chris,
The above correction is a bug and needs to be applied.
To get the functionality describe in my previous post, one line needs to change in blog.header.php:
At about line 172, find:
Code: |
if ((!$m) && (!$p) && (!$w) && (!$s) && (!$poststart) && (!$postend)) {
|
This needs to have the $cat added to it s/b:
Code: |
if ((!$cat) && (!$m) && (!$p) && (!$w) && (!$s) && (!$poststart) && (!$postend)) {
|
Now, index pages with queries including the 'cat=x' will display all posts for the selected cat and ignore the 'Show' setting in options.
Index pages without the query cat=x, will display only those entries as controlled by the 'Show' setting in the options page.
Does this do what you want?
michael e |
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Mon Aug 19, 2002 5:31 pm Post subject: |
|
|
Hi Michael,
Quote: | just index page >> last # posts or last #days [option setting] |
exact! if i load the index.php i want to see ALL the posts of the last 7 days
Quote: | index w/ cat=x >> all posts from a category, ignoring post/day option |
on my page are the categories on the right side with a pulldown visible, and every post has a category.
If i click on the category in the post or on the right side, i want to show up ALL entries from this category. Thats how it works in other blogsoftware, e.g. sunlog or nucleus
Thanks for your help! |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Mon Aug 19, 2002 5:57 pm Post subject: |
|
|
Edlef,
Did to apply the following to your blog.header.php along with the other fix above? And does it now do what you want?
michael
macshack wrote: |
At about line 172, find:
Code: |
if ((!$m) && (!$p) && (!$w) && (!$s) && (!$poststart) && (!$postend)) {
|
This needs to have the $cat added to it s/b:
Code: |
if ((!$cat) && (!$m) && (!$p) && (!$w) && (!$s) && (!$poststart) && (!$postend)) {
|
|
|
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Mon Aug 19, 2002 6:06 pm Post subject: I can |
|
|
check it out tomorrow. Today i am not in my hometown. Still working in Hamburg.
I will check it an post a reply here
Thanks
Edlef |
|
Back to top |
|
 |
Edlef
Joined: 16 Mar 2002 Posts: 71
|
Posted: Tue Aug 20, 2002 4:44 pm Post subject: IT WORKS!!!!!!!! |
|
|
Hi Michael,
you are ONE OF THE GREATESTs!!!!!!!!!
Went home, make the above modifications in blog.header.php, upload the file to the server: It works like it should!
THANK you very much for your help!!!!!!
The only (little) problem:
I have the categories in a dropdownbox on my page. If i choose the category "fun" all the entries for fun are shown: wonderful!
If i choose now the category "All" from the dropdownbox: you know what happens? Yes, the page start to load ALL entries, not only the entries from the last seven days...
But i think i have to live with this error. Eventually i dont use the dropdownbox, and choose the listlayout....
THANX and greetings from Lueneburg
Edlef |
|
Back to top |
|
 |
|