-
Find all unused modules
Is there an easy way to get the list of all modules which are not in use (anymore)? I have a very old contao installation and I am sure here are many modules which are not needed anymore.
Furthermore it would be great to get in an easy way a list of all extensions which are not in use anymore?
-
Not easily. For modules you could search for any references in tl_content (type = 'module', the ID is stored in the field 'module') and in tl_layout (field 'modules', however this is a serialized array). But modules (like any other content) could also be integrated via {{insert_module::*}} insert tags anywhere.
-
I doubt that the person who maintained the website before knew about {{insert_module::*}} . And even if I can easily recreate the few modules which would break as I will first make the change on the test environment.
For all: In a German thread I found this query which will exactly give me the needed information:
SELECT id, name, (SELECT COUNT(*) FROM tl_content WHERE type = 'module' AND module = tl_module.id) AS in_content, (SELECT count(*) FROM tl_layout WHERE modules LIKE CONCAT('%"', tl_module.id, '"%')) AS in_layout FROM `tl_module`;
Now I only need a query to get the unused extensions.