Unable to edit or delete page
Asked by Nick Van de Ven:

Created a page, can't edit or delete it afterwards.

As far as I know, I'm just using the standard Confluence 6.2.3 installation without any add-ons.

When I edit the page, I get the error message:

### *Cause* {#toc-hId-1564584127}

*org.hibernate.ObjectNotFoundException: No row with the given identifier exists: \[com.atlassian.confluence.content.ContentProperty#159213\]*   
*at org.hibernate.boot.internal.StandardEntityNotFoundDelegate.handleEntityNotFound(StandardEntityNotFoundDelegate.java:28)*

#### *Stack Trace:\[hide\]* {#toc-hId--1184086339}

```
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.atlassian.confluence.content.ContentProperty#159213]
```

When I try to delete the page I get: *We couldn't delete your pages. Try again.*

Tried with both the user account that created the page as with the Administrator.


Answers:
author: Yves Martin
body: I already faced that issue twice when writing complex page with macro at creation without any "first publish".

As a work-around, I used "Move" action to remove its parent page and make it orphan. Then in Space "Content Tools", in "Orphaned Pages", the trash icon is able to "delete" that corrupted page.

So I now have a "stupid" pratice: add title and only raw text in page, publish it and then edit and add macro or advanced content in it...

comments: author: Mark Hitt
body: This worked for me!


author: Anton Kronseder _smartics_
body: This happens to me at least once a month :-(

My fix is inserting the missing properties with "default" values e.g:

insert into CONTENTPROPERTIES VALUES ('missing propertyId', 'default' ,'default', NULL, NULL, 'pageId');  

The pageId is always part of the URL and the propertyId the last ID in the error message.  

In all cases, I had to insert two consecutive properties. Then I saved the content to another page and deleted the original page, because I'm not sure what could go wrong after my changes :-)

Cheers, Anton

comments: author: Banco Fortaleza
body: Gracias, funcion?.


author: Alexander Schaaf
body: Thanks alot, still works on confluence server 8.5.5


author: Daniel Eads {unmonitored account}
body: Oh no, looks like there might be some corruption in your database. Try fetching the properties in your database for that object:

```
SELECT * FROM contentproperties WHERE contentid = '159213';
```

If something looks amiss in the results, try modifying/deleting that particular row. Otherwise you might need to escalate to [fully deleting that page via SQL](https://confluence.atlassian.com/confkb/how-to-remove-a-page-manually-in-the-database-using-sql-commands-385321460.html).

If you have a DBA, it's also worth having them take a look at your database to see if everything is healthy. Good luck!

comments: author: akochar
body: [@Daniel Eads {unmonitored account}](/t5/user/viewprofilepage/user-id/853453) we had a similar issue in our instance of confluence server. We were not able to edit the page for a with this issue showing up but it got fixed on its own. Should we be worried?


author: Daniel Eads {unmonitored account}
body: Hmm - probably worth checking the following:

1. Was your Confluence Server application restarted since this initially occurred? You can check the Uptime on the **System Information** page in Administration.
2. Have you gone through any upgrades since this started (upgrades require a restart, so checking uptime in #1 would give you a quick yes/no without checking your upgrade history)
3. Has a vacuum (for PostgreSQL) or some other database cleanup function run? If you engage a DBA to look into this, also have them check the general health of your **contentproperties** table

If this were my instance, I'd probably write it off unless it happened more than once or there was definitely no chance of a change occurring between "then" and "now" (although it's really hard to rule that out - running a search index for example doesn't post a message in the logs).


author: akochar
body: [@Daniel Eads {unmonitored account}](/t5/user/viewprofilepage/user-id/853453) Thanks I will look into it.


author: isracodev
body: Hey everyone!

this just happened to me and I followed this [Removing orphaned draft](https://confluence.atlassian.com/confkb/removing-orphaned-draft-316113059.html) and [How to Remove a Page Manually in the Database Using SQL Commands](https://confluence.atlassian.com/confkb/how-to-remove-a-page-manually-in-the-database-using-sql-commands-385321460.html?_ga=2.6633847.415037171.1562900220-1711391327.1553490502.)

Then start confluence, notice that your draft is empty. Now you can delete that page.