Error while updating a page

Permalink
Hi

We happily used Concrete 5.5.2.1 for a small site, for several years. Suddenly, when we changed a page, we got this error message:

An unexpected error occurred. mysql error: [1062: Duplicate entry '1-47' for key 'PRIMARY'] in EXECUTE("insert into CollectionVersionBlockStyles (cID, cvID, bID, arHandle, csrID) values ('47', '33', '1', 'Header Nav', 0)")

This error is repeated whenever we try to change data in a page. After the error, a new version of the page is created, but it is empty. In addition, it cannot be approved and it seems not possible to delete the version (In 5.4, it was possible to delete unwanted versions).

Unfornutately, this seems to be a "rare" problem, we just found one reference to a similar error report, which did not help solving the problem. We upgraded to 5.6.0, then to the current version, but the error still pops up :-(

Is there a way to fix this?

bstocker
 
brechtryckaert replied on at Permalink Reply
brechtryckaert
Do you have direct access to the MySQL database via SSH ? If so, I would advize to run following command on your database:

mysqlcheck -r DATABASENAME -u USERNAME -p

(of course you'll need to type in the correct database name and username for your database)

Then press ENTER.

You will be requested to enter your password for this database. Then press ENTER again.

MySQL will now check and repair (if necessary) your database. This way you can exclude that this is being caused by MySQL corruption.