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
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.
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