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)
...
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\...
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 ...
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\...
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: ...
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
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
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 @...
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 ...
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....
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 ...
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/...
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 ...
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 ...
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 ...
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.
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 ...
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.
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:...
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 ...
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/...
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:
...
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
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
compiler × 70magento2 × 25
magento-1.9 × 12
setup-di-compile × 11
di × 7
compilation × 6
error × 4
cache × 4
fatal-error × 4
less × 4
magento-1.7 × 3
php × 3
extensions × 3
magento-enterprise × 3
ce-1.7.0.2 × 3
performance × 3
magento-2.1 × 2
magento2.3 × 2
magento-1.8 × 2
module × 2
database × 2
configuration × 2
cli × 2
dependency-injection × 2
factory × 2