I created a simple page view with page title '%1 Archives', using the 'Node: Posted Full Date' argument, but I noticed some problems/unexpected behaviors. I chose 'Summary, sorted descending' as default if the argument isn't specified, but:

  1. In the summary, the URLs generated for each date are different from the help text explanation.

    For example, the URL that shows up for December 15, 2005 is insert my view's url here/2005120, instead of 20051215 as the help text ('This argument is a complete date in the form of CCYYMMDD') led me to believe.

  2. Accessing the generated URL always shows a page with an incorrect title.

    Accessing the above mentioned URL (insert my view's url here/2005120) always shows a page with title 'January 1, 1970 Archives' instead of the correct title (in this example, December 15, 2005 Archives).
    This is because in views_node.inc, in the views_handler_arg_fulldate function there is this line:

        case 'title':
          return format_date(strtotime($query), 'custom', 'F j, Y');
    

    but, in the example, $query is 2005120 and applying strtotime to 2005120 returns -1 (PHP4) or false (PHP5), which causes the incorrect title. Only applying strtotime to 20051215 returns the correct title (I have no idea how to reflect this in the code, or I would have helped with a patch).

OT: When I first started using this argument, I actually believed daily archives would be generated, so it took me a while to catch on the fact it's weekly archives instead. Can views already implement daily archives, or is it a reasonable feature to request?

Comments

Permanently Undecided’s picture

I filed the bug report for the previous version of the module, but this still happens with the just updated version as well.

Permanently Undecided’s picture

Status: Active » Fixed

Latest views update from CVS fixes this problem; moreover, using the fulldate argument now generates daily archives instead of weekly archives. Earl, I officially love you!

merlinofchaos’s picture

Indeed; and actually, it was always supposed to be daily. The problem had to do with %d getting substituted, causing the date format to fail amusingly.

I didn't close the issue because I was having timezone issues which I've tracked down to MySQL being obnoxious, and I'm trying to figure out how to fix it gracefully.

Anonymous’s picture

Status: Fixed » Closed (fixed)