Defect #20277
"Couldn't find template for digesting" error in the log when sending a thumbnail or an attachment
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Attachments | |||
Target version: | 3.4.13 | |||
Resolution: | Fixed | Affected version: | 3.0.3 |
Description
- Activate thumbnails in the Redmine configuration (Checkbox in the Display tabof Adminstration\Settings)
- Display an issue which has attached images
- 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.
Associated revisions
Fix "Couldn't find template for digesting" error in the log when sending an attachment or thumbnail (#20277).
Patch by Olivier Houdas.
History
#1
Updated by Jonathan Tee almost 7 years ago
same with Redmine 3.1
Ruby 2.2.1, Rails 4.2, fcgid
#2
Updated by Pavel Potcheptsov over 5 years ago
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
#3
Updated by Karel Pičman over 5 years ago
I'm facing the same problem. Any ideas?
#4
Updated by Thomas Löber over 5 years ago
You could set AttachmentsController.etag_with_template_digest = false
.
#5
Updated by Olivier Houdas over 5 years ago
- File redmine#20277.patch
added
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
#6
Updated by Karel Pičman over 5 years ago
The patch works well. Thank you. Hopefully it will be applied to the Redmine's source code too.
#7
Updated by Pavel Potcheptsov over 5 years ago
Thanks.
#8
Updated by Go MAEDA over 2 years ago
- Status changed from New to Resolved
The error still can be seen in the latest trunk (4.0.5.devel.19347).
#9
Updated by Go MAEDA over 2 years ago
- Status changed from Resolved to Confirmed
#10
Updated by Go MAEDA over 2 years ago
- File 20277-v2.patch
added
- Target version set to 3.4.13
LGTM. Setting the target version to 3.4.13.
The attached is an updated patch that can be applied to the latest trunk.
#11
Updated by Go MAEDA over 2 years ago
- 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.