Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/portal/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/portal/MODULE_MANAGEMENT_TROUBLESHOOTING.txt

================================================================================
 MODULE MANAGEMENT - INSTALLATION TROUBLESHOOTING
================================================================================

ERROR: "Table 'module_management' doesn't exist"
SOLUTION: The module_management table needs to be created first

================================================================================
 QUICK FIX
================================================================================

Option 1: Import Main Database Schema (RECOMMENDED)
----------------------------------------------------
1. Open phpMyAdmin or your MySQL client
2. Select your database: church_membership
3. Go to Import tab
4. Import file: database/schema.sql
5. Refresh the installation page

Option 2: Create Table Manually
--------------------------------
Run this SQL in your database:

CREATE TABLE module_management (
    id INT AUTO_INCREMENT PRIMARY KEY,
    module_name VARCHAR(100) NOT NULL,
    module_description TEXT,
    module_icon VARCHAR(100),
    module_url VARCHAR(255),
    display_order INT DEFAULT 0,
    required_role VARCHAR(50),
    is_active BOOLEAN DEFAULT TRUE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX idx_display_order (display_order),
    INDEX idx_is_active (is_active)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Then add some basic modules:

INSERT INTO module_management (module_name, module_icon, module_url, display_order, required_role) VALUES
('Membership', 'users', 'modules/membership/index.php', 1, 'assembly'),
('Events', 'calendar', 'modules/events/index.php', 2, 'assembly'),
('Programs', 'calendar-alt', 'modules/programs/index.php', 3, 'assembly'),
('Users', 'user-cog', 'modules/users/index.php', 4, 'area'),
('Settings', 'cog', 'modules/settings/index.php', 5, 'area');

Option 3: Check if Table Exists
--------------------------------
Run this SQL to check:

SHOW TABLES LIKE 'module_management';

If it returns nothing, the table doesn't exist.

================================================================================
 AFTER FIXING
================================================================================

1. Refresh the installation page: install_module_management.php
2. The installation should proceed successfully
3. You'll see green success messages
4. Module Management will appear in your sidebar

================================================================================
 WHAT THE INSTALLATION DOES
================================================================================

Creates these new tables:
1. module_access_levels - Controls which levels can see each module
2. module_access_audit - Logs all access control changes

Updates existing table:
- module_management - Adds category and system_critical columns

================================================================================
 COMMON ISSUES
================================================================================

Issue: "Access Denied" when running installer
Solution: Must be logged in as superuser

Issue: SQL file not found
Solution: Make sure sql/module_access_control.sql exists

Issue: Installation keeps failing
Solution: Check PHP error log for detailed error messages

Issue: Module Management not in sidebar after install
Solution: Log out and log back in to refresh your session

================================================================================
 VERIFY INSTALLATION
================================================================================

After successful installation, verify:

1. Check tables exist:
   SHOW TABLES LIKE 'module_access%';
   Should show 2 tables

2. Check modules:
   SELECT COUNT(*) FROM module_management;
   Should show number of modules

3. Check access levels:
   SELECT COUNT(*) FROM module_access_levels;
   Should show configured permissions

4. Check sidebar:
   System → Module Management should appear

================================================================================
 NEED MORE HELP?
================================================================================

1. Read: MODULE_MANAGEMENT_GUIDE.md
2. Read: MODULE_MANAGEMENT_QUICKSTART.txt
3. Check database error logs
4. Ensure all required tables exist

================================================================================

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists