Jose Martino Feliz H Posted October 7, 2016 Share Posted October 7, 2016 Hi all, I have a problem, can you help me to solve it please ? when I uninstall the carriers module prestashop gives me the following error : [PrestaShopException]Property Carrier->name is emptyat line 909 in file classes/ObjectModel.php 904. }905.906. $message = $this->validateField($field, $this->$field);907. if ($message !== true) {908. if ($die) {909. throw new PrestaShopException($message);910. }911. return $error_return ? $message : false;912. }913. }914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php]241. * @return array All object fields242. * @throws PrestaShopException243. */244. public function getFields()245. {246. $this->validateFields();247. $fields = $this->formatFields(self::FORMAT_COMMON);248.249. // For retro compatibility250. if (Shop::isTableAssociated($this->def['table'])) {251. $fields = array_merge($fields, $this->getFieldsShop()); ObjectModelCore->getFields - [line 652 - classes/ObjectModel.php]647.648. if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) {649. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);650. }651. // Database update652. if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values)) {653. return false;654. }655.656. // Database insertion for multishop fields related to the object657. if (Shop::isTableAssociated($this->def['table'])) { ObjectModelCore->update - [line 193 - modules/bbcarrier/classes/BBCarrierCarrier.php]188. {189. $carrier = new Carrier((int) $carrierId);190. $carrier->active = false;191. $carrier->deleted = true;192.193. if (!$carrier->update()) {194. return false;195. }196.197. $moduleCarrier = new BBCarrierCarrier((int) $moduleCarrierId);198. $moduleCarrier->active = false; BBCarrierCarrier::removeCarrier - [line 168 - modules/bbcarrier/classes/BBCarrierCarrier.php] - [2 Arguments]163. else if (!$defaultCarrierId) {164. $defaultCarrierId = Configuration::get('PS_CARRIER_DEFAULT');165. Cache::store($cacheId, $defaultCarrierId);166. }167.168. if (self::removeCarrier($moduleCarrierId, $carrierId)169. && ($defaultCarrierId == $carrierId)170. && !$resetDefaultCarrier) {171. $resetDefaultCarrier = true;172. }173. } BBCarrierCarrier::removeCarriers - [line 111 - modules/bbcarrier/bbcarrier.php]106. || !$this->unregisterHook('displayBackOfficeHeader')) {107. return false;108. }109.110. $this->uninstallTabs();111. BBCarrierCarrier::removeCarriers();112.113. // Limpiamos los carriers de instalaciones anteriores114. $this->cleanModuleDeletedCarriers();115.116. // Eliminamos las variables de configuración del modulo bbcarrier->uninstall - [line 681 - controllers/admin/AdminModulesController.php]676. if (Validate::isLoadedObject($module) && !$module->getPermission('configure')) {677. $this->errors[] = Tools::displayError('You do not have the permission to use this module.');678. } else {679. // Uninstall the module before deleting the files, but do not block the process if uninstall returns false680. if (Module::isInstalled($module->name)) {681. $module->uninstall();682. }683. $moduleDir = _PS_MODULE_DIR_.str_replace(array('.', '/', '\\'), array('', '', ''), Tools::getValue('module_name'));684. $this->recursiveDeleteOnDisk($moduleDir);685. if (!file_exists($moduleDir)) {686. Tools::redirectAdmin(self::$currentIndex.'&conf=22&token='.$this->token.'&tab_module='.Tools::getValue('tab_module').'&module_name='.Tools::getValue('module_name')); AdminModulesControllerCore->postProcessDelete - [line 1109 - controllers/admin/AdminModulesController.php]1104. $post_process_methods_list = array_merge((array)$filter_methods, (array)$callback_methods);1105. foreach ($post_process_methods_list as $ppm) {1106. if (Tools::isSubmit($ppm)) {1107. $ppm = 'postProcess'.ucfirst($ppm);1108. if (method_exists($this, $ppm)) {1109. $ppm_return = $this->$ppm();1110. }1111. }1112. }1113.1114. // Call appropriate module callback AdminModulesControllerCore->postProcess - [line 178 - classes/controller/Controller.php]173. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {174. $this->setMedia();175. }176.177. // postProcess handles ajaxProcess178. $this->postProcess();179.180. if (!empty($this->redirect_after)) {181. $this->redirect();182. }183. ControllerCore->run - [line 367 - classes/Dispatcher.php]362. if (isset($params_hook_action_dispatcher)) {363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364. }365.366. // Running controller367. $controller->run();368. } catch (PrestaShopException $e) {369. $e->displayMessage();370. }371. }372. DispatcherCore->dispatch - [line 58 - admin/index.php]53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);55. }56.57. // Prepare and trigger admin dispatcher58. Dispatcher::getInstance()->dispatch(); Thanks for support in advance Link to comment Share on other sites More sharing options...
dicola Posted November 16, 2016 Share Posted November 16, 2016 I had the same problem! Thanx for the information! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now