Skip to content
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

Can't add custom theme #3409

Closed
serzhik opened this issue Feb 15, 2016 · 12 comments
Closed

Can't add custom theme #3409

serzhik opened this issue Feb 15, 2016 · 12 comments

Comments

@serzhik
Copy link
Contributor

serzhik commented Feb 15, 2016

When I try to generate static content for my custom theme I get an error:

=== frontend -> Vendor/theme -> en_US ===
Unable to load theme by specified key: 'Vendor/theme'>

#0 C:\www\site.loc\www\vendor\magento\module-theme\Model\View\Design.php(147): Magento\Framework\View\Design\Theme\FlyweightFactory->create('Vendor/theme', 'frontend')
#1 C:\www\site.loc\www\vendor\magento\module-deploy\Model\Deployer.php(140): Magento\Theme\Model\View\Design->setDesignTheme('Vendor/theme', 'frontend')
#2 C:\www\site.loc\www\vendor\magento\module-deploy\Console\Command\DeployStaticContentCommand.php(120): Magento\Deploy\Model\Deployer->deploy(Object(Magento\Framework\App\ObjectManagerFactory), Array)
#3 C:\www\site.loc\www\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(257): Magento\Deploy\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 C:\www\site.loc\www\vendor\symfony\console\Symfony\Component\Console\Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 C:\www\site.loc\www\vendor\symfony\console\Symfony\Component\Console\Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Deploy\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 C:\www\site.loc\www\vendor\magento\framework\Console\Cli.php(49): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 C:\www\site.loc\www\vendor\symfony\console\Symfony\Component\Console\Application.php(126): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 C:\www\site.loc\www\bin\magento(25): Symfony\Component\Console\Application->run()
#9 {main}
@serzhik
Copy link
Contributor Author

serzhik commented Feb 15, 2016

After runing composer update problem was fixed.

@serzhik serzhik closed this as completed Feb 15, 2016
@serzhik serzhik reopened this Feb 16, 2016
@davidalger
Copy link
Member

@serzhik Your latest comment states the issue was fixed by running composer updated, but then you re-opened the issue. Are you still encountering errors. generating static content? If so, can you post details… steps to reproduce, php / mysql versions, etc?

@serzhik
Copy link
Contributor Author

serzhik commented Feb 16, 2016

  1. Install Magento 2.0.2.
  2. Copy custom theme to app/design/frontend/Vendor/theme
  3. Run php bin/magento setup:upgrade
  4. Run php bin/magento setup:static-content:deploy
  5. Get an error.

@serzhik
Copy link
Contributor Author

serzhik commented Feb 16, 2016

I think it can be related to #2797

@serzhik
Copy link
Contributor Author

serzhik commented Feb 17, 2016

I delete folder vendor and run composer update.
Problem was resolved.

@serzhik serzhik closed this as completed Feb 17, 2016
@davidalger
Copy link
Member

Good to know. If you run into this again, let us know!

@grasdaggel
Copy link

We have the same problem but no chance to use the composer over the Terminal. Any other ideas how to fix it?

@serzhik
Copy link
Contributor Author

serzhik commented Mar 23, 2016

@kingalca

  1. To add new theme you need to turn in developer mode.
  2. Sometimes new theme added to 'theme' table with param 'type'=1 (virtual theme). Try to set it to 0 (physical theme)

@ghost
Copy link

ghost commented Jul 18, 2016

I faced same problem when I trying to redeploy static content.

screen shot 2016-07-18 at 11 27 24

I realised that, "Vendor/theme => Magento/lumaClone" hasn't registered on my "theme" table. Then I added that entry manually.

screen shot 2016-07-18 at 11 30 30

Then I executed following commands from Magento root directory

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:static-content:deploy

After that my problem was sorted.

screen shot 2016-07-18 at 11 32 14

Hope this would help someone.

@workmi
Copy link

workmi commented Aug 22, 2016

cdhalwatura - u need add u theme in table : theme

@tomnyson
Copy link

you can setting this theme to default theme and try again.
i have done it

@SyedMuneebb
Copy link

SyedMuneebb commented Jul 4, 2017

Please follow this simple step by step guide: Create Custom Theme Magento 2

pdohogne-magento pushed a commit that referenced this issue Nov 28, 2018
[honey] MC-4323: Cannot Add Slider WYSIWYG Image From Gallery or Link to Image in Gallery After Page Has Been Saved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants