Google has been able to crawl to my website, but it is not able to index anything.
When I fetch as Google to my website, I get an error message:
Fatal Error: Call to a member function getcookieshouldbereceived() on a non-object in /var/www/magento/app/code/core/mage/core/controller/varien/action.php on line 497
I then opened action.php file to see what's wrong. In the file action.php line 497 is this :
if ($session->getCookieShouldBeReceived()) {
The paragraph containing line 497 is: /** * Retrieve action method name * * @param string $action * @return string */ public function getActionMethodName($action) { return $action . 'Action'; }
/**
* Dispatch event before action
*
* @return void
*/
public function preDispatch()
{
if (!$this->getFlag('', self::FLAG_NO_CHECK_INSTALLATION)) {
if (!Mage::isInstalled()) {
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
$this->_redirect('install');
return;
}
}
// Prohibit disabled store actions
if (Mage::isInstalled() && !Mage::app()->getStore()->getIsActive()) {
Mage::app()->throwStoreException();
}
if ($this->_rewrite()) {
return;
}
if (!$this->getFlag('', self::FLAG_NO_START_SESSION)) {
$checkCookie = in_array($this->getRequest()->getActionName(), $this->_cookieCheckActions)
&& !$this->getRequest()->getParam('nocookie', false);
$cookies = Mage::getSingleton('core/cookie')->get();
/** @var $session Mage_Core_Model_Session */
$session = Mage::getSingleton('core/session', array('name' => $this->_sessionNamespace))->start();
if (empty($cookies)) {
if ($session->getCookieShouldBeReceived()) {
$this->setFlag('', self::FLAG_NO_COOKIES_REDIRECT, true);
$session->unsCookieShouldBeReceived();
$session->setSkipSessionIdFlag(true);
} elseif ($checkCookie) {
if (isset($_GET[$session->getSessionIdQueryParam()]) && Mage::app()->getUseSessionInUrl()
&& $this->_sessionNamespace != Mage_Adminhtml_Controller_Action::SESSION_NAMESPACE
) {
$session->setCookieShouldBeReceived(true);
} else {
$this->setFlag('', self::FLAG_NO_COOKIES_REDIRECT, true);
}
}
}
Could you help me figure out what is wrong ?
Thanks !!