magento / magento/magento2-sample-data

Downloadable products not created

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
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
```
![Image](https://github.com/user-attachments/assets/824bf6e2-7424-4065-bb23-17b7856dc9c1)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.