magento / magento/magento2-sample-data
Downloadable products not created
- Dominant language
- PHP
- Stars
- 212
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
After running:
- php bin/magento sampledata:deploy
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
I notice the Magento installation has no downloadable products.
It does have bundle, configurable, simple, but no downloadable.
I do see that the Categories for the Downloadable sample data have been created.
After attempting to force an install or an error by directly calling the function using magerun i noticed the following:
`magerun2 dev:console`
```php
$di->get(\Magento\Framework\App\State::class)->setAreaCode('global');
$di->get(\Magento\DownloadableSampleData\Setup\Installer::class)->install();
```
i see the following warnings and errors:
```
WARNING file_get_contents(pub/media/downloadable/files/samples/l/u/luma_background_-_model_against_fence_4_sec_.mp4): Failed to open stream: No such file or directory in vendor/magento/module-downloadable-sample-data/Model/Product/Converter.php on line 161.
Magento\Framework\Exception\InputException Provided content must be valid base64 encoded data
```

Insinuating `sample-data-media` has not moved the files correctly or at the right moment.
Copying this file myself, i can run the install function and i have downloadable products.
Contributor guide
No contributing guide indexed for this repository
Research direction
Run the listed sample-data deployment commands, then inspect Magento\DownloadableSampleData\Setup\Installer and vendor/magento/module-downloadable-sample-data/Model/Product/Converter.php around line 161. Check how sample-data-media places the referenced MP4 before installation; done means downloadable products are created without manually copying the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100