WHAT TO DO WHEN YOUR MAGENTO 2 THEME DOES NOT SHOW UP IN FRONT END?
Reson One:
Theme record may not have been inserted in the Theme table.
Check the theme table to ensure if the new theme has been inserted.
If not,then insert the new theme in the Theme table using following SQL command.
INSERT INTO `theme` (`theme_id`, `parent_id`, `theme_path`, `theme_title`, `preview_image`, `is_featured`, `area`, `type`, `code`) VALUES
(1, NULL, 'Magento/blank', 'Magento Blank', 'preview_image_57bd8ff1e41f4.jpeg', 0, 'frontend', 0, 'Magento/blank'),
(2, 1, 'Magento/luma', 'Magento Luma', 'preview_image_57bd8ff21a0b0.jpeg', 0, 'frontend', 0, 'Magento/luma'),
(3, NULL, 'Magento/backend', 'Magento 2 backend', NULL, 0, 'adminhtml', 0, 'Magento/backend'),
(5, 1, 'themename/title', 'themename - title', 'preview_image_57bea4ad73a91.jpeg', 0,
'frontend', 0, 'themename/title');
Reason Two:
If the theme record is already available in the Theme table, then there are chances that the ‘Theme Type’ would not have been set to 0, which is Physical.
There are 3 theme types – 0–Physical, 1-Virtual and 2–Staging.
Ensure that the ‘Theme Type’ is Physical (i.e.) 0.
Tony's blog image Tony's blog imageOnce you have made the above changes, you need to run the below commands in our SSH terminal.
php bin/magento setup:upgrade –keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean
php bin/magento cache:flush
From: dckap
网友评论