I'm populating a blog using 2.0 beta, and have entered 10 posts so far.
On
the landing page, the archive in the right column is picking up some of the entries correctly - for example, I have entered posts with post dates in 2010 - 11 April, 25 May, 16 June, 19 27 and 30 September, and 4 October.
The archive is picking up the September and May posts, but none of the others.
Sorry - which bit of the code specifically should be changed? And would there need to be any sorting to ensure that the months etc appear in the right sequence?
I must be doing something wrong - when I replace the GetPosts section, I get a razor error - what should that complete line be? (I've added in the OrderByDescending successfully, I think)
That seems to have fixed a big part of it. I'm still left with an issue on an old archive on one of the sites, where I have items dated May 2004, then May 2003, May 2002, and then November 2001.
The May 03 and May 02 items are grouped together with the May 04 items - I guess because the Month hasn't changed (even though the year has). The Nov 01 items are shown correctly under 2001 / November.
So I guess we need something to force a check that the year AND month remain the same, otherwise to break the list and insert new headings?
2.0 beta - archive folders bug
I'm populating a blog using 2.0 beta, and have entered 10 posts so far.
On the landing page, the archive in the right column is picking up some of the entries correctly - for example, I have entered posts with post dates in 2010 - 11 April, 25 May, 16 June, 19 27 and 30 September, and 4 October.
The archive is picking up the September and May posts, but none of the others.
Any ideas how to correct this?
Thanks
Allan
Can you show me your content tree?
here's the 2010 section of the tree:
And here's the corresponding Archive shown on the front of the site:
So you can see that some of the nodes are included and others are missed out.
Looks like the screenshots didn't save (again!). Will try again...
I also encounter this error (version 1.36), some of the archives are appearing and some are not. Let me know if you have any solutions
Hi Anthony
Just wondering if you have any suggestions for fixing this one?
Thanks
Allan
A quick fix would be to replace the call to get posts with landing.DescendentsOrSelf("uBlogsyPost") in the archive script to get all the nodes.
Sorry - which bit of the code specifically should be changed? And would there need to be any sorting to ensure that the months etc appear in the right sequence?
Replace the line that has GetPosts.
You might need to add at the end of that line; .OrderByDescending(x => x.GetProperty("uBlogsyPostDate").Value)
I must be doing something wrong - when I replace the GetPosts section, I get a razor error - what should that complete line be? (I've added in the OrderByDescending successfully, I think)
Actually...
My mistake.
Find the this line in these macroscript...
if (date.Month != currentMonth){ break; }
add i--; so it looks like this...
if (date.Month != currentMonth){ i--; break; }
That seems to have fixed a big part of it. I'm still left with an issue on an old archive on one of the sites, where I have items dated May 2004, then May 2003, May 2002, and then November 2001.
The May 03 and May 02 items are grouped together with the May 04 items - I guess because the Month hasn't changed (even though the year has). The Nov 01 items are shown correctly under 2001 / November.
So I guess we need something to force a check that the year AND month remain the same, otherwise to break the list and insert new headings?
Thanks
Allan
Sorry.
My bad.
Where you see this line:
if (date.Month != currentMonth){i--; break; }
Add this one directly under...
if (date.Year != currentYear) { i--; break; }
Thanks - that seems to have sorted it.
is working on a reply...