Re: [Maypole] 2.05 bug in Maypole::View::Base?

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Tue Jan 04 2005 - 14:44:58 GMT


Brian Glass wrote:
> I just ran into this in a bad way. I upgraded to 2.06 and whamo, a
> number of pages no longer worked for me. I finally tracked it down to
> this 'description' bug. Now I've got 2 lines I have to regularly comment
> out of Maypole::View::Base::vars - 'description' and 'cgi'.
>
> It would be really nice to be able to have column named 'description'
> without having to hack Maypole...

I just ran into this too :(

I would also vote that being able to have a column called description is
the priority. Perhaps the class method can be renamed something less
likely to conflict, like maypole_model_class_description()? That can't
cause backwards compatibility problems since in previous releases it
wasn't implemented properly anyway!

I must offer my apologies to Peter for sidetracking his initial report -
sorry.

Also, while checking the code in M-V-Base I noticed an oddity:

     my %args = (
         request => $r,
         objects => $r->objects,
         base => $base,
         config => $r->config

           # ...
     );
     if ($class) {
         my $classmeta = $args{classmetadata} ||= {};
         $classmeta->{name} ||= $class;

I think that
         my $classmeta = $args{classmetadata} ||= {};
should be
         my $classmeta = $r->template_args->{classmetadata} ||= {};
to allow people to override the classmetadata (even to work around the
description problem!).

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT