Hmm.  It's closer at least :-)

I suspect this will easier to fix, but I'm away from my computer right
now, and it'll be a few hours before I can fix it.


Scott

On 7/9/06, Steve Longdo <[EMAIL PROTECTED]> wrote:
> Now I get this, which is certainly an improvement, the generated links look
> good:
> Archives
>
>    - Master Archive <http://localhost:3000/articles/archives>
>    - 2006 7 () <http://localhost:3000/articles/2006/7>
>    - 2006 6 () <http://localhost:3000/articles/2006/6>
>    - 2006 5 () <http://localhost:3000/articles/2006/5>
>    - 2006 4 () <http://localhost:3000/articles/2006/4>
>    - 2006 3 () <http://localhost:3000/articles/2006/3>
>    - 2006 2 () <http://localhost:3000/articles/2006/2>
>    - 2006 1 () <http://localhost:3000/articles/2006/1>
>    - 2005 12 () <http://localhost:3000/articles/2005/12>
>    - 2005 11 () <http://localhost:3000/articles/2005/11>
>    - 2005 10 () <http://localhost:3000/articles/2005/10>
>
> Processing ArchivesController#index (for 127.0.0.1 at 2006-07-09 13:08:47)
>   Blog Load (0.001680)   SELECT * FROM blogs ORDER BY id LIMIT 1
>   Trigger Load (0.000905)   SELECT * FROM triggers WHERE (due_at <=
> '2006-07-09 13:08:47')
>   Content Load (0.026332)   select count(*) as count, extract(year from
> published_at) as year,extract(month from published_at) as month from
> contents where type='Article' and published = 1 and published_at <
> '2006-07-09 13:08:47' group by year,month order by year desc,month desc
> limit 12
>   Content Columns (0.000892)   SHOW FIELDS FROM contents
> Rendering plugins/sidebars/archives/content
>
> mysql> select count(*) as count, extract(year from published_at) as
> year,extract(month from published_at) as month from contents where
> type='Article' and published = 1 and published_at < '2006-07-09 13:08:47'
> group by year,month order by year desc,month desc limit 12
>     -> ;
> +-------+------+-------+
> | count | year | month |
> +-------+------+-------+
> |     1 | 2006 |     7 |
> |     8 | 2006 |     6 |
> |     7 | 2006 |     5 |
> |     5 | 2006 |     4 |
> |    14 | 2006 |     3 |
> |     9 | 2006 |     2 |
> |     5 | 2006 |     1 |
> |     7 | 2005 |    12 |
> |     9 | 2005 |    11 |
> |     5 | 2005 |    10 |
> +-------+------+-------+
> 10 rows in set (0.03 sec)
>
>
>
> On 7/9/06, Scott Laird <[EMAIL PROTECTED]> wrote:
> >
> > Okay, try the current one.  I stopped concatenating things inside of the
> > DB, that should be a lot more portable.
> >
> >
> > Scott
> >
> > On 7/9/06, Scott Laird <[EMAIL PROTECTED]> wrote:
> > >
> > > This is mysql?
> > >
> > > On 7/9/06, Chris Clark < [EMAIL PROTECTED]> wrote:
> > >
> > > > Been following this, as I gave up on the archives a while ago, just
> > > > didn't have time to dig into it.I just tried r1096, and now I see the
> > > > archives again, though it comes across as a linked 1 with 460 articles
> in
> > > > it. Clicking the link /articles/find_by_date?month=0&year=1 gives an
> > > > argument out of range error
> > > > On Jul 9, 2006, at 9:04 AM, Scott Laird wrote:
> > > >
> > > > Can you try r1096?
> > > >
> > > >
> > > > Scott
> > > >
> > > > On 7/9/06, Steve Longdo < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Seems to be something with the || concat.  I switched to the
> > > > > function:
> > > > >
> > > > > Welcome to the MySQL monitor.  Commands end with ; or \g.
> > > > > Your MySQL connection id is 1 to server version: 4.1.14-standard
> > > > >
> > > > > mysql> select count(*) as count, concat(extract(year from
> > > > > published_at),lpad(extract(month from published_at),2,'0'))  as date
> from
> > > > > contents where type='Article'  group by date order by date desc
> limit 5;
> > > > > +-------+--------+
> > > > > | count | date   |
> > > > > +-------+--------+
> > > > > |     1 | 200607 |
> > > > > |     8 | 200606 |
> > > > > |     7 | 200605 |
> > > > > |     5 | 200604 |
> > > > > |    14 | 200603 |
> > > > > +-------+--------+
> > > > > 5 rows in set (0.03 sec)
> > > > >
> > > > > Is it maybe just an issue on MySQL prior to version 5?  Most of the
> > > > > shared hosts haven't upgraded to 5 yet...
> > > > >
> > > > > On 7/9/06, Scott Laird < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > >  That's... bizarre.
> > > > >
> > > > > Can you play with it a bit?  Does extract(month from published_at)
> > > > > and extract(year from published_at) work right?
> > > > >
> > > > >
> > > > > Scott
> > > > >
> > > > > On 7/8/06, Steve Longdo < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > >  1089 resolves the SQL error, but the archives sidebar still
> > > > > renders as 1().
> > > > >
> > > > > Here is the result of that query:
> > > > >
> > > > > mysql> select count(*) as count, extract(year from published_at)||'
> > > > >
> > > > >     '> '||lpad(extract(month from published_at),2,'0')  as date from
> > > > > contents
> > > > >     -> where type='Article'  group by date order by date desc limit
> > > > > 5;
> > > > > +-------+------+
> > > > > | count | date |
> > > > > +-------+------+
> > > > > |    71 |    1 |
> > > > > +-------+------+
> > > > > 1 row in set (0.01 sec)
> > > > >
> > > > >
> > > > >
> > > > > On 7/8/06, Scott Laird < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > If that doesn't work, then can you run this query and send me the
> > > > > > results?
> > > > > >
> > > > > > select count(*) as count, extract(year from published_at)||'
> > > > > > '||lpad(extract(month from published_at),2,'0')  as date from
> > > > > > contents
> > > > > > where type='Article'  group by date order by date desc limit 5;
> > > > > >
> > > > > >
> > > > > > Scott
> > > > > >
> > > > > > On 7/8/06, Scott Laird <[EMAIL PROTECTED]> wrote:
> > > > > > > Can you give 1089 a try?
> > > > > > >
> > > > > > >
> > > > > > > Scott
> > > > > > >
> > > > > > >
> > > > > > > On 7/8/06, Steve Longdo < [EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > >
> > > > > > > Well the fix for the MySQL error is simple enough just add
> > > > > > "to_i" to the
> > > > > > > count variable that is passed on line 19 of the archives
> > > > > > controller.  It
> > > > > > > still doesn't render correctly though:
> > > > > > >
> > > > > > >
> > > > > > > Archives
> > > > > > > Master Archive
> > > > > > >  1 ()
> > > > > > >
> > > > > > >
> > > > > > > On 7/8/06, H. Wade Minter < [EMAIL PROTECTED] > wrote:
> > > > > > > > I
> > > > > > > > On Jul 8, 2006, at 11:10 PM, Steve Longdo wrote:
> > > > > > > >
> > > > > > > > > I did a fresh checkout of r1088 and ran 'rake migrate' to
> > > > > > update.
> > > > > > > > > I believe that is a migration from 42 to 46.  This ran
> > > > > > without
> > > > > > > > > error.  When I attempt to view the site I get a message
> > > > > > stating:
> > > > > > > > > Controller stack got out of kilter!
> > > > > > > > >
> > > > > > > > > I saw this in the log:
> > > > > > > > > Processing ArchivesController#index (for 127.0.0.1 at
> > > > > > 2006-07-08
> > > > > > > > > 22:01:11)
> > > > > > > > >   Blog Load ( 0.002360)   SELECT * FROM blogs ORDER BY id
> > > > > > LIMIT 1
> > > > > > > > >   Trigger Load ( 0.000713)   SELECT * FROM triggers WHERE
> > > > > > (due_at
> > > > > > > > > <= '2006-07-08 22:01:11')
> > > > > > > > >   Content Load (0.000000)   Mysql::Error: You have an error
> > > > > > in your
> > > > > > > > > SQL syntax; check the manual that corresponds to your MySQL
> > > > > > server
> > > > > > > > > version for the right syntax to use near ''12'' at line 1:
> > > > > > select
> > > > > > > > > count(*) as count, extract(year from published_at)||'
> > > > > > '||lpad
> > > > > > > > > (extract(month from published_at),2,'0') as date from
> > > > > > contents
> > > > > > > > > where type='Article' and published = 1 and published_at <
> > > > > > > > > '2006-07-08 22:01:11' group by date order by date desc limit
> > > > > > '12'
> > > > > > > > >
> > > > > > > > > Anybody seen this before?  Is the Archives Sidebar broken?
> > > > > > > >
> > > > > > > > I noticed that as well when I upgraded, but haven't had the
> > > > > > time to
> > > > > > > > track it down.  But yeah, I saw the exact same thing.
> > > > > > > >
> > > > > > > > --Wade
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Typo-list mailing list
> > > > > > > > Typo-list@rubyforge.org
> > > > > > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > >
> > > > > > > Typo-list mailing list
> > > > > > > Typo-list@rubyforge.org
> > > > > > >   http://rubyforge.org/mailman/listinfo/typo-list
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > _______________________________________________
> > > > > > Typo-list mailing list
> > > > > > Typo-list@rubyforge.org
> > > > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > >
> > > > > Typo-list mailing list
> > > > > Typo-list@rubyforge.org
> > > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > >
> > > > > Typo-list mailing list
> > > > > Typo-list@rubyforge.org
> > > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Typo-list mailing list
> > > > > Typo-list@rubyforge.org
> > > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > > >
> > > > >
> > > > _______________________________________________
> > > > Typo-list mailing list
> > > > Typo-list@rubyforge.org
> > > > http://rubyforge.org/mailman/listinfo/typo-list
> > > >
> > > >
> > > > _______________________________________________
> > >
> > >
> > > Typo-list mailing list
> > > Typo-list@rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/typo-list
> > >
> > >
> > >
> >
> > _______________________________________________
> > Typo-list mailing list
> > Typo-list@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/typo-list
> >
> >
>
>
_______________________________________________
Typo-list mailing list
Typo-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/typo-list

Reply via email to