[Catalyst] Unknown column 'me.role' error
This is my first time using Catalyst and I'm hitting a problem that I've been trying to debug for a shamefully long time now with no success. I started by going step-by-step through Jon Rockway's tutorial on CPAN http://search.cpan.org/~jrockway/Catalyst-Manual-5.701002/lib/Catalyst/Manual/Tutorial.pod and I ended up with exactly the final project you'd expect, working and all. I have made two changes to the example system and am hitting an error I can't seem to debug: (1) I changed the storage engine from SQLite to MySQL. (2) I went through the code and changed the ideas of books and authors to campaigns and clients respectively. I literally used search-replace in Vim to do the changes, paying close attention to plurality, capitalization, and actual path/filenames. Now when I login to my application I get an odd error (the entire text from the error page is at the bottom of this email). As far as I can tell the root of the problem is that the $c-login method is derivatively causing a problem with a JOINed SQL statement. Here's the broken statement, taken from the error message: ###begin broken SQL### SELECT me.role FROM users me LEFT JOIN user_roles map_user_role ON ( map_user_role.user_id = me.id ) WHERE ( map_user_role.user_id = ? ) ###end broken SQL### Keep in mind the framework's inner guts generated this SQL automagically - I had very little to do with it. Notice how the SELECT uses the alias table me and selects the column role, despite the fact that the column role only exists in the other table, user_roles? This SQL is clearly broken, as I have verified by hand it does not produce the correct output. However, a simple modification to this: ###being fixed SQL### SELECT role FROM users me LEFT JOIN user_roles map_user_role ON ( map_user_role.user_id = me.id ) WHERE ( map_user_role.user_id = ? ) ###end fixed SQL### Does produce the right output. Even weirder, though, is that I seem to be logged into my application despite landing on an error page once I hit submit. To explain more, if I go back to the /login page in my URL bar from this error page, the application clearly recognizes that I am logged in properly. How could that be? ###full text from the error page### Campaign List An error has occurred. We're terribly sorry about that, but it's one of those things that happens from time to time. Let's just hope the developers test everything properly before release... Here's the error message, on the off-chance that it means something to you: undef error - DBIx::Class::ResultSet::all(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.role' in 'field list' [for Statement SELECT me.role FROM users me LEFT JOIN user_roles map_user_role ON ( map_user_role.user_id = me.id ) WHERE ( map_user_role.user_id = ? ) with ParamValues: 0='1'] at /usr/local/lib/perl5/site_perl/5.8.8/Catalyst/Plugin/Authentication/Store/DBIC/User.pm line 119 ## The overall question is, what the heck is going on?!? Thanks to anyone who even read this far! -d ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
Thanks to all of you for Your postings. I have continued to investigate. I found, that TT is not the reason. I can reproduce the problem in 4 simple steps just by using Catalyst. 1. Create a Catalyst application catalyst.pl CatSimple 2. cd CatSimple 3. Create a Controller script\catsimple_create.pl controller Utf8 4. in the Controller::Utf8 replace the subroutine with the following code sub index : Private { my ( $self, $c ) = @_; # a very basic HTML-File that contains German Umlaute $c-response-body( qq{!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; headtitletest/title /head body GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ /body /html } ); } RESULT After starting the server and accessing the url, i got again question marks instead of the german umlaute, like: GERMAN UMLAUT HERE: ___???___ FUNNY NOTE: when i switch the browser's character encoding to Western (FF2 : View character encoding iso-8859-1), the german Umlauts are shown correctly. Behaviour is the same, when using C::P::Unicode. After all, that i have heard, Catalyst should be able to deal with this simple case. Any ideas? A possible C::P::Unicode bug? Thanks Stefan ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
what does the browser tell you is the encoding of the page it is getting? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] post - all empty?
Josef Chladek wrote: hi list, I have a strange problem, that occurs for some clients, for most not: we have a form, that is setup by javascript dynamically (form consits of one input field, one textarea and 2 hidden fields) ... form.setAttribute('action','/cat/postings/post_comment'); form.setAttribute('id','input_form'); form.setAttribute('name','input_form'); form.setAttribute('method','post'); form.setAttribute('enctype','multipart/form-data'); form.setAttribute('accept-charset','utf-8'); form.setAttribute('onSubmit', 'return check(' + parent + ')'); ... as said, most of the time it works without a problem, but sometimes I get the following error: [error] Caught exception in engine Wrong Content-Length value: xxx at /usr/local/share/perl/5.8.8/Catalyst.pm line 1636 which is thrown from Enigne.pm # paranoia against wrong Content-Length header my $remaining = $length - $self-read_position; if ( $remaining 0 ) { $self-finalize_read($c); Catalyst::Exception-throw( Wrong Content-Length value: $length ); } from debugging I found out, that $remaining in fact is $length, so it seems, that nothing was read from the post body HTTP::Body is version 0.9, I changed multipart/form-data to application/x-www-form-urlencoded, still no effect. to see the form, you have to be logged in, which works fine, I can identify the user from the session, so cookie etc. working fine any clue what could happen here? thanks josef If the Content-Length really is 0, I've found one thing over the years that does it. Older Mozilla/Netscape versions, usually CompuServe branded versions, would not POST and content of a form if javascript set the forms style to display:none or hidden in CSS. In my case, if was the usual tinkerage of hiding the form and displaying a Now processing image when a user clicked the Submit button. To this day, I still get the occasional Content-Length: 0 from these browsers...about 5 a week. Just a thought. -=Chris signature.asc Description: OpenPGP digital signature ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] post - all empty?
Am 07.09.2007 um 16:44 schrieb Christopher H. Laco: Josef Chladek wrote: hi list, I have a strange problem, that occurs for some clients, for most not: we have a form, that is setup by javascript dynamically (form consits of one input field, one textarea and 2 hidden fields) ... form.setAttribute('action','/cat/postings/post_comment'); form.setAttribute('id','input_form'); form.setAttribute('name','input_form'); form.setAttribute('method','post'); form.setAttribute('enctype','multipart/form-data'); form.setAttribute('accept-charset','utf-8'); form.setAttribute('onSubmit', 'return check(' + parent + ')'); ... as said, most of the time it works without a problem, but sometimes I get the following error: [error] Caught exception in engine Wrong Content-Length value: xxx at /usr/local/share/perl/5.8.8/Catalyst.pm line 1636 which is thrown from Enigne.pm # paranoia against wrong Content-Length header my $remaining = $length - $self-read_position; if ( $remaining 0 ) { $self-finalize_read($c); Catalyst::Exception-throw( Wrong Content-Length value: $length ); } from debugging I found out, that $remaining in fact is $length, so it seems, that nothing was read from the post body HTTP::Body is version 0.9, I changed multipart/form-data to application/x-www-form-urlencoded, still no effect. to see the form, you have to be logged in, which works fine, I can identify the user from the session, so cookie etc. working fine any clue what could happen here? thanks josef If the Content-Length really is 0, I've found one thing over the years that does it. Older Mozilla/Netscape versions, usually CompuServe branded versions, would not POST and content of a form if javascript set the forms style to display:none or hidden in CSS. In my case, if was the usual tinkerage of hiding the form and displaying a Now processing image when a user clicked the Submit button. To this day, I still get the occasional Content-Length: 0 from these browsers...about 5 a week. Just a thought. hmm, I dumped req-headers and this happens for IE7, IE6 and FF2.x, so not the oldest browsers. I temp. switched to method get now, think that will work. any hints on how I could get closer to the problem, where should I put debug code, somewhere in Engine.pm or Catalyst.pm? thanks josef ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string, explicitly upgrading the string using utf8::upgrade or utf8 or use encoding 'latin1'. Matt ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] post - all empty?
hi list, I have a strange problem, that occurs for some clients, for most not: we have a form, that is setup by javascript dynamically (form consits of one input field, one textarea and 2 hidden fields) ... form.setAttribute('action','/cat/postings/post_comment'); form.setAttribute('id','input_form'); form.setAttribute('name','input_form'); form.setAttribute('method','post'); form.setAttribute('enctype','multipart/form-data'); form.setAttribute('accept-charset','utf-8'); form.setAttribute('onSubmit', 'return check(' + parent + ')'); ... as said, most of the time it works without a problem, but sometimes I get the following error: [error] Caught exception in engine Wrong Content-Length value: xxx at /usr/local/share/perl/5.8.8/Catalyst.pm line 1636 which is thrown from Enigne.pm # paranoia against wrong Content-Length header my $remaining = $length - $self-read_position; if ( $remaining 0 ) { $self-finalize_read($c); Catalyst::Exception-throw( Wrong Content-Length value: $length ); } from debugging I found out, that $remaining in fact is $length, so it seems, that nothing was read from the post body HTTP::Body is version 0.9, I changed multipart/form-data to application/x-www-form-urlencoded, still no effect. to see the form, you have to be logged in, which works fine, I can identify the user from the session, so cookie etc. working fine any clue what could happen here? thanks josef ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] make test fails with C:P:Session:State::Cookie
Hi Emanuele thanks for the response. I took a look with the debugger this morning but didn't have too much time ... you are obviously much further with this than me. whatever happens, the code should at least be fixed enough to give some sensible default behaviour, along with a docs patch, and be able to get through tests. For my needs, your fix would be fine. If it is no worse than the previous state of affairs, it should be used IMO the current situation is that CPAN Task::Catalyst DIES because of this. so it ought to be high priority to at least fix that, IMO could you post a patch for the solution that you have? thanks Daniel On 9/7/07, Emanuele Zeppieri [EMAIL PROTECTED] wrote: Daniel McBrearty wrote: ok, i searched the list but stupidly didn't look at cpan bugtracker ... it is a reported bug. in fact there seem to be several issues with the live_app.t in 0.07 what's the implication? sessions will time out even if though the user has revisited? Exactly (because the cookie expire time is not updated, despite the accesses - so you have a fixed-duration session). This is the documented behaviour though: http://search.cpan.org/~nuffin/Catalyst-Plugin-Session-0.18/lib/Catalyst/Plugin/Session.pm#METHODS (see: session_expires $reset) But then we have another problem (or two): first, the session_expires method really does not take any argument (any argument passed to it is simply ignored - have a look at the source). This may seem at first only a documentation bug, but it implies that any time you call session_expires(), even with no arguments (for example only to get the session expire time), you have this undocumented side-effect which extends the session duration. Second, for fixed duration sessions, the session expiration control relies solely on the presence of the cookie sent by the browser: so a user can turn a fixed duration session into an extended session simply by editing the cookie expire time (this is a security bug IMO). I've got a fix for these problems, which basically just restores what the docs have always said (so it should break no existing code) and it also eliminates the security bug, but I'm waiting for the author to see if he approves that approach or if he prefers to get rid of the fixed duration sessions at all and have only extended sessions by default (as the mentioned live_app.t test seems to imply). (Actually, the current code seems to be half-way between this two choices, so to say...) Anyway, if you have time, any further research would be interesting. Cheers, Emanuele. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131 ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
On 9/7/07, Matt Lawrence [EMAIL PROTECTED] wrote: AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string, explicitly upgrading the string using utf8::upgrade or utf8 or use encoding 'latin1'. This was a good hint: * __utf8::upgrade__ on the string worked * __use utf8;__ worked too * when using __use encoding..__, Activestate Perl crashed So, the byte/character handling is the clue. Thanks, Stefan ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] TT and UNICODE: Garbled special characters
Matt Lawrence wrote: Stefan Kühn wrote: GERMAN UMLAUT HERE: ___\xFC\xFC\xFC___ AFAIK, single-byte-width \xxx escapes are always treated as bytes, not as characters. Even if they are outside the 7-bit range, and even in the presence of the utf8 pragma. Try inserting real Unicode characters into the string, explicitly upgrading the string using utf8::upgrade or utf8 or use encoding 'latin1'. Oops, that last paragraph wasn't very clear, and utf8::upgrade was not a good suggestion. I'll try again: #Option 1 use utf8; # recognise unicode characters in program text my $name = Stefan Kühn; # use a real UTF-8 character here! # Option 2 use Encode qw( decode ); my $name = decode(latin-1, Stefan K\xfchn); # Option 3 use encoding 'latin1'; my $name = Stefan K\xfchn; Once you have a unicode string that's internally marked as such, C::P::Unicode should do the right thing with it. Matt ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] make test fails with C:P:Session:State::Cookie
Daniel McBrearty wrote: ok, i searched the list but stupidly didn't look at cpan bugtracker ... it is a reported bug. in fact there seem to be several issues with the live_app.t in 0.07 what's the implication? sessions will time out even if though the user has revisited? Exactly (because the cookie expire time is not updated, despite the accesses - so you have a fixed-duration session). This is the documented behaviour though: http://search.cpan.org/~nuffin/Catalyst-Plugin-Session-0.18/lib/Catalyst/Plugin/Session.pm#METHODS (see: session_expires $reset) But then we have another problem (or two): first, the session_expires method really does not take any argument (any argument passed to it is simply ignored - have a look at the source). This may seem at first only a documentation bug, but it implies that any time you call session_expires(), even with no arguments (for example only to get the session expire time), you have this undocumented side-effect which extends the session duration. Second, for fixed duration sessions, the session expiration control relies solely on the presence of the cookie sent by the browser: so a user can turn a fixed duration session into an extended session simply by editing the cookie expire time (this is a security bug IMO). I've got a fix for these problems, which basically just restores what the docs have always said (so it should break no existing code) and it also eliminates the security bug, but I'm waiting for the author to see if he approves that approach or if he prefers to get rid of the fixed duration sessions at all and have only extended sessions by default (as the mentioned live_app.t test seems to imply). (Actually, the current code seems to be half-way between this two choices, so to say...) Anyway, if you have time, any further research would be interesting. Cheers, Emanuele. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Unknown column 'me.role' error
Good evening, On 6/9/07 at 11:15 PM -0700, Dustin Suchter [EMAIL PROTECTED] wrote: The overall question is, what the heck is going on?!? What does your conf file look like (probably yaml file)? I'm guessing the user/roles setup doesn't match the database schema. Thanks to anyone who even read this far! To be honest, I didn't read it all, I skipped ahead. So apologies if I missed something. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] post - all empty?
On Fri, Sep 07, 2007 at 04:26:56PM +0200, Josef Chladek wrote: from debugging I found out, that $remaining in fact is $length, so it seems, that nothing was read from the post body Are you using SSL? This is way old and doesn't seem to fit your case, but some old versions of IE post with zero content length. http://support.microsoft.com/default.aspx?kbid=831167 It's amazing that I still see this every so often. -- Bill Moseley [EMAIL PROTECTED] ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Unknown column 'me.role' error
Unfortunately I thought of that one already, and the two do match. Here's the useful YAML and below is the useful SQL just to double check. I believe the underlying MySQL engine is 4.1. # cat adblue.yml | grep -v \s*# --- name: AdBlue authentication: dbic: user_class: AdBlueDB::User user_field: username password_field: password authorization: dbic: role_class: AdBlueDB::User role_field: role role_rel: map_user_role user_role_user_field: user_id # [lines from my SQL file]: 249 -- 250 -- Table structure for table `users` 251 -- 252 253 CREATE TABLE `users` ( 254 `id` int(32) unsigned NOT NULL auto_incrementCOMMENT 'the unique ID of the users of the AdBlue system', 255 `email` varchar(32) collate utf8_unicode_ci NOT NULL COMMENT 'email address', 256 `username`varchar(32) collate utf8_unicode_ci NOT NULL COMMENT 'client or admin username', 257 `password`varchar(32) collate utf8_unicode_ci default 'passw0rd' COMMENT 'passwords', 258 `password_tmp`varchar(32) collate utf8_unicode_ci default 'passw0rd' COMMENT 'a 1 time use temporary password, used for initial signu 259 `password_dirty` tinyint(1)NOT NULL default '0' COMMENT 'if passwords are dirty that means the TMP password is 260 `creation_time` timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT 'the time this user was created', 261 `client_id` int(32) unsigned NOT NULL default '0' COMMENT 'if this is an external client, this is their ID number' 262 `deleted` tinyint(1)NOT NULL default '0' COMMENT 'the status of this user - have they been deleted?', 263 PRIMARY KEY (`id`), 264 FOREIGN KEY (`client_id`) REFERENCES clients(id) 265 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='this table stores username and role informaion, not contact ' AUTO_INCREMENT=0; 269 -- 270 -- Table structure for table `roles` 271 -- 272 273 CREATE TABLE `roles` ( 274 `id` int(32) NOT NULL auto_incrementCOMMENT 'this is the unique ID of this role', 275 `role`varchar(32) collate utf8_unicode_ci NOT NULL COMMENT 'this is the name of the role', 276 PRIMARY KEY (`id`) 277 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='this table stores username informaion' AUTO_INCREMENT=0; 293 -- 294 -- Table structure for table `user_roles` 295 -- 296 297 CREATE TABLE `user_roles` ( 298 `user_id` int(32) unsigned NOT NULL COMMENT 'this is the user who has this role', 299 `role_id` int(32) NOT NULL COMMENT 'this is the id of the role a user has', 300 FOREIGN KEY (`user_id`) REFERENCES users(id), 301 FOREIGN KEY (`role_id`) REFERENCES roles(id) 302 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='this table stores the relationship of what users have roles'; Charlie Garrison wrote: Good evening, On 6/9/07 at 11:15 PM -0700, Dustin Suchter [EMAIL PROTECTED] wrote: The overall question is, what the heck is going on?!? What does your conf file look like (probably yaml file)? I'm guessing the user/roles setup doesn't match the database schema. Thanks to anyone who even read this far! To be honest, I didn't read it all, I skipped ahead. So apologies if I missed something. Charlie ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] post - all empty?
Am 07.09.2007 um 21:24 schrieb Bill Moseley: On Fri, Sep 07, 2007 at 04:26:56PM +0200, Josef Chladek wrote: from debugging I found out, that $remaining in fact is $length, so it seems, that nothing was read from the post body Are you using SSL? This is way old and doesn't seem to fit your case, but some old versions of IE post with zero content length. http://support.microsoft.com/default.aspx?kbid=831167 It's amazing that I still see this every so often. nope, plain http, no ssl involved. and it happens for firefox as well. I could throw/show an error page, but I can't even display the user- input on that page (because there is none), which is a pity, because it's a message-board, so the message is gone after submit... method get is not perfect (long postings will be cut off). thanks josef ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Unknown column 'me.role' error
Good morning, On 7/9/07 at 12:22 PM -0700, Dustin Suchter [EMAIL PROTECTED] wrote: authorization: dbic: role_class: AdBlueDB::User role_field: role role_rel: map_user_role user_role_user_field: user_id Shouldn't that be: authorization: dbic: role_class: AdBlueDB::Role If that doesn't fix it, how about showing us your schemas for AdBlueDB::User and AdBlueDB::Role. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Unknown column 'me.role' error
On Sep 7, 2007, at 3:22 PM, Dustin Suchter wrote: Unfortunately I thought of that one already, and the two do match. Here's the useful YAML and below is the useful SQL just to double check. I believe the underlying MySQL engine is 4.1. # cat adblue.yml | grep -v \s*# --- name: AdBlue authentication: dbic: user_class: AdBlueDB::User user_field: username password_field: password authorization: dbic: role_class: AdBlueDB::User I think you meant AdBlueDB::Role for the role_class... role_field: role role_rel: map_user_role user_role_user_field: user_id -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ A witty saying proves nothing. -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Unknown column 'me.role' error
Yup - that was it!! I have no idea when I introduced that error in my code, but it is fixed and working now. I also think I get why the SQL was selecting me.role - because I had the User class in place of the role class. I does map_user_role.role in the correct case. Thanks Charlie and Jason. Jason Kohles wrote: On Sep 7, 2007, at 3:22 PM, Dustin Suchter wrote: Unfortunately I thought of that one already, and the two do match. Here's the useful YAML and below is the useful SQL just to double check. I believe the underlying MySQL engine is 4.1. # cat adblue.yml | grep -v \s*# --- name: AdBlue authentication: dbic: user_class: AdBlueDB::User user_field: username password_field: password authorization: dbic: role_class: AdBlueDB::User I think you meant AdBlueDB::Role for the role_class... role_field: role role_rel: map_user_role user_role_user_field: user_id ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/