kiwamu / redmine_access_logger

This is a Redmine plugin for access logging with user name.
2 stars 1 forks source link

when I upload a attachment, it seems some problem #1

Open archonwang opened 12 years ago

archonwang commented 12 years ago

Hi, kiwamu

I create a new issue then upload a file. then save .

the server return the error with 500.

Could you tell me how to solver it? Thanks.

the related log as follows:

Processing IssuesController#update (for 192.168.3.38 at 2011-11-17 17:13:37) [PUT] Parameters: {"commit"=>"submit", "notes"=>"", "action"=>"update", "_method"=>"put", "authenticity_token"=>"xQ8zrIQK9KaICKB1l1uMPekpjCQV7FK2O5+ZiQ1KTsw=", "id"=>"2532", "relation_issue_id"=>"", "issue"=>{"start_date"=>"2011-11-17", "custom_field_values"=>{"6"=>"code", "7"=>"", "8"=>"77", "3"=>"", "4"=>"IE8.0", "5"=>"C:一般"}, "estimated_hours"=>"", "parent_issue_id"=>"", "priority_id"=>"5", "is_private"=>"0", "lock_version"=>"1", "fixed_version_id"=>"", "assigned_to_id"=>"", "subject"=>"TEST issues into access logger", "tracker_id"=>"1", "due_date"=>"", "status_id"=>"1", "description"=>"

22

\r\n"}, "controller"=>"issues", "attachments"=>{"1"=>{"file"=>#File:/tmp/RackMultipart20111117-15944-17rzko3-0, "description"=>"的"}, "screenshot"=>{"name"=>"screenshot", "content"=>"", "description"=>""}}}

ArgumentError (redundant UTF-8 sequence): vendor/plugins/redmine_access_logger/app/controllers/application_controller_patch.rb:16:in access_logging' /usr/local/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:inservice' /usr/local/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:173:instart_thread' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:instart_thread' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:ineach' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:23:instart' /usr/local/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering /usr/local/redmine-1.2/public/500.html (500 Internal Server Error)

archonwang commented 12 years ago

It seems that I upload a file with the name in Japanese or Chinese.

Could it be modified in the next version? Thanks.

kiwamu commented 12 years ago

Hi, archonwang

Thank you for using access logger plugin and reporting problem. I tried to reproduce your problem with some file with an adequate Japanese name, for example, "テスト.txt", but I coldn't reproduce it. Please tell me your filename.

Thanks.

archonwang commented 12 years ago

Thanks for your reply.

I used : WinXP SP3 SimplChinese Redmine 1.2.X Mysql :5.X Rails 2.3.11 json: 1.6.1

It's my file name like this : "正态分布曲线.pptx" then I choose the file and upload it. then click to Save Then Error. ##############################################################

ArgumentError (redundant UTF-8 sequence): D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' vendor/plugins/redmine_access_logger/app/controllers/application_controller_patch.rb:16:in access _logging' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/httpserver.rb:104:inservice' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/httpserver.rb:65:in run' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:173:instart_thread' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:162:in start' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:162:instart_thread' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:95:in start' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:92:ineach' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:92:in start' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:23:instart' D:/RailsInstaller/Ruby1.8.7/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering rescues/layout (internal_server_error) ##############################################################

I see the error page show this:

############################################################## ArgumentError in IssuesController#create

redundant UTF-8 sequence

RAILS_ROOT: D:/redmine Application Trace | Framework Trace | Full Trace

D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoding.rb:68:in unpack' D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoding.rb:68:inescape' D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoding.rb:63:in gsub' D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoding.rb:63:inescape' D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb:3:in to_json' D:/redmine/vendor/rails/activesupport/lib/active_support/json/encoding.rb:79:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode' D:1:in __send__' D:1:inencode'

Request

Parameters:

{"project_id"=>"demoprj", "authenticity_token"=>"vbschJd6KUyQcnRD+3fHFRdf1aF/1ebhaGZIjnshs+0=", "issue"=>{"start_date"=>"2011-11-21", "estimated_hours"=>"0.00", "priority_id"=>"4", "parent_issue_id"=>"", "is_private"=>"0", "fixed_version_id"=>"", "subject"=>"bbbbbcccccc", "assigned_to_id"=>"", "tracker_id"=>"1", "due_date"=>"", "description"=>"

asdfadfadfadfadsf

\r\n

adsfa

\r\n

dsfasdf

\r\n

asdfasdfasdf

\r\n", "status_id"=>"1"}, "attachments"=>{"1"=>{"description"=>"aafafafasfaf", "file"=>#File:C:/DOCUME~1/HP/LOCALS~1/Temp/RackMultipart20111121-6280-21sxfr-0}, "screenshot"=>{"name"=>"screenshot", "content"=>"", "description"=>""}}, "new_checklist"=>"", "continue"=>"创建并继续"}

##############################################################