maxrossello / redmine_app_timesheets

A true timesheet plugin using orders, not bound to timelogs over issues
GNU General Public License v2.0
32 stars 10 forks source link

Cannot create new "Orders" #12

Closed perbit closed 10 years ago

perbit commented 10 years ago

Hello,

I cannot create new Order (404 page not found) when user with id=1 not exists.

Started POST "/redmine/apps/order_mgmt/create" for 127.0.0.1 at 2014-03-11 21:04:45 +0100 Processing by OrdersController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"OIw9XFbQHoEqekk+V8qIdWoU3FU3lS7HMwfzZu/scT4=", "back_url"=>"http://localhost:81/redmine/apps/order_mgmt", "work_order"=>{"name"=>"test order", "description"=>"test order"}, "commit"=>"Létrehoz"} Current user: zold (id=3) Completed 404 Not Found in 140.6ms

ActiveRecord::RecordNotFound (Couldn't find User with id=1 [WHERE users.type IN ('User', 'AnonymousUser')])

If I create user manually with id=1 everything is working fine.

maxrossello commented 10 years ago

What version of the plugin are you using? (open init.rb to see the version)

perbit commented 10 years ago

version '1.3.6'

maxrossello commented 10 years ago

Is user 1 in the group enabled for the order management app (/settings/plugin/redmine_app__space)?

Can you please grep "IN ('User', 'AnonymousUser')" in your Redmine installation and tell me where you find it? What version of Redmine are you using?

maxrossello commented 10 years ago

A full stack trace would help

perbit commented 10 years ago

I use bitnami rubystack-1.9.3-21 with redmine module. After I installed redmine, I deleted the default user. I searched the text ( "IN ('User', 'AnonymousUser')", but I found only the log file.

Environment: Redmine version 2.4.3.stable Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32] Rails version 3.2.16 Environment production Database adapter Mysql2 SCM: Subversion 1.8.5 Filesystem
Redmine plugins: global_roles 0.0.1 issuefy 0.2.0 redmine_app__space 1.0.1 redmine_app_timesheets 1.3.6 redmine_email_inline_images 1.0.0 redmine_helpdesk 0.0.8 redmine_hours 0.1.1 redmine_image_clipboard_paste 1.0.0 redmine_issue_checklist 2.0.5 redmine_knowledgebase 3.0.2 redmine_people 0.1.6 redmine_plugin_views_revisions 0.0.1 redmine_release_notes 1.3.1 redmine_spent_time 2.6.2 redmine_todos 2.0.5 redmine_watcher_groups 1.0.0 redmine_xls_export 0.2.1.t5 redmine_zenedit 0.0.2

logfile: https://www.dropbox.com/s/d2hftysksjo28ai/production.zip

maxrossello commented 10 years ago

Did you set a group for Order Management app in /settings/plugin/redmine_app__space or left it to everybody?

maxrossello commented 10 years ago

Ok, thanks to the log I understood the problem. Will fix it tomorrow. Thanks

perbit commented 10 years ago

Yes. redmine_space

maxrossello commented 10 years ago

Fixed in 1.3.7. Thanks

grinkod commented 10 years ago

Hello, i have the similar error When i open "Application" > "Orders" page I get "Page not found 404 " error in the logs:

Started GET "/apps/order_mgmt" for 192.168.0.28 at 2014-03-17 18:33:46 +0200 Processing by OrdersController#index as HTML Current user: dgrinko (id=31) Rendered common/error.html.erb within layouts/base (0.1ms) Completed 404 Not Found in 16.2ms (Views: 12.4ms | ActiveRecord: 2.0ms) Started GET "/apps" for 192.168.0.28 at 2014-03-17 18:35:01 +0200 Processing by AppspaceController#index as HTML Current user: dgrinko (id=31) Rendered plugins/redmine_app__space/app/views/appspace/applications.html.erb within layouts/base (1.3ms) Completed 200 OK in 17.5ms (Views: 13.1ms | ActiveRecord: 2.0ms) Started GET "/apps/order_mgmt" for 192.168.0.28 at 2014-03-17 18:35:04 +0200 Processing by OrdersController#index as HTML Current user: dgrinko (id=31) Rendered common/error.html.erb within layouts/base (0.1ms) Completed 404 Not Found in 15.8ms (Views: 12.1ms | ActiveRecord: 2.0ms) Started GET "/apps/order_mgmt/create" for 192.168.0.28 at 2014-03-17 18:35:08 +0200

maxrossello commented 10 years ago

Since I fixed the issue, if a problem is still there after having upgraded to latest version please open another issue indicating the new version. Moreover, your issue is not similar since this issue's problem was on creation only, while you cannot access the order management application at all. In the new issue please also report if you can access /apps/order_mgmt with an admin user. Thanks