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 05 '19 at 01:10
  • they said that that one is the error, how should i change – Furtuna Abel Jun 05 '19 at 01: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 05 '19 at 01:15
  • is not working.. – Furtuna Abel Jun 05 '19 at 01: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 05 '19 at 01:26
  • Which Magento version you are using? Any error – sandip Jun 05 '19 at 01:26
  • 2.2.3 I want to add a plugin, adn after that... the website was fall – Furtuna Abel Jun 05 '19 at 01:27
  • Two possibilities, 1. Plugin code having some issues 2. If without using custom plugin if you still face error and then fix folder permissions part. – sandip Jun 05 '19 at 01:30
  • i wrote this php bin/magento setup:upgrade, after that i wrote this php bin/magento setup:static-content:deploy they give e this, after i put this code line – Furtuna Abel Jun 05 '19 at 01:33
  • [Magento\Framework\Exception\LocalizedException] NOTE: Manual static content deployment is not required in "default" and "developer" modes. In "default" and "developer" modes static contents are being deployed automatically on demand. If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f' they give me that, and i wrote with deploy -f... – Furtuna Abel Jun 05 '19 at 01:35
  • https://magento.stackexchange.com/q/91870/34579 – sandip Jun 05 '19 at 01:40
  • i don t undestand... – Furtuna Abel Jun 05 '19 at 01:46
  • what should i do? – Furtuna Abel Jun 05 '19 at 01:46
  • Everyone always assumes it is folder and files permissions error but it could also be an owner and group owner issue. FTP in and have a look at the file/folder permissions but also at the owner and group owner permissions. I can give you the commends to change all of the file/folder/owner/group owner if required – Anthony Jun 05 '19 at 02:32
  • 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 05 '19 at 07:18

1 Answers1

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/)

sandip
  • 4,004
  • 2
  • 24
  • 56
  • The above sets files to 664 and directories to 775..................... – Anthony Jun 05 '19 at 02: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 05 '19 at 07: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 05 '19 at 07:25
  • @FurtunaAbel A bit late, but isEnabled is inherited from AbstractData in Mageplaza\Core, make sure you have the Core installed – bdbdbd Oct 09 '20 at 13:24