Project

General

Profile

Actions

task #45

open

HTTP error 406 during recurrence creation (text/html format requested)

Added by issrec over 1 year ago. Updated 8 months ago.

Status:
in progress
Priority:
bug
Assignee:
Target version:
Redmine version:
4.2.x

Description

After adding a recurring issue, the page with the URI Pattern /issues/:issue_id/recurrences is loaded, which ends with a 406 error (presented by the browser's default page).
The following entry can be found in the Redmine logs:

...
I, [2023-11-24T19:52:56.765771 #1]  INFO -- : Started POST "/issues/4549/recurrences" for 192.168.235.13 at 2023-11-24 19:52:56 +0000
I, [2023-11-24T19:52:56.766672 #1]  INFO -- : Processing by IssueRecurrencesController#create as HTML
I, [2023-11-24T19:52:56.766728 #1]  INFO -- :   Parameters: {"utf8"=>"✓", "recurrence"=>{"creation_mode"=>"copy_first", "include_subtasks"=>"false", "multiplier"=>"1", "mode"=>"monthly_day_from_first", "anchor_to_start"=>"true", "anchor_mode"=>"first_issue_fixed", "delay_multiplier"=>"0", "delay_mode"=>"day", "count_limit"=>"2"}, "limit_mode"=>"count", "commit"=>"Add", "authenticity_token"=>"4Vkq5XOfiewXsPDqb7mKO+YQZTdhSLSk/unuuYmbFofKo+RxDpfHNcA2jGvKUC3qTjlw9cKo8EZd7KjW0CXJ0g==", "issue_id"=>"4549"}
I, [2023-11-24T19:52:56.771993 #1]  INFO -- :   Current user: test (id=64)
I, [2023-11-24T19:52:56.815807 #1]  INFO -- : Completed 406 Not Acceptable in 49ms (ActiveRecord: 10.6ms)
F, [2023-11-24T19:52:56.816894 #1] FATAL -- :
F, [2023-11-24T19:52:56.817124 #1] FATAL -- : ActionController::UnknownFormat (IssueRecurrencesController#create is missing a template for this request format and variant.
request.formats: ["text/html"]
request.variant: []):
F, [2023-11-24T19:52:56.817359 #1] FATAL -- :
F, [2023-11-24T19:52:56.817499 #1] FATAL -- : lib/redmine/sudo_mode.rb:61:in `sudo_mode'
...

The plugin creates three routes: View details...


The table of existing issue recurrences is implemented using the create action. The same functionality for project is implemented using the index action. According to the logged error message, the plugin is missing an html template for the create action. Looking at the files in plugins/issue_recurring/app/views/issue_recurrences/, you can see that there is an index.html.erb file/template, but no create.html.erb file/template.


The workaround for this error is to create a symbolic link using the command:

ln -f -s -T index.html.erb create.html.erb


Files

Actions

Also available in: Atom PDF