Project

General

Profile

Unable to add groups

Added by Joe Chin about 14 years ago

I've download the 3335svn trunk and was hoping to finally have groups working. When I try and add a group I get an error 500. Checking the logs this is the trace I get:
Processing GroupsController#create (for 82.127.39.172 at 2010-01-21 12:48:50) [POST]
Parameters: {"commit"=>"Create", "action"=>"create", "authenticity_token"=>"MN1CPMMOikf/8G32WFAo+fpkEVLzc+Cpi6V9APP2S$

ActiveRecord::StatementInvalid (Mysql::Error: Column 'login' cannot be null: INSERT INTO `users` (`status`, `created_on$
app/controllers/groups_controller.rb:69:in `create'
app/controllers/groups_controller.rb:68:in `create'
passenger (2.2.8) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.8) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:385:in `start_request_handler'
passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:343:in `handle_spawn_application'
passenger (2.2.8) lib/phusion_passenger/utils.rb:184:in `safe_fork'
passenger (2.2.8) lib/phusion_passenger/railz/application_spawner.rb:341:in `handle_spawn_application'
passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.8) lib/phusion_passenger/abstract_server.rb:163:in `start'

If I'm reading this correct a new group is created in the users table. Is this the way it's supposed to work?


Replies (4)

RE: Unable to add groups - Added by Felix Schäfer about 14 years ago

Groups are from a db perspective special users that "have" many users, the association is created through the table groups_users.

RE: Unable to add groups - Added by Joe Chin about 14 years ago

I assumed as much. But this special user isn't being created as far as I can tell the login and last name field is NULL.

RE: Unable to add groups - Added by Felix Schäfer about 14 years ago

Mmh, I just had a look at The Code™ and didn't find anything that would put a login on groups, but I also seem to have a not null constraint on the column in the db too, I was able to create groups though. I think you should file a bug, be sure to include the whole trace (notice that long lines are cut off), and include the output of RAILS_ENV=production script/about (or whatever rails environment your redmine runs in).

RE: Unable to add groups - Added by Joe Chin about 14 years ago

It's fixed now. I updated to the latest trunk release 3357 and that fixed up the problem.

    (1-4/4)