Project

General

Profile

Child already added error

Added by Felipe Campo about 14 years ago

when i was upgrading an instalation from trunk 3093 to current 19-02-2010 I was having a Child already added messahe every time I executed a rake task, in my particular case , rake db:migrate

I had to clean up these plugin to make it go.

budget_plugin/
customer_plugin/
ezfdaq
ezlibrarian
redmine_charts/
redmine_estimations/
redmine_risks/
redmine_schedules/
redmine_scrumdashboard/
redmine_tab_seisweb/
redmine_wiki_extensions
stuff_to_do_plugin/

Please someone can tell what was going and how I fix it, so I can have the plugins back?


Replies (4)

RE: Child already added error - Added by Felipe Campo about 14 years ago

this is and stacktrace sample

** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Child already added
/etc/www/redmine_test/lib/redmine/menu_manager.rb:77:in `add'
/etc/www/redmine_test/lib/redmine/menu_manager.rb:358:in `push'
/etc/www/redmine_test/lib/redmine/plugin.rb:142:in `menu'
/etc/www/redmine_test/vendor/plugins/ezfaq_plugin/init.rb:47:in `evaluate_init_rb'
/etc/www/redmine_test/lib/redmine/plugin.rb:67:in `instance_eval'
/etc/www/redmine_test/lib/redmine/plugin.rb:67:in `register'
/etc/www/redmine_test/vendor/plugins/ezfaq_plugin/init.rb:30:in `evaluate_init_rb'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:48:in `load'
/etc/www/redmine_test/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:38:in `load_plugins'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:37:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:37:in `load_plugins'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:369:in `load_plugins'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:165:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
/etc/www/redmine_test/config/environment.rb:20
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

RE: Child already added error - Added by Michael Dailous about 14 years ago

Unfortunately, the error doesn't provide much help, and I see lots of people are getting the same "Child already added" error. I had to modify the lib/redmine/menu_manager.rb file and insert the following code at line 77:

puts 'child name: ' + child.name.to_s

In doing so, I could now see the child name that it was adding. For me, I had to remove the customer_plugin and the redmine_reports plugin. I'm still not sure why the error is happening, but at least I can use the basic functionality of redmine again.

If anyone knows why this is happening, I'd really like to re-add the redmine_reports plugin as that's heavily used by our company.

Thanks, and hope this helps someone else.

RE: Child already added error - Added by Felipe Campo about 14 years ago

Hi Michael, it is an good way to see the problem source.
I had to made a clean install of redmine and then reinstall all the plugins with it latest version , so everithing was ok again , at leat with the recently updated plugins.
My thesis was that the trunk included the one plugin.

RE: Child already added error - Added by Michael Dailous about 14 years ago

Hi Filipe (et. al.),

I came across this little tidbit of information last night sometime.

http://bitbucket.org/yuja/redmine_whining/src/c844534abd0b/lib/tasks/whining.rake

The problem was the line:

require 'config/environment'

needed to be changed to:

require File.expand_path(File.dirname(__FILE__) + "/../../../../../config/environment")

I don't have that particular module installed, but I found the culprit was in a module I wrote (how embarrassing)... anyway, I went through all of the 3rd-party plugins we have installed to make sure none of them had the same issue... corrected whatever needed to be corrected, and now this problem is gone. I've been able to re-install the redmine_reports and now everyone at the company is a happy camper.

Hope this helps someone else. :)

    (1-4/4)