-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Error : ArgumentError (wrong number of arguments (1 for 0)) #49
Comments
try using the stable redmine version |
Unless I'm mistaken the only redmine package available for jessie (whether using apt-cache madison/show) is currently : redmine | 3.0~20140825-1 | http://ftp.de.debian.org/debian/ jessie/main amd64 Packages ...which isn't going to help much. I'm guessing this is probably due to the various security patches which have been flowing through recently. I remember trying to get the stable version working from source a while ago, without success. I'm feeling stuck between a rock and a hard place. |
So, it seems the problem is that many calls in the plugin need to be upgraded to Rails 4. The old Rails 2 style of querying ActiveRecord is no longer valid. Pity, because I haven't touched Ruby in years. I've made a start, and this will need to be done by somebody at some point anyway. Anybody else want to take a look into modernising the code as well? |
For example : the index screen now displays. The following lines in timesheet_controller.rb needed to be changed : def allowed_projects But this process needs to be continued for every action |
in the timesheet.rb model def time_entries_for_all_users(project) AND ------ def initialize(options = { })
in the initialize method... and it works with ActiveRecord4 Thanks to David Workman, the Ruby/Rails guru who explained how to do the migration (and pointed out how much work it would take to do it properly) |
After upgrading to redmine 2.5.2.devel and cloning the git repo, navigating to the timesheet page I get an "Internal Error". In production.log it says : ArgumentError (wrong number of arguments (1 for 0)):
/usr/lib/ruby/vendor_ruby/active_record/scoping/named.rb:24:in
all' plugins/redmine_timesheet_plugin/app/controllers/timesheet_controller.rb:118:in
get_activities'the get_activities function has a single line :
def get_activities
@activities = TimeEntryActivity.all(:conditions => 'parent_id IS NULL')
end
The problem is the TimeEntryActivity.all(:conditions => 'parent_id IS NULL') ... and I can't see why :-(
Can anybody see a solution to this? Writing invoices has turned into a bit of a nightmare of late!
The text was updated successfully, but these errors were encountered: