Actions
Defect #31141
closedSCM: error when *.yml and *.txt show
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
lib/redmine/sudo_mode.rb:65:in `sudo_mode' Started GET "/test-trunk/projects/test01/repository/18/entry/test00.yml" for 127.0.0.1 at 2019-04-04 15:41:16 +0900 Processing by RepositoriesController#entry as YAML Parameters: {"id"=>"test01", "repository_id"=>"18", "path"=>"test00.yml"} Current user: admin (id=1) Completed 406 Not Acceptable in 295ms (ActiveRecord: 144.4ms) ActionController::UnknownFormat (RepositoriesController#entry is missing a template for this request format and variant. request.formats: ["application/x-yaml"] request.variant: []):
This error is in only tunk, not in 4.0-stable.
Files
Related issues
Updated by Toshi MARUYAMA over 5 years ago
- Subject changed from SCM: error when *.yml shows to SCM: error when *.yml and *.txt show
*.txt also causes error.
lib/redmine/sudo_mode.rb:65:in `sudo_mode' Started GET "/test-trunk/projects/redmine-bb-all/repository/15/entry/test/fixtures/files/japanese-utf-8.txt" for 127.0.0.1 at 2019-04-30 01:52:34 +0900 Processing by RepositoriesController#entry as TEXT Parameters: {"id"=>"redmine-bb-all", "repository_id"=>"15", "path"=>"test/fixtures/files/japanese-utf-8.txt"} Current user: admin (id=1) Completed 406 Not Acceptable in 343ms (ActiveRecord: 157.4ms) ActionController::UnknownFormat (RepositoriesController#entry is missing a template for this request format and variant. request.formats: ["text/plain"] request.variant: []):
Updated by Mizuki ISHIKAWA over 5 years ago
Updated by Go MAEDA over 5 years ago
- Related to Defect #30850: Unified diff link broken on specific file/revision diff view added
Updated by Mizuki ISHIKAWA over 5 years ago
By changing to format: false, in the case of request like "/test-trunk/projects/redmine-bb-all/repository/15/entry/test/fixtures/files/japanese-utf-8.txt", the end ".txt" is interpreted as the format.
I think that the exception was caused by not being found even if you look for the view file like entry.text.
exception message:
ActionView::MissingTemplate: Missing template repositories/entry, application/entry with {:locale=>[:en], :formats=>[:text], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rsb]}
Updated by Mizuki ISHIKAWA over 5 years ago
- File fix-31141.patch fix-31141.patch added
I have attached a patch to fix this problem.
Updated by Go MAEDA over 5 years ago
Mizuki ISHIKAWA wrote:
I have attached a patch to fix this problem.
I have confirmed that the patch fixes the issue. Tested with yml, txt, and gif files.
Updated by Toshi MARUYAMA over 5 years ago
- File fix-31141-1.diff fix-31141-1.diff added
Updated by Go MAEDA over 5 years ago
- Has duplicate Defect #31478: RepositoriesController entry is missing a template for Image added
Updated by Go MAEDA over 5 years ago
- Status changed from Confirmed to Closed
- Resolution set to Fixed
Fixed in r18206.
Actions