I recently moved my Magento 2.2.3 site to production server (different server, url and path). However, the custom theme seems to be ignored. If I enter the site, it shows the following error in the var/report files:

Required parameter 'theme_dir' was not passed /.../html/vendor/magento/framework/View/Design/Fallback/Rule/Theme.php(78): Magento\Framework\View\Design\Fallback\Rule\Simple->getPatternDirs(Array)

Some people in some threads said that this error is throw where the theme directory is deleted, but the directory is present in the same path of develop. And if I try to run:

php bin/magento setup:static-content:deploy --theme Vendor/theme es_MX en_US -f

Nothing happens. The strange thing is that it only happens with our custom theme child that we did. The father theme and his other children work without problem.

What could it be?

  • Look into the database table which stores the themes. I think your theme is missing there. – roman204 May 21 '18 at 18:09
  • The theme is in theme table. – Eliacim DAVILA - CENSERE May 21 '18 at 18:51

This error message means that you have a theme configured which doesn't exist on the file-system (anymore), but the DB entry was still there in theme table.

To fix the problem, go to your theme table and delete the entry for your created theme.

Then go to your core_config_data table and search for the theme and you will get path records like design/theme/theme_id replace your default theme id in it.

  • Thanks fot your comment, but the theme files are present in app/design/fontend directory and in theme table. – Eliacim DAVILA - CENSERE May 21 '18 at 18:51
  • Okay, then please share the solution to your problem, so that others can get the benefit. – Mohit Kumar Arora May 22 '18 at 5:07

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