Skip to main content
11 votes
Accepted

Magento 2: Why di compile is not 100%?

As per my understanding. The whole process of setup:di:compile is divided into the 7(100%) sub code generations process. Proxies(1/7) Repositories(2/7) Service(3/7) Application(4/7) ...
Manthan Dave's user avatar
  • 9,906
8 votes
Accepted

Magento 2: Error during compilation Incompatible argument type

This is because your parent constructor has redundant arguments or not correct . In your case, need to remove arguments: $storeManager and $metadataPool. app\code\Custom\Module\Model\ResourceModel\...
Khoa TruongDinh's user avatar
5 votes
Accepted

When to run magento:setup:compile?

Yes you will need to run bin/magento setup:di:compile everytime when you added new classes with dependencies (constructor parameters) or changed dependencies of existing classes.(di.xml) Another ...
Manthan Dave's user avatar
  • 9,906
5 votes
Accepted

Magento 2: Error during compilation

Try with below code, Remove var folder and run command of compile, class BuyingListIndex extends \Magento\Framework\View\Element\Template { public function __construct( \Magento\Framework\...
Rakesh Jesadiya's user avatar
3 votes
Accepted

Magento 2 compile less files on staging server

Grunt is a Node Js package, to make the Grunt commands can work, we need to install Node Js on your Staging Server. However, this way doesn't recommend. We can deploy static content in both ways: ...
Khoa TruongDinh's user avatar
3 votes

Zend_Db_Adapter_Exception pdo_mysql extension is not installed

To install the missing pdo-mysql extension in Ubuntu, run sudo apt-get install pdo-mysql php7.0-mysql or if you run PHP 5 sudo apt-get install pdo-mysql php5-mysql
Fabian Schmengler's user avatar
3 votes
Accepted

Magento2 change to production mode

you can follow below steps go to app/etc/env.php file Set MAGE_MODE' => 'production' Run below commands bin/magento setup:static-content:deploy bin/magento setup:di:compile
Murtuza Zabuawala's user avatar
3 votes

Problems with less variables in _theme.less

Old question I know but I ran into the same issue recently and found that the naming convention for your .less file can be cause. When adding a custom .less file to your theme if you get the error @...
Jason Tipton's user avatar
2 votes
Accepted

Problems with less variables in _theme.less

@fefe The @media-common variable is initially set in either: vendor/magento/theme-frontend-blank/web/css/styles-m.less vendor/magento/theme-frontend-blank/web/css/styles-l.less This is if you're ...
ryanF's user avatar
  • 2,279
2 votes

Less files in custom modules

You can add it by giving the naming as "_module.less" at below path, Magento will include it by default and you don't need to code anywhere to call it: view/frontend/web/css/source/_module....
Himmat Paliwal's user avatar
2 votes

Magento compilation hangs!

I just fixed this exact error. I disabled all my 3rd party modules one by one and surprisingly the compile was still hanging up in the same spot. The solution to get compiling to work for me was to ...
jamil's user avatar
  • 985
2 votes

Magento 2: Error during compilation

That's the beauty of dependency injection that you don't end up using same class multiple times :) Look at the following two classes and you will find all the functions you need vendor/magento/...
user2804's user avatar
  • 281
2 votes
Accepted

Error when static-content:deploy - Magento 2.3

You are using an undefined variable in one of your less files the error clearly states it. pub/static files are generated from module and theme files (where the error is introduced). removing files ...
Pankaj Pant's user avatar
1 vote
Accepted

Incompatible argument type: Required type: \Magento\Customer\Api\AddressRepositoryInterface

<preference for="Cart2Quote\Quotation\Model\Quote\Pdf\Quote" type="Support\Cart2QuotePdf\Model\Quote\Pdf\Quote" /> For this preference added in di.xml, Please use the below code and check ...
Aji's user avatar
  • 300
1 vote
Accepted

Overriding Block class causes constructor err in magento 2

You can try the following code: namespace Mageplaza\HelloWorld\Block\Rewrite\Product; use Magento\Catalog\Api\CategoryRepositoryInterface; use Magento\Catalog\Block\Product\ProductList\Toolbar; use ...
Sukumar Gorai's user avatar
1 vote

1.9.3.7 to 1.9.3.8 Upgrade Broke Cart & Checkout for Logged in Customers After Compilation

This problem has been fixed within 1.9.3.9. Please use this newer version.
TonkBerlin's user avatar
1 vote

Magento 2: Di Compile SER Files

.SER is a common extension for serialized objects. as far as the files in the \magento\var\di folder are concerned: They are generated once you have executed setup:di:compile command. So, we all ...
Pankaj Bhope's user avatar
  • 1,546
1 vote

Zend_Db_Adapter_Exception pdo_mysql extension is not installed

In your system is installed PDO but do not installed a driver for MySQL. Please install (or enable) PDO_Mysql extension.
KAndy's user avatar
  • 20.9k
1 vote

Magento 2 compile less files on staging server

First you have to run below commands: - grunt exec:themename - php bin/magento setup:static-content:deploy - grunt less:themename then whenever you push commits you have to run grunt less:...
Dipesh Rangani's user avatar
1 vote
Accepted

OptionInterfacePersistor error when compiling magento in production mode

I had the same error, the fabpot/php-cs-fixer package seems te be cause. If you run 'composer update' again you should get version 1.13.0 of this package. -- After upgrading from 2.0.4 to 2.0.10 I ...
Ewout's user avatar
  • 48
1 vote

setup:di:compile in the different modes

Theorically you don't need (and you shouldn't) to run setup:di:compile when in developer mode. However, once you do that, Magento will generate the compiled classes under /generated/code (/var/...
Ricardo Martins's user avatar
1 vote

Warning: include(File.php) failed in Autoload.php on line 93

I had this same issue and turns out flushing the redis cache fix it for me. From command line: echo 'flushall' | redis-cli -s /path/to/sock Heres the documentation incase you're not using a socket: ...
Hector's user avatar
  • 299
1 vote

Warning: include(File.php) failed in Autoload.php on line 93

This error while creating an object from class like $obj = new GoogleClient(); in Magento it try to find out the class file using Autoload.php
manish's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible