Project

General

Profile

Actions

Defect #13169

closed

Accessing issue's attachments error - 404 - The page you were trying to access doesn't exist or has been removed.

Added by Tomasz Zieleniewski about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi,

We made an update from 2.1.5 to 2.2.2.
After some time after update we encountered an error when trying to access attachments in existing issues.
As the result there is an 404 page displayed with an information:
"The page you were trying to access doesn't exist or has been removed."

Below redmine log in debug level which suggest that all queries are succesful

Started GET "/redmine/attachments/download/185/parametry.jpg" for 10.23.22.220 at Thu Feb 14 09:33:37 +0100 2013
Processing by AttachmentsController#download as HTML
  Parameters: {"id"=>"185", "filename"=>"parametry.jpg"}
   (0.5ms)  SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings`
  User Load (0.9ms)  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = ? AND (users.status = 1) LIMIT 1  [["id", 6]]
  Current user: Tomasz.Zieleniewski@t-mobile.pl (id=6)
  Attachment Load (0.3ms)  SELECT `attachments`.* FROM `attachments` WHERE `attachments`.`id` = ? LIMIT 1  [["id", "185"]]
  Issue Load (0.4ms)  SELECT `issues`.* FROM `issues` WHERE `issues`.`id` = 418 LIMIT 1
  Project Load (0.3ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 18 LIMIT 1
  Rendered common/error.html.erb within layouts/base (0.3ms)
  UserPreference Load (0.5ms)  SELECT `user_preferences`.* FROM `user_preferences` WHERE `user_preferences`.`user_id` = 6 LIMIT 1
  SQL (1.1ms)  SELECT `members`.`id` AS t0_r0, `members`.`user_id` AS t0_r1, `members`.`project_id` AS t0_r2, `members`.`created_on` AS t0_r3, `members`.`mail_notification` AS t0_r4, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `roles`.`id` AS t2_r0, `roles`.`name` AS t2_r1, `roles`.`position` AS t2_r2, `roles`.`assignable` AS t2_r3, `roles`.`builtin` AS t2_r4, `roles`.`permissions` AS t2_r5, `roles`.`issues_visibility` AS t2_r6 FROM `members` LEFT OUTER JOIN `projects` ON `projects`.`id` = `members`.`project_id` LEFT OUTER JOIN `member_roles` ON `member_roles`.`member_id` = `members`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `member_roles`.`role_id` WHERE `members`.`user_id` = 6 AND (projects.status<>9) ORDER BY projects.name
  Project Load (1.0ms)  SELECT `projects`.* FROM `projects` WHERE (`projects`.`lft` <= 32 AND `projects`.`rgt` >= 33) AND (`projects`.id != 18) AND (projects.status <> 9) ORDER BY `projects`.`lft`
  EnabledModule Load (0.5ms)  SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 18
  Project Load (0.4ms)  SELECT `projects`.* FROM `projects` WHERE `projects`.`parent_id` IS NULL AND (`projects`.`lft` <= 32 AND `projects`.`rgt` >= 33) ORDER BY `projects`.`lft` LIMIT 1
   (0.2ms)  SELECT COUNT(DISTINCT `versions`.`id`) FROM `versions` LEFT OUTER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 18 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 29 AND projects.rgt <= 38 AND versions.sharing = 'tree') OR (projects.lft < 32 AND projects.rgt > 33 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 32 AND projects.rgt < 33 AND versions.sharing = 'hierarchy'))))
  Wiki Load (0.6ms)  SELECT `wikis`.* FROM `wikis` WHERE `wikis`.`project_id` = 18 LIMIT 1
   (0.5ms)  SELECT COUNT(*) FROM `boards` WHERE `boards`.`project_id` = 18
  Repository Load (0.3ms)  SELECT `repositories`.* FROM `repositories` WHERE `repositories`.`project_id` = 18 AND (is_default = 1) LIMIT 1
Filter chain halted as :file_readable rendered or redirected
Completed 404 Not Found in 93ms (Views: 74.2ms | ActiveRecord: 7.4ms)

Environment information: Debian OS 6.0

Actions #1

Updated by Etienne Massip about 11 years ago

Any plugins?

Actions #2

Updated by Tomasz Zieleniewski about 11 years ago

Environment:
  Redmine version                          2.2.2.stable.11328
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.11
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  due_date_reminder                        0.3.2
  redmine_monitoring_controlling           0.1.1
Actions #3

Updated by Jean-Philippe Lang about 11 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Filter chain halted as :file_readable rendered or redirected

This means that the file is not present on the disk or is not readable. Check that the file exists and that the application has the read permissions.

Actions #4

Updated by Tomasz Zieleniewski about 11 years ago

Cheers.
It appeared that there was not file. I though that files were hold directly in the database.
During migration I didn't move the files from the files directory. It would be good to add such info in the upgrade/migration manual.

Actions #5

Updated by Etienne Massip about 11 years ago

It's point 4 of RedmineUpgrade.

Actions

Also available in: Atom PDF