Skip to content

Remove requirement for deployed_version.txt file #6437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ihor-sviziev
Copy link
Contributor

@ihor-sviziev ihor-sviziev commented Sep 1, 2016

After Upgrading to Magento 2.1.1 we had following exception when magento mode is "production" and we executing php bin/magento setup:statis-content:deploy:

[Magento\Framework\Exception\FileSystemException]                                                                                                                                                                        
  Cannot read contents from file "/vhosts/www/magento2/pub/static/deployed_version.txt" Warning!file_get_contents(/vhosts/www/magento2/pub/static/deployed_version.txt): failed to open stream: N  
  o such file or directory                                                                                                                                                                                                 



Exception trace:
 () at /vhosts/www/magento2/vendor/magento/framework/Filesystem/Driver/File.php:149
 Magento\Framework\Filesystem\Driver\File->fileGetContents() at /vhosts/www/magento2/vendor/magento/framework/Filesystem/Directory/Read.php:207
 Magento\Framework\Filesystem\Directory\Read->readFile() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version/Storage/File.php:44
 Magento\Framework\App\View\Deployment\Version\Storage\File->load() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version.php:77
 Magento\Framework\App\View\Deployment\Version->readValue() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version.php:49
 Magento\Framework\App\View\Deployment\Version->getValue() at /vhosts/www/magento2/vendor/magento/module-theme/Model/Url/Plugin/Signature.php:88
 Magento\Theme\Model\Url\Plugin\Signature->renderUrlSignature() at /vhosts/www/magento2/vendor/magento/module-theme/Model/Url/Plugin/Signature.php:66
 Magento\Theme\Model\Url\Plugin\Signature->aroundGetBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/Interception/Interceptor.php:142
 Magento\Store\Model\Store\Interceptor->___callPlugins() at /vhosts/www/magento2/var/generation/Magento/Store/Model/Store/Interceptor.php:143
 Magento\Store\Model\Store\Interceptor->getBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/Url.php:452
 Magento\Framework\Url->getBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/View/Asset/Repository.php:266
 Magento\Framework\View\Asset\Repository->getFallbackContext() at /vhosts/www/magento2/vendor/magento/framework/View/Asset/Repository.php:244
 Magento\Framework\View\Asset\Repository->getStaticViewFileContext() at /vhosts/www/magento2/vendor/magento/framework/RequireJs/Config.php:123
 Magento\Framework\RequireJs\Config->__construct() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93
 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:89
 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php:57
 Magento\Framework\ObjectManager\ObjectManager->create() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/Deployer.php:252
 Magento\Deploy\Model\Deployer->deploy() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:445
 Magento\Deploy\Console\Command\DeployStaticContentCommand->deploy() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:468
 Magento\Deploy\Console\Command\DeployStaticContentCommand->Magento\Deploy\Console\Command\{closure}() at n/a:n/a
 call_user_func() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/Process.php:53
 Magento\Deploy\Model\Process->run() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/ProcessManager.php:41
 Magento\Deploy\Model\ProcessManager->fork() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:473
 Magento\Deploy\Console\Command\DeployStaticContentCommand->runProcessesInParallel() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:371
 Magento\Deploy\Console\Command\DeployStaticContentCommand->execute() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /vhosts/www/magento2/vendor/magento/framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /vhosts/www/magento2/bin/magento:23

This pull request will fix this issue.
Fixes #6426

…content:deploy

After Upgrading to Magento 2.1.1 we had following exception when magento mode is "production" and we executing php bin/magento setup:statis-content:deploy:
```
[Magento\Framework\Exception\FileSystemException]                                                                                                                                                                        
  Cannot read contents from file "/vhosts/www/magento2/pub/static/deployed_version.txt" Warning!file_get_contents(/vhosts/www/magento2/pub/static/deployed_version.txt): failed to open stream: N  
  o such file or directory                                                                                                                                                                                                 
                                                                                                                                                                                                                           


Exception trace:
 () at /vhosts/www/magento2/vendor/magento/framework/Filesystem/Driver/File.php:149
 Magento\Framework\Filesystem\Driver\File->fileGetContents() at /vhosts/www/magento2/vendor/magento/framework/Filesystem/Directory/Read.php:207
 Magento\Framework\Filesystem\Directory\Read->readFile() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version/Storage/File.php:44
 Magento\Framework\App\View\Deployment\Version\Storage\File->load() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version.php:77
 Magento\Framework\App\View\Deployment\Version->readValue() at /vhosts/www/magento2/vendor/magento/framework/App/View/Deployment/Version.php:49
 Magento\Framework\App\View\Deployment\Version->getValue() at /vhosts/www/magento2/vendor/magento/module-theme/Model/Url/Plugin/Signature.php:88
 Magento\Theme\Model\Url\Plugin\Signature->renderUrlSignature() at /vhosts/www/magento2/vendor/magento/module-theme/Model/Url/Plugin/Signature.php:66
 Magento\Theme\Model\Url\Plugin\Signature->aroundGetBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/Interception/Interceptor.php:142
 Magento\Store\Model\Store\Interceptor->___callPlugins() at /vhosts/www/magento2/var/generation/Magento/Store/Model/Store/Interceptor.php:143
 Magento\Store\Model\Store\Interceptor->getBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/Url.php:452
 Magento\Framework\Url->getBaseUrl() at /vhosts/www/magento2/vendor/magento/framework/View/Asset/Repository.php:266
 Magento\Framework\View\Asset\Repository->getFallbackContext() at /vhosts/www/magento2/vendor/magento/framework/View/Asset/Repository.php:244
 Magento\Framework\View\Asset\Repository->getStaticViewFileContext() at /vhosts/www/magento2/vendor/magento/framework/RequireJs/Config.php:123
 Magento\Framework\RequireJs\Config->__construct() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93
 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:89
 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() at /vhosts/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php:57
 Magento\Framework\ObjectManager\ObjectManager->create() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/Deployer.php:252
 Magento\Deploy\Model\Deployer->deploy() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:445
 Magento\Deploy\Console\Command\DeployStaticContentCommand->deploy() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:468
 Magento\Deploy\Console\Command\DeployStaticContentCommand->Magento\Deploy\Console\Command\{closure}() at n/a:n/a
 call_user_func() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/Process.php:53
 Magento\Deploy\Model\Process->run() at /vhosts/www/magento2/vendor/magento/module-deploy/Model/ProcessManager.php:41
 Magento\Deploy\Model\ProcessManager->fork() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:473
 Magento\Deploy\Console\Command\DeployStaticContentCommand->runProcessesInParallel() at /vhosts/www/magento2/vendor/magento/module-deploy/Console/Command/DeployStaticContentCommand.php:371
 Magento\Deploy\Console\Command\DeployStaticContentCommand->execute() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /vhosts/www/magento2/vendor/magento/framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at /vhosts/www/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /vhosts/www/magento2/bin/magento:23
```

This pull request will fix this issue.
Fixes magento#6426
davidalger added a commit to davidalger/capistrano-magento2 that referenced this pull request Sep 8, 2016
@MomotenkoNatalia
Copy link
Contributor

Hi @ihor-sviziev
Thanks for your contribution!
But looks like this issue was fixed and delivered to mainline. Please check #6426 (comment)

@ihor-sviziev
Copy link
Contributor Author

ihor-sviziev commented Sep 21, 2016

@MomotenkoNatalia thank you! waiting for release that will include this fix.

@bery
Copy link

bery commented Jan 18, 2017

Check #6426 (comment) for workaround

@ihor-sviziev ihor-sviziev deleted the patch-1 branch June 24, 2017 07:00
rganin pushed a commit to magento-arcticfoxes/magento2 that referenced this pull request Dec 16, 2020
* MC-39766: [AWS S3] Video cannot be added to the product
* MC-39799: Issue with downloading exported product with S3 storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants