I've created a custom module with an Observer to log every product change on a log file.
The Observer is listening on the event catalog_product_save_after
.
I've created the folder for my namespace under app/code/local
and so I defined it on the configuration files.
My problem is that Magento is trying to load the module under the namespace Mage, and I don't know the reason for this behavior.
Here are the error log:
2018-01-05T09:06:51+00:00 ERR (3): Warning: include(Mage/Mynamespace/Editlog/Model/Observer.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/magento/lib/Varien/Autoload.php on line 94
2018-01-05T09:06:51+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Mynamespace/Editlog/Model/Observer.php' for inclusion (include_path='/Applications/MAMP/htdocs/magento/app/code/local:/Applications/MAMP/htdocs/magento/app/code/community:/Applications/MAMP/htdocs/magento/app/code/core:/Applications/MAMP/htdocs/magento/lib:.:/Applications/MAMP/bin/php/php7.1.8/lib/php') in /Applications/MAMP/htdocs/magento/lib/Varien/Autoload.php on line 94
Does anyone know why is looking for the observer under the Mage directory ? Do I have to put there my module?
config.xml
in theetc/
folder of your module? Do you also have a properly formattedMynamespace_Editlog.xml
file inapp/etc/modules/
?local
.