When I disable a product and access the product by full category URL I am sent to a 404 page. Good.
When I attempt to access the disabled product by http://domain.com/disabled-product.html I get
Fatal error: Call to a member function getMetaTitle() on a non-object in /app/code/core/Mage/Catalog/Block/Product/View.php on line 57
Could it be that an extension is attempting to load prior to the redirect?
EDIT: Lines 50-59
protected function _prepareLayout()
{
$this->getLayout()->createBlock('catalog/breadcrumbs');
$headBlock = $this->getLayout()->getBlock('head');
if ($headBlock) {
$product = $this->getProduct();
$title = $product->getMetaTitle();
if ($title) {
$headBlock->setTitle($title);
}
...
}
Best Answer
This was due to a conflic with FME Ajax Add to cart.
I resolved by commenting out this rewrite in
/app/code/local/FME/Ajaxaddtocart/etc/config.xml
: