1
      if ($generator !== null) {
            $this->tryToLoadSourceClass($className, $generator);
            if (!($file = $generator->generate())) {
                $errors = $generator->getErrors();
                throw new \RuntimeException(implode(' ', $errors) . ' in [' . $className . ']');
            }
            if (!$this->definedClasses->isClassLoadableFromMemory($className)) {
                $this->_ioObject->includeFile($file);
            }
            return self::GENERATION_SUCCESS;
  • throw new \RuntimeException(implode(' ', $errors) . ' in [' . $className . ']'); – Furtuna Abel Jun 5 at 1:10
  • they said that that one is the error, how should i change – Furtuna Abel Jun 5 at 1:11
  • Check generated folder on root directory and give 777 permission to that folder. Did you get any class name on error log? – sandip Jun 5 at 1:15
  • is not working.. – Furtuna Abel Jun 5 at 1:25
  • 1
    Uncaught RuntimeException: Can't create directory /var/www/vhosts/nedeias.ro/public_html/generated/code/Magento/Framework/App/ResourceConnection/. in [Magento\Framework\App\ResourceConnection\Proxy] in /var/www/vhosts/nedeias.ro/public_html/vendor/magento/framework/Code/Generator.php:115 – Furtuna Abel Jun 5 at 1:26
0

To set permissions and ownership for directories.

Execute below command on the CLI

 cd /var/www/vhosts/nedeias.ro/public_html/ && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

For more ref this link https://devdocs.magento.com/guides/v2.3/install-gde/prereq/file-system-perms.html

NOTE: In case Magento root is different then path change is required.(/var/www/vhosts/nedias.ro/public_html/)

  • The above sets files to 664 and directories to 775..................... – Anthony Jun 5 at 2:28
  • i fix that.... but i need now to fix the plugin....Uncaught Error: Call to undefined method Mageplaza\CallForPrice\Helper\Data::isEnabled() in /var/www/vhosts/nedeias.ro/public_html/app/code/Mageplaza/CallForPrice/Observer/CallForPriceLayoutLoadBefore.php:67 – Furtuna Abel Jun 5 at 7:15
  • This may be another ques, better to create another ques. Based on the error, it looks like isEnabled() method is not available in Data.php, you can contact Mageplaza team further if it is their module. If isEnabled() method not available then add it Data.php. – sandip Jun 5 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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