ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

open activity view I get an server error (ActiveRecord::ConfigurationError (Association named 'project' was not found) (Bug #687)


Added by Tammo Tjarks at 2011-11-07 04:26 pm. Updated at 2011-11-08 08:35 am.


Status:Declined Start date:2011-11-07
Priority:Normal Due date:
Assignee:Felix Schäfer % Done:

0%

Category:Journals / History
Target version:-
Remote issue URL: Affected version:master

Description

I have recently updated from redmine 1.1.1 and sqlight3 to ChiliProject 2.4.0 and mysql.
ruby 1.9.2p290 (2011-07-09) [x86_64-linux]
passenger 3.0.9
nginx 1.0.6

The message in the logfile is:

Processing ActivitiesController#index (for 172.23.16.157 at 2011-11-07 17:10:05) [GET]
  Parameters: {"controller"=>"activities", "action"=>"index", "id"=>"testproject"}

ActiveRecord::ConfigurationError (Association named 'project' was not found; perhaps you misspelled it?):
  lib/redmine/activity/fetcher.rb:83:in `block (2 levels) in events'
  lib/redmine/activity/fetcher.rb:82:in `each'
  lib/redmine/activity/fetcher.rb:82:in `block in events'
  lib/redmine/activity/fetcher.rb:81:in `each'
  lib/redmine/activity/fetcher.rb:81:in `events'
  app/controllers/activities_controller.rb:38:in `index'
  <internal:prelude>:10:in `synchronize'
  passenger (3.0.9) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.9) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
  passenger (3.0.9) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.9) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
  passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
  passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
  <internal:prelude>:10:in `synchronize'
  passenger (3.0.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.9) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.9) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.9) helper-scripts/passenger-spawn-server:99:in `<main>'

Rendering /home/lib_tcqa/bugtracker/chiliproject-2.4.0/public/500.html (500 Internal Server Error)

In the mysql database table "projects" the name (e.g. "testproject") is defined as identifier.

Can that problem be related to the migration from sqlight to mysql or to the fact, that I needed to rerun the db:mirgration due to some problems?


History

Updated by Felix Schäfer at 2011-11-07 05:55 pm

How did you do the sqlite to mysql migration? Just "dumping" and "importing" usually doesn't work because the drivers for the different DBs are tuned to each one and code different rails types as different DB types.

Updated by Tammo Tjarks at 2011-11-07 06:11 pm

I used the taps script. I imported with taps the sqlite database as sqlite and exported the database then again as mysql using the mysql server. I looked at the database with knoda. In the project database are entries for the identifier. But I do not see any reference to the project
in the journal database.
Table projects has the rows:
  • id
  • name
  • description
  • homepage
  • is_public
  • parent_id
  • created_on
  • updated_on
  • identifier <- the identifier which is used from ActivitiesController#index as value for id key of Parameters
  • status
  • lft
  • rgt
In the table journals I have the rows:
  • id
  • journaled_id
  • user_id
  • noted
  • created_at
  • version
  • activity_type
  • changes
  • type
and in journal_details:
  • id
  • journal_id
  • property
  • prop_key
  • old_value
  • value

When I look at the issues, there is a column "project_id". That is missing for journals, but I do not know from where it fetches the project identifier.

Updated by Felix Schäfer at 2011-11-07 07:54 pm

The journal_details are a not-deleted yet leftover from the previous journaling system, so just forget about that one.

Do you have any plugin installed? If so, try to deactivate them and see if it works better. Another thing you could do to try to zone in on the infringing record/code is to fetch the activity for one type of activity "thing" at once, the one were it breaks is the "culprit". You can see the different activity types by visiting /projects/testproject/activity?show_issues=1 for the issues, /projects/testproject/activity?show_changesets=1 for the changesets, and so on (alternatively, when you have a working one, click on the labels of the the right hand side list, they are links to the activity limited to that one type).

  • Assignee set to Felix Schäfer
  • Category set to Journals / History
  • (deleted custom field) set to master
  • Status changed from Open to Needs more information

Updated by Tammo Tjarks at 2011-11-07 10:14 pm

I have tried it out. It works with activity?show_changesets=1 as well as activit?show_issues=1.
I do not know which options for show_* are defined. It worked also for activity?show_documents=1.
It did not work for activity?show_wikis=1, activity?show_forums=1, activity?show_boards=1
activity?show_journals=1
The problem occurs for all projects, so I do not have a working one. Will tomorrow deactivate more plugins.

Updated by Tammo Tjarks at 2011-11-08 08:31 am

Hello,
I removed the plugins:
  • redmine_reports
  • redmine_opensearch
  • redmine_repository_control
  • redmine_favicon
  • redmine_arch_decisions

Now the error disappeared. Thank you very much for the hint.

Regards,
Tammo

Updated by Felix Schäfer at 2011-11-08 08:35 am

Glad to hear that, declining as it isn't a core bug.

redmine_opensearch and redmine_favicon are I think plugins from Holger, so they should work (or at least you could bug Holger into fixing them for ChiliProject ;-) ). I can't really say about the others, but maybe you can have a look at the Plugin Compatibility list, see if the plugins are already in there and add them if necessary. Thanks.

  • Status changed from Needs more information to Declined

Also available in: Atom PDF