I am facing this error Required parameter 'theme_dir' was not passed when i try to save the product in admin. I checked the theme configuration it was assigned to the stores. Recently i have upgraded from 2.0.7 to 2.1.0.Also i have checked the theme directory registration.php file exists. Anyone came across this issue.

4 Answers 4


This error appears when you remove a template folder, which is still referenced in the database. The simplest way to fix it is, go to the database, and in table 'theme', find the theme name which does not exist in app/design/frontend/package.

DELETE the reference to the missing theme from the table.

  • This should be the accepted answer. Sep 29, 2017 at 15:45
    – Zorox
    Sep 30, 2018 at 7:21
  • This should be the accepted answer. Oct 25, 2018 at 11:09
  • 2 records was extra in my database I deteleted BUt still not working
    – HaFiz Umer
    Oct 25, 2019 at 6:42

I can confirm that the answer by Vu Anh works. Here's an explanation why this happens when products are saved, although the deleted theme is used nowhere:

After saving a product, the image cache is regenerated for all themes. Each theme can have its own image size formats, defined in etc/view.xml and all of these will be generated.

But instead of looking for the configured themes in all stores, Magento goes through all themes in the theme table.

If you did not properly uninstall a theme and just removed the files, the orphaned entry refers to a nonexistent path and the described exception is thrown.


I have the same error Required parameter 'theme_dir' was not passed. I work with 2.1.0 from the beginning, not with updating. And I have one custom product attribute "style".

The problem occurs when I try to save the new photo in the material. Without the image, the product saved normally.

Fix with commenting the exception under the file:


It worked for me. But I think it's a hack.

  • This is definitely a hack. Fix the problem instead of removing the exception. Oct 25, 2018 at 10:50

Finally I fixed it by commenting out the exception under vendor/magento/framework/View/Design/Fallback/Rule/Simple.php.

if (in_array($placeholder, $this->optionalParams)) {
    return [];
} else {
    return [];
    //throw new \InvalidArgumentException("Required parameter '{$placeholder}' was not passed");
  • 4
    But this doesn't fix the error, only doesn't show it anymore. (I think Vu Anh's solution is more a fix)
    – BvdVen
    Sep 30, 2016 at 13:02
  • 3
    This is not the right way of fixing this issue! Check the answer from Vu Anh.
    – medina
    Oct 18, 2016 at 5:03
  • 2
    This is not a best solution. Please don't do this
    – Jackson
    Mar 27, 2017 at 4:23
  • This doesn't fix the issue, it's just hiding the error. Need to know the root cause of the issue.
    – Duke
    Sep 27, 2020 at 6:46
  • i feel like you are trying to make fun of error. Ok. HAHAHA there you go.
    – Ali Raza
    Oct 15, 2021 at 7:15

Your Answer

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