Closed
Description
Preconditions
- Magento 2.4-develop
Steps to reproduce
- Set media storage to database
- Upload category image in admin section
- Save the category
Expected result
- The image row in media_storage_file_storage table should have directory
catalog/category
and correctdirectory_id
Actual result
- The image row in media_storage_file_storage table has directory
catalog/tmp/category
I believe the problem lies with the directory_id
not being changed in method Magento\MediaStorage\Model\ResourceModel\File\Storage\Database::copyFile
When I manually change the directory_id
in $data
from the catalog/tmp/category
directory_id to the catalog/category
directory_id before running the $connection->insertOnDuplicate
method the file is correctly copied to another row with the correct data.
As another note, should it not convert the existing row to simply change the directory_id
and directory
rather than copying to a new row...
Metadata
Metadata
Assignees
Labels
Issue recommended for the contribution dayGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.
Type
Projects
Status
Done