Skip Menu |
 

This queue is for tickets about the Jifty CPAN distribution.

Report information
The Basics
Id: 24545
Status: resolved
Priority: 0/
Queue: Jifty

People
Owner: Nobody in particular
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.70117
Fixed in: (no value)



Subject: Using invalid column on display_from causes silent failure
Download (untitled) / with headers
text/plain 1.1k
Recently, I had the devel of a time finding this problem. Most of my tables have a "title" column. However, one has a "class_name" column. I accidentally used "title" as a display_from argument to valid_values, which caused a very weird and utterly silent failure. To reproduce, take any model and create an action like this: param foo => valid_values are defer { my $collection = Metrics::Model::SomeModelCollection->new; $collection->unlimit; [{ display_from => 'non_existant_column_name', value_from => 'id', collection => $collection, }]; }; Run the action in administrative mode and the label for "foo" will show up, but the rest of the form will not appear because an exception is being thrown at some point, but no error or warning is being logged. I don't think any kind of check for this needs to be made, but that exception shouldn't vanish, it should cause at least some amount of moaning to the log. I specifically encountered this behavior in the new_item fragment of the Jifty admin mode for a customized CreateModel action, if that makes any difference.
Download (untitled) / with headers
text/plain 1.1k
On Wed Jan 24 14:50:21 2007, HANENKAMP wrote: Show quoted text
> Recently, I had the devel of a time finding this problem. Most of my > tables have a "title" column. However, one has a "class_name" column.
I Show quoted text
> accidentally used "title" as a display_from argument to valid_values, > which caused a very weird and utterly silent failure. > > To reproduce, take any model and create an action like this: > > param foo => > valid_values are defer { > my $collection = Metrics::Model::SomeModelCollection->new; > $collection->unlimit; > > [{ > display_from => 'non_existant_column_name', > value_from => 'id', > collection => $collection, > }]; > }; > > Run the action in administrative mode and the label for "foo" will
show Show quoted text
> up, but the rest of the form will not appear because an exception is > being thrown at some point, but no error or warning is being logged. I > don't think any kind of check for this needs to be made, but that > exception shouldn't vanish, it should cause at least some amount of > moaning to the log.
Hi Andrew, This bug now logs an error as of Jifty r5370. Shawn


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.