Skip to content

404 missing file while downloading file product custom option expired by Quote Lifetime & Enable Clear Shopping Cart #39529

Open
@tuyennn

Description

@tuyennn

Preconditions and environment

  • Magento version: All version

Steps to reproduce

  1. From Admin create a product and Customizable Options with Option type: File
  2. From frontend purchase this product with an attached file: sample.jpg
  3. Placing order with this.
  4. After expired the period of Quote Lifetime & Enable Clear Shopping Cart: Yes from (Stores > Configuration > Sales > Checkout > Shopping Cart)
  5. Open order detail: from customer side, or admin side to download sample.jpg from order above.

Expected result

  • Attached file sample.jpg could be downloaded

Actual result

  • 404 while attempting to download attached file sample.jpg from order item option

Additional information

Download controller requested to quote_item_option table where the quote of current order was no longer exist by Quote Lifetime & Enable Clear Shopping Cart leading the request to 404.

here is a constraint key relationship between the following tables: quote => quote_item => quote_item_option, tables.

For faster reproduction, you can manually delete the quote instead of waiting for the Quote Lifetime to expire.

Suggestion

  • Modify the download functionality to fetch the file from the sales_order_item table.
  • Alternatively, introduce a new table, sales_order_item_option, to store attached file references that are independent of the quote expiration and cleaning process.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: OrderComponent: DBIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions