Jump to content

Edit History

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL scripts in:
modules/
yourmodulename/sql/install.php.
modules/yourmodulename/upgrade/upgrade-x-x-x.php
in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT ms.id_module as "ps_module_shop id_module" , m.id_module as "module id_module" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

DELETE FROM ps_module_shop 
WHERE id_module 
IN (
  SELECT ms.id_module as "ms id" , m.id_module as "m id" 
  FROM ps_module as m
  RIGHT JOIN ps_module_shop as ms 
  ON m.id_module = ms.id_module
  WHERE m.id_module IS NULL;
);

* The above sql will find all modules that does not exists in ps_module table but do exist in ps_module_shop table and removes them.

--------------------------------------

Now go to ps_hook_module table and remove the record in similar way. So run:

SELECT hm.id_module as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

---------------------------------------

We could do the same for ps_module_history table

SELECT mh.id_module as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

---------------------------------------

NOTE - If you remove module manually and try to reinstall it you might need to do this:

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See the fallowing example:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL scripts in:
modules/
yourmodulename/sql/install.php.
modules/yourmodulename/upgrade/upgrade-x-x-x.php
in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT ms.id_module as "ps_module_shop id_module" , m.id_module as "module id_module" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

DELETE FROM ps_module_shop 
WHERE id_module 
IN (
  SELECT ms.id_module as "ms id" , m.id_module as "m id" 
  FROM ps_module as m
  RIGHT JOIN ps_module_shop as ms 
  ON m.id_module = ms.id_module
  WHERE m.id_module IS NULL;
);

* The above sql will find all modules that does not exists in ps_module table but do exist in ps_module_shop table and removes them.

--------------------------------------

Now go to ps_hook_module table and remove the record in similar way. So run:

SELECT hm.id_module as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

---------------------------------------

We could do the same for ps_module_history table

SELECT mh.id_module as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

---------------------------------------

<h2>If you remove module manually and try to reinstall it you might want to do this:</h2>

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See the fallowing example:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL script in:
modules/
yourmodulename/sql/install.php - in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT ms.id_module as "ps_module_shop id_module" , m.id_module as "module id_module" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

DELETE FROM ps_module_shop 
WHERE id_module 
IN (
  SELECT ms.id_module as "ms id" , m.id_module as "m id" 
  FROM ps_module as m
  RIGHT JOIN ps_module_shop as ms 
  ON m.id_module = ms.id_module
  WHERE m.id_module IS NULL;
);

* The above sql will find all modules that does not exists in ps_module table but do exist in ps_module_shop table and removes them.

--------------------------------------

Now go to ps_hook_module table and remove the record in similar way. So run:

SELECT hm.id_module as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

---------------------------------------

We could do the same for ps_module_history table

SELECT mh.id_module as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

---------------------------------------

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See the fallowing example:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL script in:
modules/
yourmodulename/sql/install.php - in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

SELECT ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_module_shop WHERE id_module IN (SELECT ...);

Go to ps_module_shop and remove the record with this id. Also check for `ps_hook_module` in similar way. So run:

SELECT hm.id_module as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

We could do the same for ps_module_history table

SELECT mh.id_module as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

 

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See the fallowing example:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL script in:
modules/
yourmodulename/sql/install.php - in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

SELECT ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

-- DELETE FROM ps_module_shop WHERE id_module IN (SELECT ...);

Go to ps_module_shop and remove the record with this id. Also check for `ps_hook_module` in similar way. So run:

SELECT hm.id_module as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL AND hm.id_module IS NOT NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

We could do the same for ps_module_history table

SELECT mh.id_module as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL AND mh.id_module IS NOT NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

 

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See ecample:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

First, make sure that you have no errors in your SQL script in:
modules/
yourmodulename/sql/install.php - in most cases this will be the problem.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT @REMOVE1 := ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

DELETE LAFTOVERS FROM ALL TABLES: 

SELECT @REMOVE1 := GROUP_CONCAT(ms.id_module) as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

-- DELETE FROM ps_module_shop WHERE id_module IN (SELECT ...);

Go to ps_module_shop and remove the record with this id. Also check for `ps_hook_module` in similar way. So run:

SELECT @REMOVE2 := GROUP_CONCAT(hm.id_module) as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL AND hm.id_module IS NOT NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (SELECT ...);

We could do the same for ps_module_history table

SELECT @REMOVE3 := GROUP_CONCAT(mh.id_module) as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL AND mh.id_module IS NOT NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (SELECT ...);

 

You should also see if there are any roles remained for you plugin name in ps_authorization_role table. My module name was "DEVWLH1" so this is what I search for. See ecample:

SELECT * FROM `ps_authorization_role` WHERE slug LIKE "%DEVWLH1%";

* Just make sure to replace LIKE ... with your actual module name "%yourmodulname%";
*IMPORTNT! - Make a note of the IDs you will return (write them down before deleting them - you will need to know them in another table);

Then go to ps_module_access table and search for rows base on your previous findings from id_authorization_role table.
 image.thumb.png.458fa6e3d4cebd08a6ff4051f1a49bc3.png

 

Now you can delete them from ps_module_access table, and then do the same in ps_authorization_role table.

DevWL

DevWL

Same problem here.

My problem was caused by removing the module manually. Basically I removed record from ps_module tabel manually and then removed the folder from modules catalog. Its seems that there is more references to this module in our database which might cause an issue.

To investigate the issue check if you have any left over after non existing's module installation in your database table.

SELECT @REMOVE1 := ms.id_module as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

DELETE LAFTOVERS: 

SELECT @REMOVE1 := GROUP_CONCAT(ms.id_module) as "ms id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_shop as ms ON m.id_module = ms.id_module
WHERE m.id_module IS NULL AND ms.id_module IS NOT NULL;

-- DELETE FROM ps_module_shop WHERE id_module IN (@REMOVE1);

Go to ps_module_shop and remove the record with this id. Also check for `ps_hook_module` in similar way. So run:

SELECT @REMOVE2 := GROUP_CONCAT(hm.id_module) as "hm id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_hook_module as hm ON m.id_module = hm.id_module
WHERE m.id_module IS NULL AND hm.id_module IS NOT NULL;

-- DELETE FROM ps_hook_module WHERE id_module IN (@REMOVE2);

We could do the same for ps_module_history table

SELECT @REMOVE3 := GROUP_CONCAT(mh.id_module) as "mh id" , m.id_module as "m id" FROM ps_module as m
RIGHT JOIN ps_module_history as mh ON m.id_module = mh .id_module
WHERE m.id_module IS NULL AND mh.id_module IS NOT NULL;

-- DELETE FROM ps_module_history WHERE id_module IN (@REMOVE3);

 

 

* uncomment the DELETE part if you want to remove unexciting records in ps_module shown in SELECT statement in ps_module_shop  and ps_hook_module.

×
×
  • Create New...