genoma20 Posted April 16, 2013 Share Posted April 16, 2013 (edited) Hola a todos: Estoy intentando poner una imagen a las categorias y todas me reportan el error: [PrestaShopException] Property Category->date_add is not valid at line 837 in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; ObjectModelCore->validateFields - [line 264 - classes/ObjectModel.php] - [0 Argument] 258. *259. * @return array All object fields260. */261. public function getFields()262. {263. $this->validateFields();264. $fields = $this->formatFields(self::FORMAT_COMMON);265.266. // For retro compatibility267. if (Shop::isTableAssociated($this->def['table']))268. $fields = array_merge($fields, $this->getFieldsShop()); ObjectModelCore->getFields - [line 598 - classes/ObjectModel.php] - [0 Argument] 592. $id_shop_list = $this->id_shop_list;593.594. if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default)595. $this->id_shop_default = min($id_shop_list);596. // Database update597. if (!$result = ObjectModel::$db->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values))598. return false;599.600. // Database insertion for multishop fields related to the object601. if (Shop::isTableAssociated($this->def['table']))602. { ObjectModelCore->update - [line 209 - classes/Category.php] - [1 Arguments] 203. }204. foreach ($assos as $shop)205. $this->addPosition(Category::getLastPosition((int)$this->id_parent, $shop['id_shop']), $shop['id_shop']);206. }207. $this->cleanPositions((int)$this->id_parent);208. $ret = parent::update($null_values);209. if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree)210. {211. Category::regenerateEntireNtree();212. $this->recalculateLevelDepth($this->id);213. } Argument [0] CategoryCore->update - [line 719 - classes/controller/AdminController.php] - [0 Argument] 713. }714. }715. else716. {717. $this->copyFromPost($object, $this->table);718. $result = $object->update();719. $this->afterUpdate($object);720. }721.722. if ($object->id)723. $this->updateAssoShop($object->id); AdminControllerCore->processUpdate - [line 626 - classes/controller/AdminController.php] - [0 Argument] 620. public function processSave()621. {622. if ($this->id_object)623. {624. $this->object = $this->loadObject();625. return $this->processUpdate();626. }627. else628. return $this->processAdd();629. }630. AdminControllerCore->processSave - [line 541 - classes/controller/AdminController.php] - [0 Argument] 535. {536. // Hook before action537. Hook::exec('actionAdmin'.ucfirst($this->action).'Before', array('controller' => $this));538. Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', array('controller' => $this));539. // Call process540. $return = $this->{'process'.Tools::toCamelCase($this->action)}();541. // Hook After Action542. Hook::exec('actionAdmin'.ucfirst($this->action).'After', array('controller' => $this, 'return' => $return));543. Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => $return));544.545. return $return; AdminControllerCore->postProcess - [line 521 - controllers/admin/AdminCategoriesController.php] - [0 Argument] 515. $this->processForceDeleteImage();516. if (Tools::isSubmit('forcedeleteImage'))517. Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminCategories').'&conf=7');518. }519. 520. return parent::postProcess();521. }522. 523. public function processForceDeleteImage()524. {525. $category = $this->loadObject(true); AdminCategoriesControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] 152. // setMedia MUST be called before postProcess153. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))154. $this->setMedia();155.156. // postProcess handles ajaxProcess157. $this->postProcess();158.159. if (!empty($this->redirect_after))160. $this->redirect();161.162. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] 342. // Execute hook dispatcher343. if (isset($params_hook_action_dispatcher))344. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);345.346. // Running controller347. $controller->run();348. }349. catch (PrestaShopException $e)350. {351. $e->displayMessage();352. } DispatcherCore->dispatch - [line 50 - admin2005/index.php] - [0 Argument] 44. $_POST['controller'] = strtolower($_POST['tab']);45. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))46. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);47.48. // Prepare and trigger admin dispatcher49. Dispatcher::getInstance()->dispatch(); Y no se porque, estoy trabajando en local, con la 1.5.3.1 y al importar por csv no he tenidoningun problema con las imagenes y ahora las intento subir desde el pc y me da el error. La imagenes las tengo en prestashop/img Un saludo y gracias. Edited April 23, 2013 by genoma20 (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted April 16, 2013 Share Posted April 16, 2013 Revisa este tema: http://www.prestashop.com/forums/topic/215759-problema-meta-keywords-solucionado/ Link to comment Share on other sites More sharing options...
genoma20 Posted April 23, 2013 Author Share Posted April 23, 2013 Hola Nadie. He seguido el post he intento hacer la consulta a la base de datos UPDATE ps_category SET date_add = sysdate() WHERE id_category > 2 pero no consigo que me ponga la fecha otra vez, me lo hizo una vez y los cambie a mano y funciono, pero eran 4, pero ahora tengo mas de 20 y es un autentico coñazo, asi que si me puedes guiar tu o alguien, lo agradeceria. Un saludo Link to comment Share on other sites More sharing options...
genoma20 Posted April 23, 2013 Author Share Posted April 23, 2013 Ya, elegir la base de datos, pinchar en SQL, pegar UPDATE ps_category SET date_add = sysdate() WHERE id_category > 2y darle a continuar, asi actualiza y vuelve a funcionar Link to comment Share on other sites More sharing options...
Recommended Posts