We have a bunch of older sites 8.5.xx translated into v.9.5. running on php 8.5
This error is thrown everytime one tries to empty cache.
Even deleting content of the the cache folder manually won’t help.
The error persists.
Handling “Concrete\Core\Cache\Command\ClearCacheCommand” failed: include(/home/ethz.itet.ch/application/files/cache/expensive/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3e7d68124ace5663/5a578007c2573b03/736abbd0621df6ef/08874cec99a4cc06.php) : Failed to open stream: No such file or directory
Same goes for “Refresh Database Entities” in Environment with Error:
Doctrine \ DBAL \ Exception \ ForeignKeyConstraintViolationException
An exception occurred while executing ‘ALTER TABLE AttributeSets ADD CONSTRAINT FK_FCA02D5FCE45CBB0 FOREIGN KEY (pkgID) REFERENCES Packages (pkgID)’: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mhklch_v9db.#sql-alter-2763-4b0a7, CONSTRAINT FK_FCA02D5FCE45CBB0 FOREIGN KEY (pkgID) REFERENCES Packages (pkgID))
The sites run fine except the two errors.
Anybody with same experience or idea how to fix it ?
Just a guess, but it sounds like you had a package in 8.5 that installed an attribute, but now the package doesn’t exist. If you can use PHPMyAdmin or a similar tool, have a look in the AttributeSets table, and look for any records that have pkgID that is not 0 and not NULL.
If you find some, then you should be able to find those same values in the Packages table.
If you cannot, that may be the cause of your problem.
Another possibility if you upgraded from an early 8.5.x core.
There was a bug in the upgrade process somewhere low in 8.5.x. It could leave foreign key constraints broken within attributes. From wherever you were in 8.5.x, this can usually be avoided by upgrading in one big step to 8.5.latest as an intermediate step before upgrading in another big step to 9.5.latest.
If its too late for that, you may be able to recover by exporting the 9.5 site database with MySQL dump, checking the SQL dump file and repairing the foreign key constraints by comparing to a SQL dump from a fresh install 9.5.latest, then importing the repaired SQL dump to your database. That isn’t a process to be taken lightly - its heavy going.
There has been some previous discussion on this process way back in the forums.