Craft CMS Entries Disappearing I've setup a Craft 3 site for a client and we are seeing the strangest thing where pages are just disappearing. Best we can tell no-one has deleted the entry, but we get a 404 on the front-end and it is not showing up on the back-end, even under &quot;Trashed&quot;. What is weird is that when I re-create the page I can't use the same slug so it seems like it is still in the database. I've tried querying the database and I can see rows in the elements_sites table with that uri, but I don't know enough about the data scheme to tell where the disconnect is or tables to look at to determine which is the &quot;live&quot; version. One other note that may be related is several pages disappeared that were all sub-pages to a parent page (but the parent page is still there on the site)
Here is a query I ran for one of the pages that is missing:

Any suggestions for how to figure out what is happening or a query to run to determine which pages are live and where the disconnect may be for those pages?
I finally got to the bottom of what happened. I deleted a user about a month ago and after 30 days (the soft delete period) Craft deleted all related pages that the user had originally created. Thankfully, I was able to restore those pages by re-creating records for each in the entries table with a different authorid.
I ran this script on a backup of the database to find the entries for that author.
select es.uri, c.title, et.*, e.* from entries e 
inner join entrytypes et on e.typeid=et.id
inner join elements el on e.id = el.id
inner join elements_sites es on es.elementid = el.id
left outer join content c on c.elementid = el.id
where e.authorid=DELETED_USER_ID
and el.revisionid is null

And then created insert scripts for the entries table for each one I needed to restore. The elements and other data was still in the database so I just had to re-create the entries records.
insert into entries (id, sectionid, parentid, typeid, authorid, postDate, deletedWithEntryType, dateCreated, dateUpdated, uid)
VALUES(ORIGINAL_ENTRY_ID, ORIGINAL_SECTION_ID, ORIGINAL_PARENT_ID, ORIGINAL_TYPE_ID, NEW_AUTHOR_USER_ID, ORIGINAL_POST_DATE, 0, ORIGINAL_DATE_CREATED, ORIGINAL_DATE_UDPATE, ORIGINAL_UID)