Project

General

Profile

Actions

Defect #20277

closed

"Couldn't find template for digesting" error in the log when sending a thumbnail or an attachment

Defect #20277: "Couldn't find template for digesting" error in the log when sending a thumbnail or an attachment

Added by Olivier Houdas over 11 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Attachments
Target version:
Resolution:
Fixed
Affected version:

Description

  1. Activate thumbnails in the Redmine configuration (Checkbox in the Display tabof Adminstration\Settings)
  2. Display an issue which has attached images
  3. Check the log of Redmine

    ERROR -- : Couldn't find template for digesting: attachments/thumbnail
    ERROR -- : Couldn't find template for digesting: attachments/download

Tested without any plugin, on Redmine 3.0.3 (Rails 4.2), on Linux CentOS.

The messages are triggered in calls to stale?() in app/controllers/attachments_controller.rb in methods download and thumbnail, and consequently do not break anything in the application, it just never uses the cache.


Files

redmine#20277.patch (1.37 KB) redmine#20277.patch Olivier Houdas, 2016-12-05 10:20
20277-v2.patch (1.04 KB) 20277-v2.patch Go MAEDA, 2019-12-11 08:43

Updated by Jonathan Tee over 11 years ago Actions #1

same with Redmine 3.1
Ruby 2.2.1, Rails 4.2, fcgid

Updated by Pavel Potcheptsov about 10 years ago Actions #2

Same even if checkbox for thumbnails isn't set.

  Couldn't find template for digesting: attachments/download
  Couldn't find template for digesting: attachments/download

Environment:
  Redmine version                3.3.0.stable.15842
  Ruby version                   1.9.3-p327 (2012-11-10) [i686-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2

Updated by Karel Pičman about 10 years ago Actions #3

I'm facing the same problem. Any ideas?

Updated by Thomas Löber almost 10 years ago Actions #4

You could set AttachmentsController.etag_with_template_digest = false.

Updated by Olivier Houdas almost 10 years ago Actions #5

Thank you for the hint to the Rails part involved.
Then, maybe simply adding the :template => false to the two stale?() calls would be the most appropriate.

Note: the attached patch is based on the code of Redmine 3.3.1

Updated by Karel Pičman almost 10 years ago Actions #6

The patch works well. Thank you. Hopefully it will be applied to the Redmine's source code too.

Updated by Pavel Potcheptsov almost 10 years ago Actions #7

Thanks.

Updated by Go MAEDA almost 7 years ago Actions #8

  • Status changed from New to Resolved

The error still can be seen in the latest trunk (4.0.5.devel.19347).

Updated by Go MAEDA almost 7 years ago Actions #9

  • Status changed from Resolved to Confirmed

Updated by Go MAEDA almost 7 years ago Actions #10

LGTM. Setting the target version to 3.4.13.

The attached is an updated patch that can be applied to the latest trunk.

Updated by Go MAEDA almost 7 years ago Actions #11

  • Subject changed from Errors in Redmine log when displaying an issue with attachments to "Couldn't find template for digesting" error in the log when sending a thumbnail or an attachment
  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you all for your contribution.

Actions

Also available in: PDF Atom