Admin Panel Troubleshooting
Häufige Probleme beim Admin-Panel und deren Lösungen.
Problem: 404 Error bei /admin
Symptom
https://appisym.go4family.net/admin
→ 404 Not FoundUrsachen & Lösungen
1. .htaccess fehlt im public/ Verzeichnis
Diagnose:
ls -la public/.htaccess
# Wenn "No such file or directory" → .htaccess fehltLösung: Die .htaccess wurde bereits erstellt in: public/.htaccess
Inhalt prüfen:
cat public/.htaccess | head -10
# Sollte "DirectoryIndex index.php" enthalten2. Document Root zeigt nicht auf public/
Diagnose: Prüfe Apache/Plesk Konfiguration
Lösung für Plesk:
- Öffne Plesk → Websites & Domains → appisym.go4family.net
- Klicke auf Hosting Settings
- Setze Document Root auf:
/var/www/vhosts/canshare.me/appiyon.com/appisym/public - Aktiviere "Allow .htaccess usage"
- Speichern
Alternative: Symlink erstellen
cd /var/www/vhosts/appisym.go4family.net/
rm -rf httpdocs
ln -s /var/www/vhosts/canshare.me/appiyon.com/appisym/public httpdocs3. Routes nicht registriert
Diagnose:
php bin/console debug:router | grep admin
# Sollte "admin" Route anzeigenLösung: Cache leeren:
php bin/console cache:clearProblem: 403 Forbidden bei /admin
Symptom
Access Denied
Admin panel is only accessible via appisym.go4family.net (current host: andere-domain.com)Ursache
Domain Restriction blockiert Zugriff von anderen Domains
Lösung
Für Production (gewollt): Greife nur über die korrekte Domain zu:
https://appisym.go4family.net/adminFür lokale Entwicklung: Ändere .env.local:
# .env.local
ADMIN_DOMAIN=localhostDomain Restriction temporär deaktivieren:
# config/services.yaml - NUR FÜR ENTWICKLUNG!
when@dev:
services:
App\Appi\Dev\Http\EventSubscriber\AdminDomainRestrictionSubscriber:
tags: [] # DeaktiviertProblem: 500 Internal Server Error
Symptom
Internal Server ErrorDiagnose
Schritt 1: Logs prüfen
# Symfony Logs
tail -f var/log/dev.log
# Apache Error Logs
tail -f /var/log/apache2/error.log
# oder
tail -f /var/www/vhosts/appisym.go4family.net/logs/error_logSchritt 2: Debug-Modus aktivieren
# .env
APP_ENV=dev
APP_DEBUG=1Häufige Ursachen
1. Composer Dependencies fehlen
Lösung:
composer install2. Cache-Probleme
Lösung:
rm -rf var/cache/*
php bin/console cache:clear3. Permissions falsch
Lösung:
chmod -R 775 var/
chmod -R 775 public/bundles/
chown -R www-data:www-data var/4. Doctrine Mapping-Fehler
Fehler:
Class "Admin" not foundLösung:
# Cache leeren
php bin/console cache:clear
# Doctrine Schema validieren
php bin/console doctrine:schema:validateProblem: Login funktioniert nicht
Symptom
Admin-Seite lädt, aber Login schlägt fehl
Ursache
Security Bundle ist noch nicht konfiguriert
Aktueller Stand
⚠️ Authentication noch nicht implementiert
Die Admin-Entities existieren, aber die Symfony Security-Integration fehlt noch.
Temporäre Lösung
Aktuell ist das Admin-Panel nur für die Verwaltung von Daten gedacht, nicht für Login.
Geplante Lösung
- Security Bundle konfigurieren
- Admin UserProvider erstellen
- Login-Form implementieren
- Authentication Handler
Problem: EasyAdmin-Seiten laden nicht
Symptom
/admin funktioniert
/admin/admin gibt 404Diagnose
php bin/console debug:router | grep admin_admin
# Sollte Admin CRUD-Routes anzeigenLösung
1. Cache leeren:
php bin/console cache:clear2. Controller-Registrierung prüfen:
# config/services.yaml
App\Appi\Dev\Http\Controller\:
resource: '../src/Appi/Dev/Http/Controller'
tags: ['controller.service_arguments']3. EasyAdmin Bundle installiert?
composer show easycorp/easyadmin-bundle
# Sollte v4.26.5 oder höher anzeigenProblem: Datenbank-Verbindung fehlschlägt
Symptom
Connection refused
SQLSTATE[08006]Diagnose
# Prüfe .env
cat .env | grep DATABASE_URL
# Teste Verbindung
php bin/console dbal:run-sql "SELECT 1"Lösung
1. Database URL korrigieren:
# .env
DATABASE_URL="postgresql://user:password@127.0.0.1:5432/dbname?serverVersion=16&charset=utf8"2. Datenbank existiert?
# Erstellen falls nötig
php bin/console doctrine:database:create3. PostgreSQL läuft?
sudo systemctl status postgresql
# oder
pg_isreadyProblem: Migrations schlagen fehl
Symptom
Migration failed
Table already existsLösung
Siehe: Troubleshooting Migrations
Problem: Assets (CSS/JS) laden nicht
Symptom
Admin-Panel sieht kaputt aus (kein Styling)
Diagnose
ls -la public/bundles/Lösung
1. Assets installieren:
php bin/console assets:install --symlink public2. Permissions prüfen:
chmod -R 755 public/bundles/3. Bei 404 für Assets: Prüfe .htaccess - sollte statische Files durchlassen
Debugging-Tools
1. Routes prüfen
# Alle Routes anzeigen
php bin/console debug:router
# Spezifische Route testen
php bin/console router:match /admin
# Route-Details
php bin/console debug:router admin2. Services prüfen
# Alle Services
php bin/console debug:container
# Spezifischer Service
php bin/console debug:container AdminDomainRestrictionSubscriber3. Events prüfen
# Event Listeners
php bin/console debug:event-dispatcher kernel.request4. Doctrine prüfen
# Schema validieren
php bin/console doctrine:schema:validate
# Mapping Info
php bin/console doctrine:mapping:info
# Migrations Status
php bin/console doctrine:migrations:status5. Cache-Info
# Cache-Pool Status
php bin/console cache:pool:list
# Cache leeren
php bin/console cache:clear
php bin/console cache:warmupCheckliste für Admin-Panel
Bei Problemen diese Checkliste durchgehen:
- [ ]
.htaccessexistiert inpublic/ - [ ] Document Root zeigt auf
appisym/public - [ ]
ADMIN_DOMAINin.envist korrekt - [ ] Routes sind registriert (
debug:router | grep admin) - [ ] Datenbank-Verbindung funktioniert
- [ ] Migrationen sind ausgeführt
- [ ] Cache ist geleert
- [ ] Composer Dependencies installiert
- [ ] File Permissions sind korrekt
- [ ] Apache/PHP läuft
- [ ] PostgreSQL läuft
Logs und Debugging
Wichtige Log-Dateien
Symfony:
var/log/dev.log
var/log/prod.logApache:
/var/log/apache2/error.log
/var/www/vhosts/appisym.go4family.net/logs/error_logPHP-FPM:
/var/log/php-fpm/error.logLogging Level erhöhen
# config/packages/dev/monolog.yaml
monolog:
handlers:
main:
level: debug # Mehr LogsSupport
Wenn nichts hilft:
- Alle Schritte aus der Checkliste durchgehen
- Logs prüfen
- Stack Trace analysieren
- Minimal reproduzierbares Beispiel erstellen
- Issue auf GitHub erstellen (wenn öffentlich)
Siehe auch
- DEPLOYMENT.md - Deployment-Anleitung
- Troubleshooting Migrations
- Common Errors