Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

magento modules duplicated into include/src

I've build a custom module at

magentoRoot/app/code/local/CustomModule/Catalog/Model/Product.php

that extends the "on save" event for products and categories. Everything worked fine until I've noticed that any update made to the file was not firing up any longer. After some debugging I found out that the file has been duplicated at

magentoRoot/includes/src/CustomModule_Catalog_Model/Product.php

It seems in this folder path

magentoRoot/includes/src

there are duplicated all other modules/extensions since there are like 7k files present. So at some point someone from the team (including me) has enabled a magento feature, or some extension has updated Magento's ways and I want to revert back. Anyone has ever encountered this issue or knows how to get rid of this?

Note: I'm not the only one working on the project, so assume that I don't know the answer to: what have you installed/activated.

like image 773
Marian Zburlea Avatar asked Jul 11 '13 08:07

Marian Zburlea


2 Answers

Someone from your team has enabled compilation in Magento.

This tutorial covers the issue:

If you accidentally enabled compilation, or if you are actively using compilation instead of APC Cache and need to disable compilation to perform an upgrade, install or remove an extension etc, then you will need to disable it again.

Navigate to System > Tools > Compilation page and click on Disable button
Navigate to System > Cache Management screen and use Flush Cache button.

You can also find more solutions by searching for the same topic on web.

like image 140
liyakat Avatar answered Sep 27 '22 23:09

liyakat


Welcome to Magento 'compilation'. It's not compilation in the traditional sense, like how C is a programming language that needs to be compiled. When enabled, Magento makes copies of a lot of assets and combines multiple files into fewer files and stores the resources at /src.

I have never really seen much of a performance benefit to compilation, and I've seen it wreck a lot of custom code. Best to leave it off most of the time, and definitely during development. The main benefit, I believe, is that it reduces the time required to find files, but if you have APC installed you can try doing

apc.shm_size = 256M (provided you can spare the memory)
apc.num_files_hint = 10000

in your php.ini file. That will increase the number of file paths that APC caches, and reduce the time required to do file path lookups, same as compilation.

like image 25
siliconrockstar Avatar answered Sep 27 '22 22:09

siliconrockstar