Bjarstal Posted December 6, 2013 Share Posted December 6, 2013 Hello,In one of my web shops I have installed Advanced Serach on PrestaShop 1.5.3.1 When upgrading to 1.5.6.1 by using 1-Click the BackOffice stopps working (FrontOffice is on Maintainace so I do not know if it works) In debug mode I have this message :Fatal error: Access level to PM_AdvancedSearch4::getCacheId() must be protected (as in class ModuleCore) or weaker in /var/lib/prestashop/www.protectionantivol.fr/modules/pm_advancedsearch4/pm_advancedsearch4.php on line 37How do I get around this problem ? I have sent this message to Advance search support but I don't have any answer yet and I am in a hurry.Below you'll find the beginning of the file mentioned in the message:<?php/**** PM_AdvancedSearch_4 Front Office Feature** @category front_office_features* @author Presta-Module.com <[email protected]>* @copyright Presta-Module 2013* @version 4.9.2** ____ __ __* | _ | / |* | |_) | | |/| |* | __/ | | | |* |_| |_| |_|***************************************** AdvancedSearch_4 *** http://www.presta-module.com *** V 4.9.2 *************************************** +* + Multi-layered search engine and search by steps* + Languages: EN, FR* + PS version: 1.4, 1.5*****/includ e_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/classes/ShopOverrided.php');include_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/classes/AdvancedSearchClass.php');include_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/classes/AdvancedSearchCriterionGroupClass.php');include_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/classes/AdvancedSearchCriterionClass.php');include_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/classes/AdvancedSearchSeoClass.php');include_once (_PS_ROOT_DIR_ . '/modules/pm_advancedsearch4/AdvancedSearchCoreClass.php');class PM_AdvancedSearch4 extends AdvancedSearchCoreClass {protected $errors = array ();private $gradient_separator = '-';private $options_show_hide_crit_method;private $options_remind_selection;private $options_launch_search_method;private $orderByValues = array (0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => ; 'manufacturer_name', 6 => 'quantity' );private $orderWayValues = array (0 => 'asc', 1 => 'desc' );private $options_defaut_order_by;private $options_defaut_order_way;private $options_criteria_group_type;private $allowFileExtension = array ('gif', 'jpg', 'jpeg', 'png' );private $sortableCriterion = array ('attribute', 'feature', 'manufacturer', 'supplier', 'category', 'weight', 'width', 'weight', 'height', 'depth', 'condition');private $criteriaGroupLabels;private $criterionGroupIsTemplatisable = array ('attribute', 'feature', 'manufacturer', 'supplier', 'category' );private $keepVarForCache = array ('id_category', 'id_product', 'id_manufacturer', 'id_supplier', 'id_cms', 'id_search' );private $display_type_mulitriteria = array (2, 3, 4, 7 );private $display_horizontal_search_block = array (8, 14,'-1' );private $productLinksNCIsInstalled;public $_require_maintenance = true;public static $_module_pre fix = 'as4'; Link to comment Share on other sites More sharing options...
NemoPS Posted December 6, 2013 Share Posted December 6, 2013 Set that function mentioned in the error as protected, it appears it's private at the moment Link to comment Share on other sites More sharing options...
Bjarstal Posted December 6, 2013 Author Share Posted December 6, 2013 Hi Thanks for your reply. Anyhow I am very much a beginner so I have to ask you how to set it as protected? In other words, where to write what? Hans Link to comment Share on other sites More sharing options...
NemoPS Posted December 6, 2013 Share Posted December 6, 2013 Find that function (getCacheId())in the file, it (probably) says 'private function....', chance private to protected Link to comment Share on other sites More sharing options...
Bjarstal Posted December 6, 2013 Author Share Posted December 6, 2013 Hmmm.... It just created another error message. I guess I have to upgrade AdvancedSearch, but it cost around 200€ Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /var/lib/prestashop/www.protectionantivol.fr/modules/pm_advancedsearch4/pm_advancedsearch4.php on line 3679 The below starts with line 3679. The first line is what I changed to protected. protected getCacheId() { $curUrl = explode('?', $_SERVER ['REQUEST_URI']); $curUrl = $curUrl [0] . $this->keepVarForCache(); $cacheId = sprintf('AS4|%s|%s|%d|%s', // 1. (%s) If GET id_search. keep (Tools::getValue('id_search') ? '|' . ( int ) Tools::getValue('id_search') : ''), // 2. (%s) url path $curUrl, // 3. (%d) user language $this->_cookie->id_lang, // 4. (%d) user language $this->_cookie->isLogged()); return; } Link to comment Share on other sites More sharing options...
NemoPS Posted December 6, 2013 Share Posted December 6, 2013 You must write protected function getCacheId() Link to comment Share on other sites More sharing options...
Bjarstal Posted December 6, 2013 Author Share Posted December 6, 2013 My mistake! Both the back end and shop is up but there is a message in the top of the page (see below) and the search function does not work and the layout is falling apart. And the short answer from AdvancedSerache is that I should upgrade. Strict Standards: Declaration of PM_AdvancedSearch4::getCacheId() should be compatible with that of ModuleCore::getCacheId() in /var/lib/prestashop/www.protectionantivol.fr/modules/pm_advancedsearch4/pm_advancedsearch4.php on line 37 Link to comment Share on other sites More sharing options...
Radu Posted December 6, 2013 Share Posted December 6, 2013 but even if you didn't pay for the upgrade, can you still contact support if you run into an issue? Link to comment Share on other sites More sharing options...
Bjarstal Posted December 6, 2013 Author Share Posted December 6, 2013 I have talked around and finally I found out I had bought an upgrade service for on year. I am about to install it now. Thanks for your help ! Link to comment Share on other sites More sharing options...
Recommended Posts