Skip to content

Importing table rates not working when using S3 storage adapter #33072

Closed
@apachler

Description

@apachler

Preconditions (*)

  1. Magento 2.4.2
  2. PHP 7.4
  3. Activated S3 storage adapter in Magento

Steps to reproduce (*)

  1. Export the tablerates.csv in Backend
  2. Import the exported tablerates.csv in Backend

Expected result (*)

  1. Uploaded tablesrates.csv file is processed.

Actual result (*)

  1. File "https://[bucket].s3.eu-central-1.amazonaws.com/[prefix]/tmp/phpLjGmHf" not found.

Details

It seems there is a problem with the "uploadAndImport" method in "/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php".
It gets the path of the uploaded file from the $_FILES global variable and passes it to "$this->filesystem->getDirectoryReadByPath($dirName)" in the "getCsvFile" method.

Since the S3 storage adapter is active, this call is returning a location on the S3 bucket but the file is not existing there.
The file exists on the local filesystem located in the path defined by the PHP var "upload_tmp_dir".


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • 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

No one assigned

    Labels

    Component: RemoteStorageIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions