Error "Class not found" after updating OpenCart 4
Після оновлення до останньої версії OC4 з'явилась помилка:
Fatal error: Class 'Opencart\System\Engine\Controller' not found
Кеш очищено, права перевірено. Що може бути?
1 answer
Here's a solution that works for me in production:
Step 1: Check PHP version
php -v
# Need 8.0 or higher
Step 2: Clear cache completely
rm -rf storage/cache/*
rm -rf system/storage/cache/*
Step 3: Check permissions
chmod -R 755 storage/
chmod -R 755 system/storage/
Step 4: Check namespace in controller
namespace Opencart\Admin\Controller\Module;
// Must match the file path
After these steps, the problem usually resolves!
Your Answer
Login to answer this question
Login