1

I get the above error while upgrading from Magento 2.1.8 to Magento 2.2.1

2 exception(s):
Exception #0 (ReflectionException): Class Magento\Framework\View\Layout\Reader\Visibility\Condition does not

exist

2 Answers 2

1

My problem was My theme files did not have the proper files for patch since the base was different, so had to redo the whole theme installation proccess

1

Issues like the one you mentioned can have several reasons. The following command sequence will check the dependencies and regenerates the code. It might be too much commands to fix your particular problem but with the information you added to your question, it might be the best solution for a "quick fix":

Enter your Magento 2 working dir

cd MAGENTO_ROOT

Remove generated code pieces to make sure we have a clean workspace

rm -rf var/cache/* var/di/* var/generation/* var/page_cache/* var/view_preprocessed/* pub/static/frontend/* vendor

Install composer dependencies

composer install

Compile DI Classes

php bin/magento setup:di:compile

Compile Static Files

php bin/magento setup:static-content:deploy

Set Permissions

chmod -R www-data:www-data && find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} \; && chmod o-rwx app/etc/env.php && chmod u+x bin/magento

In a single "liner"

(cd MAGENTO_ROOT && rm -Rf var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* pub/static/* var/di/* generated/code/* vendor && commposer install && php bin/magento setup:di:compile && php bin/magento setup:static-content:deploy && chmod -R www-data:www-data && find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} \; && chmod o-rwx app/etc/env.php && chmod u+x bin/magento) || echo "Whooops, that failed..."

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.