my theme stopped working after I switched back to the tip of the branch from an older git commit

magento.stackexchange https://magento.stackexchange.com/questions/157961

  •  06-10-2020
  •  | 
  •  

Question

So I have backups of all the files in the Magento root folder and tried overwriting the current Magento folder with the backup folder and it still doesn't recognize the changes I've made in my child theme. My setup is here:

How do I add images into the "header content" class with a block?

I have tried setting the theme to other themes and no theme and clearing the cache both times and then switching back to mine and it doesn't recognize my theme unless I restore from a database backup from before switching to and from the old git commit. (it really seems like the database somehow got corrupted when I switched commits) Any ideas of what might cause this? This problem can cause people to loose a lot of work. Thanks.

Was it helpful?

Solution

Backup your Code and DB before making these changes

It might be worth deleting the theme from the database, if you view the theme table you should see a list of themes and IDs.

enter image description here

Make sure your theme is not the currently selected one otherwise you will get errors, and then delete your theme from the DB.

Now clear all caches, delete var/view_preprocessed and pub/static/frontend and load a page on the frontend.

Now try and select your theme again.

I haven't had this exact problem but I had a similar one and doing this did resolved it.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top