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

Installing a custom theme throws frontend error #3877

Closed
grasdaggel opened this issue Mar 23, 2016 · 16 comments
Closed

Installing a custom theme throws frontend error #3877

grasdaggel opened this issue Mar 23, 2016 · 16 comments
Assignees
Labels
Area: Frontend bug report Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@grasdaggel
Copy link

Hi, we use Mage 2.0.2 and a commercial theme.

After theme upload we:

  • setup:upgrade
  • setup:static-content:deploy de_DE (with splendids German Pack)
  • cache:flush

The outcome is a frontend exception error. Error log contains the following:

a:4:{i:0;s:42:"Unable to load theme by specified key: '5'";i:1;s:11704:"#0 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-theme/Model/View/Design.php(147): Magento\Framework\View\Design\Theme\FlyweightFactory->create('5', 'frontend')

1 /home/ccsammelfiguren/public_html/stage/var/generation/Magento/Theme/Model/View/Design/Proxy.php(111): Magento\Theme\Model\View\Design->setDesignTheme('5', 'frontend')

2 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-cms/Helper/Page.php(148): Magento\Theme\Model\View\Design\Proxy->setDesignTheme('5')

3 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')

4 /home/ccsammelfiguren/public_html/stage/var/generation/Magento/Cms/Controller/Index/Index/Interceptor.php(24): Magento\Cms\Controller\Index\Index->execute(NULL)

5 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/App/Action/Action.php(102): Magento\Cms\Controller\Index\Index\Interceptor->execute()

6 [internal function]: Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

7 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

8 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)

9 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'designLoader')

10 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

11 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

12 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

13 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'contextPlugin')

14 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-store/App/Action/Plugin/Context.php(98): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

15 [internal function]: Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

16 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

17 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'customer-app-ac...')

18 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

19 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

20 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

21 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'storeCheck')

22 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

23 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

24 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

25 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'weee-app-action...')

26 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

27 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

28 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

29 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Cms\Con...', 'dispatch', Object(Magento\Cms\Controller\Index\Index\Interceptor), Array, 'tax-app-action-...')

30 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

31 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

32 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)

33 /home/ccsammelfiguren/public_html/stage/var/generation/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)

34 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

35 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

36 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

37 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

38 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')

39 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

40 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

41 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

42 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')

43 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

44 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

45 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

46 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')

47 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

48 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

49 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

50 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')

51 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

52 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

53 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)

54 /home/ccsammelfiguren/public_html/stage/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

55 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

56 /home/ccsammelfiguren/public_html/stage/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

57 /home/ccsammelfiguren/public_html/stage/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

58 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}

We tried to delete vendor and use composer update, but that has not fixed it.

Any one else have had this problem/bug? How to fix it?

@mazhalai
Copy link
Contributor

Please clean var directory instead, and try again. Also do you have developer mode turned on?

@grasdaggel
Copy link
Author

Dev Mode is not active, no. Can I delete the whole var directory?

@alankent
Copy link

Deleting var/* is safe in non-production modes. (In production it would delete some pre-generated files.)

Internal note, if we get kingalca going, we should still work out why this problem happened. If the operations taken were reasonable then there should not be a stack trace. If there was a missing step, the error message should tell the user what they did wrong / how to correct it (not an obscure stack trace).

@grasdaggel
Copy link
Author

Thanks for the suggest, I also guess that there might be a problem with another source then the theme directly. The theme uses an importer to import demo content, which should be fine.

This is the content of the file imported, its a json.
<snip>
Can I upload files here? I'd attach it to the ticket for you.

Updated: json import data moved to an attached file
import.txt

@davidalger
Copy link
Member

@kingalca You can attach files by dragging / dropping on the comment box and GitHub will automatically upload and link to them. I copied the data into a file and updated your last comment with it as an attachment. :)

@grasdaggel
Copy link
Author

Thanks @davidalger. Even if my account has some days on github on it, im still new to use it properly. Thanks for helping me out. 👍

@mazhalai
Copy link
Contributor

@kingalca has your issue been resolved?

@mazhalai mazhalai added the PS label Mar 28, 2016
@grasdaggel
Copy link
Author

Sadly no, the bug still occours.

@mazhalai mazhalai added CS and removed PS labels Mar 28, 2016
@mazhalai
Copy link
Contributor

@kingalca thanks for confirming, we have created MAGETWO-51152 to investigate and fix. Also, can you please give more details how new theme was deployed.

@grasdaggel
Copy link
Author

Step by Step.

  1. unpacking theme files localy
  2. upload folders to magento root directory
  3. Selecting the theme in the magento backend as current theme
  4. Terminal: setup:upgrade (also tried it with setup:upgrade --keep-generated)
  5. Terminal: setup:static-content:deploy (also tried it with de_DE extension since its a german shop)
  6. (This is where the magic happens) - importing Demo Content of the theme trough a importer (it imports json, see my comment above
  7. the Shop is now unavailable => exception error

@mazhalai
Copy link
Contributor

Can you check you database, in the theme table, is there any entry for your new theme? Also, does the theme have the required registration.php?

This could be related to #2797, which has been fixed. Can you try on the latest develop branch?

@grasdaggel
Copy link
Author

Dear @mazhalai, I have no clue how to update to a dev branch within magento.

The Theme has a registration.php.

There is a respective row in the database for the newly installed theme, ID 5. The error contains this ID as well. Cite:
a:4:{i:0;s:42:"Unable to load theme by specified key: '5'";i:1;s:11704:"#0 /home/ccsammelfiguren/public_html/stage/vendor/magento/module-theme/Model/View/Design.php(147): Magento\Framework\View\Design\Theme\FlyweightFactory->create('5', 'frontend')

@vkorotun vkorotun removed the CS label Aug 4, 2016
@veloraven veloraven added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Area: Frontend 2.0.x and removed Progress: needs update labels Aug 30, 2016
@tkacheva
Copy link

@grasdaggel are you still facing the issue after upgrade to 2.1?

@grasdaggel
Copy link
Author

When I upgrade to 2.1.0 the whole shop is broken (locale not found, version differs in database, ... see my other tickets), therefore I cannot update current installations.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Area: Frontend Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Oct 25, 2017
@magento-engcom-team
Copy link
Contributor

@grasdaggel, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

magento-engcom-team pushed a commit that referenced this issue Mar 15, 2019
@prakashsaran
Copy link

we should truncate table design_change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests