vemec Posted July 26, 2015 Share Posted July 26, 2015 hola a tod@s. a ver si podeis echarme una manita en esto. me da error el acceso a los modulos para configurarlos. este es el error. [PrestaShopDatabaseException]Table 'ps_sd_updates' already exists CREATE TABLE `ps_sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_bin', `action` VARCHAR(10) NOT NULL COLLATE 'utf8_bin', PRIMARY KEY (`id`)) COLLATE='utf8_bin' ENGINE=InnoDBat line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /** DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 465 - classes/db/Db.php] - [1 Arguments] DbCore->execute - [line 38 - modules/sarbacanedesktop/upgrade/install-1.0.6.php] - [1 Arguments] upgrade_module_1_0_6 - [line 439 - classes/module/Module.php] - [1 Arguments] ModuleCore->runUpgradeModule - [line 1371 - controllers/admin/AdminModulesController.php] AdminModulesControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] gracias anticipadas. Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 Modifica el fichero modules/sarbacanedesktop/upgrade/install-1.0.6.php, y sobre la línea 38 se supone que estará esa query. Añade esto: CREATE TABLE IF NOT EXISTS 1 Link to comment Share on other sites More sharing options...
vemec Posted July 27, 2015 Author Share Posted July 27, 2015 Modifica el fichero modules/sarbacanedesktop/upgrade/install-1.0.6.php, y sobre la línea 38 se supone que estará esa query. Añade esto: CREATE TABLE IF NOT EXISTS buenos dias. gracias por responder. adjunto mi fichero. no se donde ponerlo. me lo puedes indicar? gracias por tu ayuda. if (!defined('_PS_VERSION_')) exit; function upgrade_module_1_0_6($object) { //sql update $update1 = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sarbacanedesktop`'); $update2 = Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE \'utf8_bin\', `action` VARCHAR(10) NOT NULL COLLATE \'utf8_bin\', PRIMARY KEY (`id`)) COLLATE=\'utf8_bin\' ENGINE='._MYSQL_ENGINE_); $update3 = Db::getInstance()->execute(' CREATE TRIGGER sd_userupdate AFTER UPDATE ON '._DB_PREFIX_.'customer FOR EACH ROW BEGIN DELETE FROM '._DB_PREFIX_.'sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'S\'); ELSE INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'U\'); END IF; END; '); $update4 = Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.'sarbacanedesktop_users` ADD COLUMN `list_id` varchar(50) NULL AFTER `sd_id`, ADD COLUMN `last_call_date` DATETIME NULL AFTER `list_id`; '); return $update1 && $update2 && $update3 && $update4; } Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 $update2 = Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'sd_updates` ( 1 Link to comment Share on other sites More sharing options...
vemec Posted July 27, 2015 Author Share Posted July 27, 2015 buenos dias. gracias por responder. adjunto mi fichero. no se donde ponerlo. me lo puedes indicar? gracias por tu ayuda. if (!defined('_PS_VERSION_')) exit; function upgrade_module_1_0_6($object) { //sql update $update1 = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sarbacanedesktop`'); $update2 = Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE \'utf8_bin\', `action` VARCHAR(10) NOT NULL COLLATE \'utf8_bin\', PRIMARY KEY (`id`)) COLLATE=\'utf8_bin\' ENGINE='._MYSQL_ENGINE_); $update3 = Db::getInstance()->execute(' CREATE TRIGGER sd_userupdate AFTER UPDATE ON '._DB_PREFIX_.'customer FOR EACH ROW BEGIN DELETE FROM '._DB_PREFIX_.'sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'S\'); ELSE INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'U\'); END IF; END; '); $update4 = Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.'sarbacanedesktop_users` ADD COLUMN `list_id` varchar(50) NULL AFTER `sd_id`, ADD COLUMN `last_call_date` DATETIME NULL AFTER `list_id`; '); return $update1 && $update2 && $update3 && $update4 buenos dias. gracias por responder. adjunto mi fichero. no se donde ponerlo. me lo puedes indicar? gracias por tu ayuda. if (!defined('_PS_VERSION_')) exit; function upgrade_module_1_0_6($object) { //sql update $update1 = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sarbacanedesktop`'); $update2 = Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE \'utf8_bin\', `action` VARCHAR(10) NOT NULL COLLATE \'utf8_bin\', PRIMARY KEY (`id`)) COLLATE=\'utf8_bin\' ENGINE='._MYSQL_ENGINE_); $update3 = Db::getInstance()->execute(' CREATE TRIGGER sd_userupdate AFTER UPDATE ON '._DB_PREFIX_.'customer FOR EACH ROW BEGIN DELETE FROM '._DB_PREFIX_.'sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'S\'); ELSE INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'U\'); END IF; END; '); $update4 = Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.'sarbacanedesktop_users` ADD COLUMN `list_id` varchar(50) NULL AFTER `sd_id`, ADD COLUMN `last_call_date` DATETIME NULL AFTER `list_id`; '); return $update1 && $update2 && $update3 && $update4; } Hola de nuevo. para probar, creo que es donde debo ponerlo, lo he puesto aqui $update2 = Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'sd_updates` ahora me da otro error, no se si es que esta mal puesto o es que tiene otros errores. adjunto error. [PrestaShopDatabaseException]TRIGGER command denied to user 'RAC40_admin'@'81.88.55.152' for table 'ps_customer' CREATE TRIGGER sd_userupdate AFTER UPDATE ON ps_customer FOR EACH ROW BEGIN DELETE FROM ps_sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO ps_sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,'S'); ELSE INSERT INTO ps_sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,'U'); END IF; END; at line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /** DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 465 - classes/db/Db.php] - [1 Arguments] DbCore->execute - [line 49 - modules/sarbacanedesktop/upgrade/install-1.0.6.php] - [1 Arguments] upgrade_module_1_0_6 - [line 439 - classes/module/Module.php] - [1 Arguments] ModuleCore->runUpgradeModule - [line 1371 - controllers/admin/AdminModulesController.php] AdminModulesControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] puedes ayudarme?Gracias por tu colaboracion.. Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 Tu usuario de base de datos no tiene permisos para crear TRIGGERS. 1 Link to comment Share on other sites More sharing options...
vemec Posted July 27, 2015 Author Share Posted July 27, 2015 buenos dias. gracias por responder. adjunto mi fichero. no se donde ponerlo. me lo puedes indicar? gracias por tu ayuda. if (!defined('_PS_VERSION_')) exit; function upgrade_module_1_0_6($object) { //sql update $update1 = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sarbacanedesktop`'); $update2 = Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE \'utf8_bin\', `action` VARCHAR(10) NOT NULL COLLATE \'utf8_bin\', PRIMARY KEY (`id`)) COLLATE=\'utf8_bin\' ENGINE='._MYSQL_ENGINE_); $update3 = Db::getInstance()->execute(' CREATE TRIGGER sd_userupdate AFTER UPDATE ON '._DB_PREFIX_.'customer FOR EACH ROW BEGIN DELETE FROM '._DB_PREFIX_.'sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'S\'); ELSE INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'U\'); END IF; END; '); $update4 = Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.'sarbacanedesktop_users` ADD COLUMN `list_id` varchar(50) NULL AFTER `sd_id`, ADD COLUMN `last_call_date` DATETIME NULL AFTER `list_id`; '); return $update1 && $update2 && $update3 && $update4 buenos dias. gracias por responder. adjunto mi fichero. no se donde ponerlo. me lo puedes indicar? gracias por tu ayuda. if (!defined('_PS_VERSION_')) exit; function upgrade_module_1_0_6($object) { //sql update $update1 = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'sarbacanedesktop`'); $update2 = Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'sd_updates` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `update_date` DATETIME NOT NULL, `customer_id` INT(11) NULL DEFAULT NULL, `customer_email` VARCHAR(255) NULL DEFAULT NULL COLLATE \'utf8_bin\', `action` VARCHAR(10) NOT NULL COLLATE \'utf8_bin\', PRIMARY KEY (`id`)) COLLATE=\'utf8_bin\' ENGINE='._MYSQL_ENGINE_); $update3 = Db::getInstance()->execute(' CREATE TRIGGER sd_userupdate AFTER UPDATE ON '._DB_PREFIX_.'customer FOR EACH ROW BEGIN DELETE FROM '._DB_PREFIX_.'sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'S\'); ELSE INSERT INTO '._DB_PREFIX_.'sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,\'U\'); END IF; END; '); $update4 = Db::getInstance()->execute(' ALTER TABLE `'._DB_PREFIX_.'sarbacanedesktop_users` ADD COLUMN `list_id` varchar(50) NULL AFTER `sd_id`, ADD COLUMN `last_call_date` DATETIME NULL AFTER `list_id`; '); return $update1 && $update2 && $update3 && $update4; } Hola de nuevo. para probar, creo que es donde debo ponerlo, lo he puesto aqui $update2 = Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'sd_updates` ahora me da otro error, no se si es que esta mal puesto o es que tiene otros errores. adjunto error. [PrestaShopDatabaseException]TRIGGER command denied to user 'RAC40_admin'@'81.88.55.152' for table 'ps_customer' CREATE TRIGGER sd_userupdate AFTER UPDATE ON ps_customer FOR EACH ROW BEGIN DELETE FROM ps_sd_updates WHERE customer_id = NEW.id_customer && customer_email = NEW.email; IF NEW.newsletter = 1 THEN INSERT INTO ps_sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,'S'); ELSE INSERT INTO ps_sd_updates (id,update_date,customer_id,customer_email,action) VALUES (NULL,NOW(),NEW.id_customer,NEW.email,'U'); END IF; END; at line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /** DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 465 - classes/db/Db.php] - [1 Arguments] DbCore->execute - [line 49 - modules/sarbacanedesktop/upgrade/install-1.0.6.php] - [1 Arguments] upgrade_module_1_0_6 - [line 439 - classes/module/Module.php] - [1 Arguments] ModuleCore->runUpgradeModule - [line 1371 - controllers/admin/AdminModulesController.php] AdminModulesControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] puedes ayudarme?Gracias por tu colaboracion.. hola de nuevo. gracias por este apoyo. tan solo me queda un error que resolver.no se que ha sucedido en la web pero ya esta casi todo resuelto.este es el mensaje que me aparece ahora. Unknow error on line 48 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php[4096] Argument 1 passed to Advancedeucompliance::__construct() must be an instance of RepositoryManager, none given, called in /htdocs/public/www/tienda/classes/module/Module.php on line 1031 and defined Notice on line 59 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php[8] Undefined variable: repository_manager Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 Bájate el módulo (https://github.com/PrestaShop/advancedeucompliance/archive/master.zip) e instalalo. Tienes que quitar el "-master" de la carpeta que subas. 1 Link to comment Share on other sites More sharing options...
vemec Posted July 27, 2015 Author Share Posted July 27, 2015 Bájate el módulo (https://github.com/PrestaShop/advancedeucompliance/archive/master.zip) e instalalo. Tienes que quitar el "-master" de la carpeta que subas. hola, gracias por la informacion. ya lo he instalado y me da el siguiente error. Fatal error: Call to undefined method Advancedeucompliance::displayWarning() in /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php on line 729 [PrestaShop] Fatal error in module advancedeucompliance: Call to undefined method Advancedeucompliance::displayWarning() y ha aumentado el numero de errores con estos. Unknow error on line 1552 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [2048] Declaration of Advancedeucompliance::disable() should be compatible with ModuleCore::disable($forceAll = false) Unknow error on line 57 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [4096] Argument 1 passed to Advancedeucompliance::__construct() must be an instance of Core_Foundation_Database_EntityManager, none given, called in /htdocs/public/www/tienda/classes/module/Module.php on line 1031 and defined Unknow error on line 58 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [4096] Argument 2 passed to Advancedeucompliance::__construct() must be an instance of Core_Foundation_FileSystem_FileSystem, none given, called in /htdocs/public/www/tienda/classes/module/Module.php on line 1031 and defined Unknow error on line 59 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [4096] Argument 3 passed to Advancedeucompliance::__construct() must be an instance of Core_Business_Email_EmailLister, none given, called in /htdocs/public/www/tienda/classes/module/Module.php on line 1031 and defined Notice on line 72 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [8] Undefined variable: entity_manager Notice on line 73 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [8] Undefined variable: fs Notice on line 74 en archivo /htdocs/public/www/tienda/modules/advancedeucompliance/advancedeucompliance.php [8] Undefined variable: email Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 Pues plan B, desinstala/elimina el módulo. 1 Link to comment Share on other sites More sharing options...
vemec Posted July 27, 2015 Author Share Posted July 27, 2015 Pues plan B, desinstala/elimina el módulo. hola muchisimas gracias por tu ayuda. lo he desinstalado y ya no da errores....!!!!!!! debo instalarlo o el modulo no es importante para que funcione la tienda? Gracias. Link to comment Share on other sites More sharing options...
joseantgv Posted July 27, 2015 Share Posted July 27, 2015 hola muchisimas gracias por tu ayuda. lo he desinstalado y ya no da errores....!!!!!!! debo instalarlo o el modulo no es importante para que funcione la tienda? Gracias. Aquí tienes la documentación: http://doc.prestashop.com/display/PS16/Administration+modules#Administrationmodules-AdvancedEUCompliance Link to comment Share on other sites More sharing options...
Recommended Posts