I try to override the magento Mage\Catalog\controllers\ProductController.php with a module. In my module i try this:
\etc\config.xml
<global>
<rewrite>
<aion_fbpage_catalog_productcontroller>
<from><![CDATA[#^catalog/product/#]]></from> <!-- Mage_Catalog_ProductController -->
<to>fbpage/catalog_product/</to> <!-- Aion_FbPage_Catalog_ProductController -->
</aion_fbpage_catalog_productcontroller>
</rewrite>
</global>
<frontend>
<routers>
<fbpage>
<use>standard</use>
<args>
<module>Aion_FbPage</module>
<frontName>fbPage</frontName>
</args>
</fbpage>
</routers>
</frontend>
\controllers\Catalog\ProductController.php
<?php
require_once "Mage/Catalog/controllers/ProductController.php";
class Aion_FbPage_Catalog_ProductController extends Mage_Catalog_ProductController
{
// My override stuff
}
And when i try to reach my product, to see what the rewrite does, i get this error:
Fatal error: Call to a member function getMetaTitle() on a non-object in C:\xampp\htdocs\igneum\app\code\core\Mage\Catalog\Block\Product\View.php on line 56
I get the same error message, if i do nothing in my class