0

We have taken on a new client's webstore and have cloned it to our server. The clone seemed to work absolutely perfectly, however after doing some custom work, and creating a child theme for template overrides, we noticed that we cannot change the theme of the website. When changing it in design>configuration it gives no errors, says the value was saved but then the same theme that was previously selected is retained. I have tried rebuilding the whole site (clearing cache, setup upgrade, deploying content, literally the whole 9 yards) but no matter what I do I cant get the theme to change/update.

Whats weirder is core_config_data does have the correct theme id (as in the one I change it to) but the template changes made are not showing up.

1
  • How do you clear the cache? We face an issue, Magento sometimes not knowing, some Backend values were changed, until we press the big "Clear Cache" Button in the Cache Management. So, we change a setting, save it, and reload the page - the settings seems to be back to the old value until we press that "Clear Cache" Button (Clean/Flush does not help)
    – Mario
    Nov 25, 2022 at 8:09

4 Answers 4

0
  1. Check the site URL, is it the same as the local site URL?
  2. Check the child theme files(composer.json, registration.php, theme.xml)
  3. Refresh the caches and is there any other cache?
  4. Check your overrides that are valid.
0

If I remember correctly, you had this issue because the parent theme id and the child theme id are mismatched (in the theme database table).

Try to remove the theme records for your parent theme and your child theme from the theme database table, then go to Admin > Content > Design > Configuration to choose a theme for each website/store.

0

These are the Steps to change the Theme of Magento.

  1. Creating a Magento theme folder
  2. Declare your theme
  3. Composer package
  4. registration.php file
  5. Creating static files, folders
  6. Configure catalog product images
  7. Declare Theme Logo
  8. Basic layout elements
  9. Layout files types and conventions

Structure of the Them

Theme structure
Theme Folder structure
app/design/frontend/Vendor/
├── simple/
│   ├── etc/
│   │   ├── view.xml
│   ├── web/
│   │   ├── images
│   │   │   ├── logo.svg
│   ├── registration.php
│   ├── theme.xml
│   ├── composer.json

So your app/design/frontend/vendor/theme.xml file should look something like this:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
  <title>Vendor Theme</title>
  <parent>Magento/blank</parent>
</theme>

Creating a Magento theme folder Creating a folder for the theme:

Go to app/design/frontend Creating a vendor folder app/design/frontend/ e.g: app/design/frontend/Vendor Create a theme folder app/design/frontend// e.g: app/design/frontend/Vendor/simple

app/design/frontend/
├── Vendor/
│   │   ├──simple/
│   │   │   ├── ...
│   │   │   ├── ...

registration.php file

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Vendor/simple',
    __DIR__
);

More help this link will guide you the best

https://www.mageplaza.com/devdocs/how-to-create-magento-2-theme.html#6-configure-catalog-product-images

0

I had same issue before, in my case this caused by your custom theme is set as virtual theme.

nice article as reference : https://www.naguel.com/magento-virtual-themes-or-why-theme-changes-dont-show-up-in-the-front-end/

you can change the theme type to 0 from database as described in article.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.