5

I've delete Magento 2 theme folder and upload it again but when upgrade it via command line i've got an error say Unable to find a physical ancestor for a theme so any suggestion about that?

1
  • You get this error while setup PWA? Commented Jul 16, 2019 at 10:51

4 Answers 4

8

You need to check in database theme table column type should be 0 for all.

enter image description here

4

You might want to check table theme. All themes should have type set to 0. Sometimes magento likes to change it to 1 (virtual theme).

Check also if parent_id is correct.

Unable to find a physical ancestor for a theme / How do I correct the following in Magento 2.1.2: Fatal error: Call to a member function getId() on null

Works like a charm. Fork the database and you're good to go.

0

You can try to deploy the static content

bin/magento setup:static-content:deploy -f

0

You need to update the type from the theme table, which may be changed. Please run below SQL

update theme set type=0;

enter image description here

After that, you need to run the below magento command.

php bin/magento setup:upgrade
php bin/magento s:s:d -f 
php bin/magento cache:clean

Thanks, Ansar Husain

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.