Results 1 to 3 of 3

Thread: Find all unused modules

  1. #1
    User
    Join Date
    01-08-10.
    Posts
    30

    Default 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?

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    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.

  3. #3
    User
    Join Date
    01-08-10.
    Posts
    30

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •