cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 catalogsearch/result page 500 error

Magento 1.9 catalogsearch/result page 500 error

Hi guys,

 

Tried everything in the book so far. Error reporting, developer mode, cache clear, disabling elastic search module.

 

Didnt get any clue except this in the system.log

 

ERR (3): Warning: Declaration of Smile_ElasticSearch_Model_Catalog_Layer_Filter_Item_Category::getRemoveUrl() should be compatible with Mage_Catalog_Model_Layer_Filter_Item::getRemoveUrl($base = '*/*/*') in /public_html/app/code/community/Smile/ElasticSearch/Model/Catalog/Layer/Filter/Item/Category.php on line 86

 

category.php:

<?php
/**
 * Handles category filtering in layered navigation.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Smile Searchandising Suite to newer
 * versions in the future.
 *
 * This work is a fork of Johann Reinke <johann@bubblecode.net> previous module
 * available at https://github.com/jreinke/magento-elasticsearch
 *
 * @category  Smile
 * @package   Smile_ElasticSearch
 * @author    Aurelien FOUCRET <aurelien.foucret@smile.fr>
 * @copyright 2013 Smile
 * @license   Apache License Version 2.0
 */
class Smile_ElasticSearch_Model_Catalog_Layer_Filter_Item_Category extends Mage_Catalog_Model_Layer_Filter_Item
{
    /**
     * Allow to keep some filter active when changing category
     *
     * @param string $url URL of the category
     *
     * @return string
     */
    protected function _addCurrentParameters($url)
    {
        $queryParams = Mage::app()->getRequest()->getParams();
        $paramsReset = array(Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null, 'id' => null);
        $queryPart   =  http_build_query(array_merge($queryParams, $paramsReset));
        if ($queryPart) {
            $url .= strpos($url, '?') === false ? '?' . $queryPart : '&' . $queryPart;
        }
        return $url;
    }

    /**
     * Get filter item url
     *
     * @return string
     */
    public function getUrl()
    {
        $categoryUrl = $this->getCategoryUrl();
        if (!$categoryUrl) {
            $categoryUrl = Mage::getModel('catalog/category')->load($this->getValue())->getUrl();
        }
        return $this->_addCurrentParameters($categoryUrl);
    }

    /**
     * Get url for remove item from filter
     *
     * @return string
     */
    public function getRemoveUrl()
    {
        $parentCategory = Mage::getModel('catalog/category')->load($this->getValue())
            ->getParentCategory();

        return $this->_addCurrentParameters($parentCategory->getUrl());
    }

    /**
     * Get url for "clear" link
     *
     * @return false|string
     */
    public function getClearLinkUrl()
    {
        $clearLinkText = $this->getFilter()->getClearLinkText();
        if (!$clearLinkText) {
            return false;
        }

        $urlParams = array(
            '_current' => true,
            '_use_rewrite' => true,
            '_query' => array($this->getFilter()->getRequestVar() => null),
            '_escape' => true,
        );
        return Mage::getUrl('*/*/*', $urlParams);
    }
}

 

 

The header is loaded properly. But nothing from the <body> is loaded. 

 

You can check it out here yourself: https://www.haarcentrum.nl

 

Any help is greatly appreciated.

 

6 REPLIES 6

Re: Magento 1.9 catalogsearch/result page 500 error

Hello @yannick_veys ,

 

Please do following in your magento then we can see actual error.

Modifying this code in Magento directory index.php:

Search for error_reporting(E_ALL | E_STRICT);

Replace with

error_reporting(E_ALL);$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;

OR Uncomment it by removing the # sign from

#ini_set('display_errors', 1);

Let me know once you have perform above changes.

---

If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 1.9 catalogsearch/result page 500 error

@gelanivishal 

I removed the ealstic search module. Still get errors...

Adding the lines doesnt give me any error reporting on the result page. This is what I get on the exception page



Exception: Warning: file_exists(): open_basedir restriction in effect. File(/usr/local/lsws/lsphp70/share/php/Mage/Smile/Elasticsearch/Block/Catalog/Layer/View.php) is not within the allowed path(s): (/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php70/lib/php/:/usr/local/php56/lib/php/) in /public_html/app/code/core/Mage/Core/functions.php on line 145 in /domains/haarcentrum.nl/public_html/app/code/core/Mage/Core/functions.php:245 Stack trace: #0 [internal function]: mageCoreErrorHandler(2, 'file_exists(): ...', '/home/haarcentr...', 145, Array) #1 /public_html/app/code/core/Mage/Core/functions.php(145): file_exists('/usr/local/lsws...') #2 /public_html/app/code/core/Mage/Core/Model/Layout.php(490): mageFindClassFile('Mage_Smile_Elas...') #3 /public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('Mage_Smile_Elas...', Array) #4 /public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('smile_elasticse...', 'smile.elaticsea...') #5 /public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('smile_elasticse...', 'smile.elaticsea...') #6 /public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element)) #7 /public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element)) #8 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks() #9 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks() #10 /public_html/app/code/local/Vegtmedia/Tags/controllers/IndexController.php(17): Mage_Core_Controller_Varien_Action->loadLayout() #11 /domains/haarcentrum.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Vegtmedia_Tags_IndexController->indexAction() #12 /domains/haarcentrum.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index') #13 /domains/haarcentrum.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #14 /domains/haarcentrum.nl/public_html/app/code/local/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch() #15 /domains/haarcentrum.nl/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array) #16 /domains/haarcentrum.nl/public_html/index.php(95): Mage::run('', 'store') #17 {main}

 

Re: Magento 1.9 catalogsearch/result page 500 error

Hello @yannick_veys ,

 

How do you remove it?

Can you please go to app/etc/modules directory and find that extension. I think that file name will be Smile_Elasticsearch.xml to rename with Smile_Elasticsearch.xml.disable and clear cache and try it. Let me know

 

--

If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 1.9 catalogsearch/result page 500 error

@gelanivishal 

I removed it in the database

core_resources

2 other tables

And renamed .elastic.xml in the /etc/modules folder

 

Already refreshed and emptied. Doesnt work

Re: Magento 1.9 catalogsearch/result page 500 error

Hello @yannick_veys ,

 

Yes, I can see still got an issue on your website. Can you please enable error reporting so I can also see error on site?

 

--

If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 1.9 catalogsearch/result page 500 error

It is enabled Smiley Happy