Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Allan Hawkey 232 posts 303 karma points
    Sep 15, 2011 @ 11:07
    Allan Hawkey
    0

    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

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 22, 2011 @ 22:39
    Anthony Dang
    0

    Can you show me your content tree?

     

  • Allan Hawkey 232 posts 303 karma points
    Sep 23, 2011 @ 10:12
    Allan Hawkey
    0

    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.

  • Allan Hawkey 232 posts 303 karma points
    Sep 27, 2011 @ 13:15
    Allan Hawkey
    0

    Looks like the screenshots didn't save (again!).  Will try again...

  • Tomigaoka Krajicek 8 posts 28 karma points
    Sep 28, 2011 @ 20:12
    Tomigaoka Krajicek
    0

    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

  • Allan Hawkey 232 posts 303 karma points
    Oct 09, 2011 @ 18:09
    Allan Hawkey
    0

    Hi Anthony

    Just wondering if you have any suggestions for fixing this one?

    Thanks
    Allan 

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 10, 2011 @ 16:43
    Anthony Dang
    0

    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. 

     

  • Allan Hawkey 232 posts 303 karma points
    Oct 10, 2011 @ 17:12
    Allan Hawkey
    0

    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?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 11, 2011 @ 10:33
    Anthony Dang
    0

    Replace the line that has GetPosts.

    You might need to add at the end of that line;  .OrderByDescending(x => x.GetProperty("uBlogsyPostDate").Value)

     

  • Allan Hawkey 232 posts 303 karma points
    Oct 11, 2011 @ 11:31
    Allan Hawkey
    0

    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)

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 16, 2011 @ 23:27
    Anthony Dang
    0

    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; }

     

     

     

  • Allan Hawkey 232 posts 303 karma points
    Oct 17, 2011 @ 12:25
    Allan Hawkey
    0

    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

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 23, 2011 @ 16:19
    Anthony Dang
    0

    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; } 

     

  • Allan Hawkey 232 posts 303 karma points
    Oct 23, 2011 @ 18:26
    Allan Hawkey
    0

    Thanks - that seems to have sorted it.

Please Sign in or register to post replies

Write your reply to:

Draft