[html-formfu] load_config_file won't find .yml

Ascii King tech at swattermatter.com
Tue Dec 8 20:36:06 GMT 2009


Carl Franks wrote:
> Doh, I should have considered that!
> If you remove the FormConfig attribute, so the action runs, then dump
> $self (the controller),
> you should find the Catalyst-Controller-HTML-FormFu config in there.
> It should be under {_html_formfu_config}{constructor}{config_file_path}
>
> Carl
>
>   
The config_file_path is empty as far as I can tell.  I think this has 
something to do with my DBIx implementation because if I use a form that 
doesn't have load_config_file, I get the following error:

DBIx::Class::Row::get_column(): No such column 'role_id' at 
C:/Perl/site/lib/HTML/FormFu/Model/DBIC.pm line 112

I am able to access that database for listing the records in it, but 
when I call up the form to create a new entry, I get the above error in 
the browser.  The error listed in the console at the same time is:

[debug] Catalyst::Controller::HTML::FormFu::Action::Config searching for 
file 'D
:\webdev\OMTSWeb\root\forms/account/create_account.yml'
[warn] Calling $c->model() will return a random model unless you specify 
one of:
 at C:/Perl/site/lib/HTML/FormFu/Model/DBIC.pm line 145
[warn] * $c->config(default_model => "the name of the default model to 
use")
[warn] * $c->stash->{current_model} # the name of the model to use for 
this request
[warn] * $c->stash->{current_model_instance} # the instance of the model 
to use for this request
[warn] NB: in version 5.81, the "random" behavior will not work at all.
[error] DBIx::Class::Row::get_column(): No such column 'role_id' at 
C:/Perl/site/lib/HTML/FormFu/Model/DBIC.pm line 112


This problem suggests that I am not referring to a model when I make a 
request, (according to this old website 
http://use.perl.org/~ltjake/journal/36941)  but here is the line I use:

$c->stash->{object} = $c->model('ModelDB::Prior')->new_result({});


Also, I am running this on a Windows machine. Just prior to deploying 
for testing, i set up a temporary Windows XP machine as a server.  I 
have used the newest mods and this is the result. I updated the mods on 
my old windows box (my development machine) and got the same result.




More information about the HTML-FormFu mailing list