Created
August 8, 2019 10:47
-
-
Save yogeshdubey2006/9d6141eba77a5ce1fcab857a98800471 to your computer and use it in GitHub Desktop.
Magento 2 - showing error Required parameter 'theme_dir' was not passed while saving product in admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first method | |
### 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. | |
# Second method | |
### 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: | |
### vendor/magento/framework/view/design/Fallbck/Rule/Simple.php | |
### It worked for me. But I think it's a hack. | |
# 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"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment