I have the following problem.
We are using the api to add/delete content into layouts
This worked for the past 2 years
Unfortunately something is going wrong with the deletion procedure…
Items cannot always be renamed
Items cannot always be retired
Items cannot be deleted
If i have a look at the database, there is something strange with the following tables:
lklayoutmedia (208 Kb)
lklayoutmediagroup (524Mb)
In both tables the deleted content is still connected to a layout.
Therefore the content cannot be deleted.
My guess is that these tables contain old layouts.
I have used the maintenance.php to see if thes tables could be reorganised, but no luck.
I don’t recall how did the 1.7 series API work to be honest.
I do remember that sometimes there were issues with removing files from CMS in 1.7 series, it was 2 step process in that version, however I believe there were cases when some records became orphaned and the could not be deleted via web ui (or presumably via api either).
You could try to run the Tidy library too.
If the issue will persist then we may need more information about the differences between what records are still in db and what is the CMS showing - preferably on an example of a file that is causing such problems now.
It is possible that the API route isn’t clearing everything correctly, 1.7 never really had properly released and documented API and that it does leave some orphaned records in db because of that.
You could remove those from db directly, but as always with making any changes directly in db, please be careful and make sure you have up to date backup, in case something goes wrong.