-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: ImportExportFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug report
Description
Preconditions
- PHP upload_tmp_dir is set to a directory outside
/tmp/
. - Magento CE 2.1.x, code still in latest version here: https://github.com/magento/magento2/blob/develop/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php#L315
Steps to reproduce
- Make a new directory for uploads, eg
mkdir -p /var/lib/php/uploads && chmod 1777 /var/lib/php/uploads
- Set PHP
upload_tmp_dir
to this directory. eg, addupload_tmp_dir = /var/lib/php/uploads
to/etc/php.ini
- Login to Magento Admin
- Go to Stores > Configuration > Sales > Shipping Methods
- Select Table Rates, and enable
- Click "Import"
- Choose a file, click save.
Expected result
- Table rates are updated
Actual result
- Receive an error, eg
The file “/tmp/var/lib/php/uploads/phphEpJe5” doesn’t exist
Cause
This behaviour occurs because getCsvFile
opens the /tmp
directory, then looks for the uploaded file relative to that directory. This only works when upload_tmp_directory
is set to /tmp
, or a subdirectory of /tmp
.
Metadata
Metadata
Assignees
Labels
Component: ImportExportFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug report