Questions tagged [compiler]

The Magento Compiler is an outdated solution to reduce filesystem impact caused by PHP class loading. While still included in current Magento releases it is removed in Magento 2. On current systems there are even cases where the Compiler causes harm to general performance of Magento.

Filter by
Sorted by
Tagged with
43
votes
2answers
25k views

When should I use the Magento Compiler

I often see people mention they use the compiler feature of Magento. I do never and wonder, which cases you should use it and how much performance gain you have then. [DISCLAIMER]: As I got an edit ...
39
votes
3answers
6k views

What Triggers the Generation of a Factory in Magento 2

Magento 2 contains a number of class files that are either pre-generated, or are generated on the fly. They live in var/generated These generated files include factory classes. From the ...
23
votes
4answers
25k views

Correct Method of Flushing Caches & Managing the Compiler

I'd like to know if there's any prefered procedure for the following: Flushing of the Magento cache Enabling/Disabling of the Magento Compiler 1. Flushing of the Magento Cache There are a few ...
9
votes
2answers
2k views

Magento compilation hangs!

running bin/magento setup:di:compile hangs at 14% forever. Already allocated 1G RAM and incrased execution time 18000 running again with bin/magento setup:di:compile -vvv after 20 minutes ...
7
votes
6answers
27k views

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

I have followed several articles on this, but none solve my problem. Every request on site writes the following entry to the system log. var/log/system.log: 2013-10-09T12:53:50+00:00 ERR (3): ...
6
votes
1answer
614 views

Magento 2: Why di compile is not 100%?

When we run php bin/magento setup:di:compile Why all are not will be 100% & 7/7? $ php bin/magento setup:di:compile Compilation was started. %message% 0/7 [>---------------------------] 0% ...
5
votes
3answers
10k views

Less files in custom modules

How do you use less inside custom module having created code/Vendor/module/view/frontend/web/css/source/custom.less how do I include and compile?
5
votes
3answers
1k views

is it safe to run magento compiler?

I have magento 1.7.3 and have some 3rd party extensions like Fortis theme, easy lightbox, ... my question is : if compiler mode had issues, is it recoverable?
5
votes
1answer
325 views

Magento 2 - I would like to understand the mechanism of running the “setup:di:compile” command

I would like to understand the mechanism of running the setup:di:compile command in Magento 2. Example: Step 1: it is checking... Step 2: it is generating... ... Anybody can explain it to me?
5
votes
1answer
819 views

magento2 what exactly purpose of Factory class?

From this documentation Factories are special objects that have only one purpose: to create an instance of one non-injectable class or interface non-injectable object are Objects that cannot be ...
5
votes
1answer
3k views

Problems with less variables in _theme.less

I use below media queries in my custom _theme.less like & when (@media-common = true) { } but when I execute this command bin/magento setup:static-content:deploy I get variable @media-common is ...
4
votes
1answer
4k views

Magento 2: Error during compilation Incompatible argument type

In Continue with Magento 2: Error during compilation I have below error while running php bin/magento setup:di:compile Errors during compilation: Custom\Module\Model\ResourceModel\...
4
votes
1answer
141 views

Controller ignoring _forward when compiler is on - is that desired behaviour?

Simple example tested on magento 1.7.0.2 Created overloaded controller for Mage_Cms_IndexController <routers> <cms> <args> <modules> <My_Extension before="Mage_Cms"...
4
votes
1answer
991 views

Magento2 change to production mode

i want to change from developer to production, but i can't because i get an error that exec function is disabled and my host will not enable it. What are the actions taking place when you type bin/...
4
votes
1answer
628 views

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

We just upgraded from 1.9.3.7 to 1.9.3.8 and getting a blank page when trying to access the cart or add products to it. This happens for logged in customers only and only when compilation is turned on....
3
votes
1answer
3k views

Magento 2 - What is file Interceptor.php?

When I overrided file controller of catalog/product and ran this command: php bin/mangento setup:di:compile And then this file "Interceptor.php" was generated in magento_root\var\generation\myPool\...
3
votes
3answers
2k views

How to prevent extension installation problems with compilation mode enabling

I have the extension which is listening to core_layout_block_create_after event. It could be any event which is firing in magento admin. Also I have magento instance with compiler mode enabled. I ...
3
votes
1answer
6k views

Magento 2 : Compiler gives Class Not Found error

I was trying to install Multi-Vendor Marketplace extension from Webkul. I followed these steps: Copied the files to appropriate locations. Ran php bin/magento setup:upgrade from root folder. At this ...
3
votes
2answers
5k views

Zend_Db_Adapter_Exception pdo_mysql extension is not installed

ralfe@ralfe:/opt/lampp/htdocs/amboim$ bin/magento setup:di:compile Compilation was started. Proxies code generation... 0/7 [>---------------------------] 0% 1 sec 42.0 Mi Proxies code generation.....
3
votes
2answers
250 views

Magento 2 compile less files on staging server

I have a local repo with my Magento 2 development environment. I use grunt watch to compile my local less files. I push my edited less file with Git to my Beanstalk remote Develop branch I deploy (...
3
votes
2answers
585 views

how to compile single LESS file in magento2

I am working on magento2 theming part. Here we have some predefined and my custom LESS file. Whenever we compile LESS file, it generates two css file -- styles-l.css, styles-m.css . But we do not know ...
3
votes
0answers
311 views

Magento 2 setup:di:compile exclude folders [duplicate]

Is it possible to exclude folders for a Magento 2 extension to be able to support Magento 2 compile command? Currently setup:di:compile throws errors that parent classes not found as they are loaded ...
2
votes
3answers
5k views

Fatal error message

I manage my website with magento but I tried to connect to my page and I have the following message ; Fatal error: Class 'Mage_ConfigurableSwatches_Helper_Data' not found in /home/jmellman/...
2
votes
3answers
423 views

magento compilation mode vs apc

Magento has a compilation mode in which you can compile all files of a Magento installation in order to create a single include path to increase performance. Links for magento compilation mode: ...
2
votes
2answers
3k views

Compiler is always disabled

I have successfully run the compilation process, but when trying to enable the compilation mode, either through admin panel or through command line, I get no errors, but the state remains always ...
2
votes
2answers
1k views

APC + Compilation shows 500 internal server error on cart page

We are using APC with compilation in one of our project, magento version is 1.7.0.2. only FPC extension is installed in it. At front-end all pages are working fine but Checkout & cart page shows ...
2
votes
1answer
99 views

Overriding Block class causes constructor err in magento 2

I want override a block class, for this I have made entry in di.xml using preference and created a respective file on my custom module block/Rewrite/Product/ListProduct. My file is calling but now ...
1
vote
2answers
2k views

Magento 2: Error during compilation

I have below error while running php bin/magento setup:di:compile Errors during compilation: Custom\Module\Block\BuyingListIndex Incorrect dependency in class Custom\Module\...
1
vote
2answers
374 views

OptionInterfacePersistor error when compiling magento in production mode

I'm trying to run php bin/magento setup:di:compile-multi-tenant on a Magento CE 2.0.10 with sample data installed. I don't have anything else in this Magento installation. I use php 7.0.8. [Magento\...
1
vote
1answer
3k views

Code Compilation Error - Cannot Redeclare Class

So, after some painful debugging (and enabling scream in xdebug), I was able to discover that some pages are returning a fatal error (such as catalog/product/gallery/id/155/image/202/) where Magento ...
1
vote
1answer
2k views

Magento compiler broken. Compiler doesnt work even via SSH

I deleted the includes/src folder to disable the compiler mode. Then the site broke and all we can see is the following. Warning: include_once(Varien/Autoload.php): failed to open stream: No ...
1
vote
2answers
454 views

What are the Differences between these runcompilation,cache management and index management?

I am using Magento, but manytimes mychanges could not make anything in results.. So,i got some answers from stackoverflow and some other sites as use cache management, index management and run ...
1
vote
2answers
84 views

Magento Compiler and Backup issues

In admin there is no tab for compiler. And also with backup it just does nothing. I am at a loss to what the issue could be. I have reinstalled magento to another folder and compiler is there and ...
1
vote
1answer
638 views

E_COMPILE_ERROR when enabling Magento compilation

I'm trying to enable compilation on Magento via the control panel and while compilation is enabled the main page fails to display properly and I find that index.php has repeatedly raised the following ...
1
vote
1answer
1k views

unable to disable Compiler in Magento 1.9

Okay, it's a long story, so sit tight. First, I cannot disable compiler for some reason. I click disable and it refreshes, saying Enabled still. So I used the command line and disabled it, and got ...
1
vote
1answer
2k views

Magento Upgrade: Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found in /home/xxxxx/public_html/includes/src/__default.php on line 29298

I just updated my magento installation from 1.7 to the latest version via FTP and now when I try to access the website or the backend I get the error Fatal error: Class '...
1
vote
1answer
223 views

Magento 2: Di Compile SER Files

When we run php bin/magento setup:di:compile It will generate below files in \magento\var\di folder adminhtml.ser crontab.ser frontend.ser global.ser setup.ser webapi_rest.ser webapi_soap.ser I ...
1
vote
1answer
1k views

Mage registry key “_singleton/ambase/feed” already exists

One of the extension from Amasty was already installed in my website. I've installed another extension OPC and now I'm getting the error Mage registry key "_singleton/ambase/feed" already exists. I'...
1
vote
2answers
2k views

Magento1.9 Compilation Not enabling in Admin panel

I am new to magento platform. Unfortunately i had executed the Run complier in enable status mode so my customized codes are removed from include folder.Although and i recovered the customize files ...
1
vote
2answers
998 views

Exclude Module from Magento Compilation

Is there any way to exclude some extensions/modules from magento compilation ? Because some extensions create issues with magento compilation like uRapidFlow .
1
vote
0answers
46 views

Magento 1, compiler gives 500 on disabled products

We have a pretty weird issue, if we enable the php compiler disabled products will return a 500 page. If we enable php errors using php_ini it returns a 200 but the page contains nothing. In the logs ...
1
vote
0answers
244 views

Magento enabling compilation error : need permanent solution

i was tried to enable compilation and got error. And admin & frontend was not accessable. its happens with me many time on different site. and then i disable compiler from code. i made comment ...
1
vote
1answer
384 views

Compiler Enabled on admin, Disabled on cli

My Magento's 1.9.2.1 Admin panel shows: Compiler Status: Enabled Compilation State: Compiled Collected Files Count: 7947 Compiled Scopes Count: 4 If I click on Disable, it says that it's now ...
1
vote
1answer
423 views

Products are disappearing from admin and frontend

A client is having the issue of multiple products that have just disappeared from Magento, and they are having to re-enter all of the data. I ruled out CSV issues because they have never used this ...
1
vote
1answer
26 views

In Compilation what task performed by magento

I bought many extension from somewhere.In whole document they mentioned compilation process. Basically I want to know that magento compilation , what the mean of that and what task being done by ...
0
votes
1answer
165 views

When to run magento:setup:compile?

If this question has been answered elsewhere I will delete this one. From a good look around, there doesn't seem to be a solid answer. When I am developing an extension for Magento 2(.1), do I have ...
0
votes
2answers
299 views

setup:di:compile in the different modes

I'm trying to understand how compilation works in Magento 2 with regards to default mode, developer mode, and production mode. The docs state that auto compilation is enabled in developer mode, which ...
0
votes
1answer
2k views

Compiler through command line

Using putty, I want to manage compiler mode through command line, but the answer received is always the compiler help: myuser@serv01 [~]# php public_html/shell/compiler.php state Content-type: text/...
0
votes
2answers
2k views

PHP Fatal error: Class 'Aschroder_SMTPPro_Model_Mysql4_Setup' not found

I have a similar problem. My compiler was turned on and I did the installation. Now, getting error 500 and log file shows this error [21-Sep-2016 01:25:37 UTC] PHP Fatal error: Class '...
0
votes
1answer
39 views

Magento 2 - Why has difference between machine when run di:compile?

In magento2, Why has difference between machine when run setup:di:compile ? In machine A: In machine B: How to config: when we compile it does not do "interception cache generation..." ? (I would ...