EDocman Check Missing Files Plugin

Overview

The EDocman Check Missing Files plugin identifies documents in the database whose physical files are missing from the server.

Plugin Group: system
Purpose: Database cleanup and file system synchronization
Execution: Manual trigger or scheduled cron job

Configuration

ParameterDescription
Last Run Timestamp Read-only field showing when the check was last executed (for tracking and scheduling purposes)

How It Works

  1. Plugin queries all document records from database
  2. Checks if physical file exists at stored path for each document
  3. Generates report of missing files with document details:
    • Document ID and title
    • Expected file path
    • Category
    • Upload date
  4. Administrator can take action on orphaned records:
    • Delete database records (cleanup)
    • Restore missing files from backup
    • Re-upload files manually

Features

  • File System Verification: Cross-check database vs actual files
  • Detailed Reporting: Lists all documents with missing files
  • Manual Execution: Run check on-demand from plugin settings
  • Scheduled Execution: Integrate with cron for automated checking
  • Database Cleanup: Identify orphaned records for removal

Use Cases

  • Post-Migration Validation: Verify all files transferred after site migration
  • Server Cleanup: Identify orphaned database records after file deletions
  • Backup Verification: Confirm backup restore completed successfully
  • Regular Maintenance: Schedule monthly checks for file system integrity
  • Troubleshooting: Diagnose user reports of missing documents

Usage

Manual Execution

  1. Navigate to Extensions → Plugins in Joomla admin
  2. Search for "EDocman Check Missing Files"
  3. Enable the plugin
  4. Click plugin name to open configuration
  5. Trigger check (method varies - may be auto-run button or CLI command)
  6. Review report of missing files
  7. Take action on identified issues

Scheduled Execution (Cron)

Set up server cron job to run plugin periodically:

# Check for missing files weekly (Sunday at 2 AM)
0 2 * * 0 /usr/bin/php /path/to/joomla/cli/edocman-check-missing-files.php

Taking Action on Missing Files

Option 1: Delete Orphaned Records

If files were intentionally removed but database records remain:

  1. Note document IDs from report
  2. Navigate to Components → EDocman → Documents
  3. Filter/search for affected documents
  4. Select and delete orphaned records

Option 2: Restore Missing Files

If files were accidentally deleted:

  1. Restore files from backup to original paths shown in report
  2. Re-run check to verify restoration
  3. Verify documents accessible on frontend

Option 3: Re-Upload Files

If backups unavailable:

  1. Edit affected documents in admin
  2. Re-upload files using document editor
  3. Save documents

Best Practices

  1. Regular Checks: Schedule monthly or quarterly file checks
  2. Post-Migration: Always run check after site migration
  3. Before Major Changes: Run check before updating file paths or moving files
  4. Backup First: Back up database before deleting orphaned records
  5. Document Actions: Keep log of missing files and actions taken
  6. Investigate Causes: Determine why files went missing to prevent recurrence

Common Causes of Missing Files

  • Manual file deletion via FTP without database update
  • Server migration with incomplete file transfer
  • Disk space issues causing file system corruption
  • Incorrect file path configuration in component settings
  • Accidental deletion of document storage directory
  • Category folder structure changes without file moves

Troubleshooting

Plugin Not Running:

  • Verify plugin is enabled
  • Check Joomla error logs for PHP errors
  • Ensure sufficient PHP memory and execution time limits

False Positives:

  • Verify document path configuration is correct
  • Check for case-sensitive file system issues (Linux/Unix)
  • Confirm document storage directory is accessible

Performance Issues:

  • For large document libraries, increase PHP max_execution_time
  • Run during low-traffic periods
  • Consider batch processing for thousands of documents

Updated: January 2026