skip to Main Content

I just installed Magento2 platform. The admin page was blank showing gray screen without anything. I enabled the error to be shown then its displaying this error and I didn’t found any solution or reason of it:

There has been an error processing your request

Class MagentoFrameworkViewElementTemplateFileValidator does not
exist

3

Answers


  1. What is the Magento2 version that you are installing?

    Could you set Mode to developer and send me the trace on var/log/system.log?

    See how to set Magento2 modes here

    Thanks

    Login or Signup to reply.
  2. Magento 2 generates factory class inside generated folder. If generated folder has file write permission or ownership permission it can’t generate factory class. For Magento 2, generated folder is in magento root path.

    Run following commands and try:

    chmod -R 777 generated/ var/
    chown -R magento_user:magento_user generated/`
    
    Login or Signup to reply.
  3. Check the following path. If your magento admin page is blank check the path:
    magento_root_dirvendormagentoframeworkViewElementTemplateFileValidator.php

    And change the following line:

    if (0 === strpos($realPath, $directory)) {
        return true;
    }
    

    to:

    if (0 === strpos($path, $directory)) {
         return true;
    }
    

    If the folder still can’t be located, check the path below too:
    magento_root_dirlibinternalMagentoFrameworkViewElementTemplateFileValidator.php

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search