Data Exception: Help required

Permalink
Hi Good morning from the UK.

I am currently running C5 version 5.7.5.8

Last night whilst adding a page to one of my websites and whilst adding the Attributes to the page I was presented with an Exception when trying to save it:

An exception occurred while executing 'insert into atSelectOptionsSelected (avID, atSelectOptionID) values (?, ?)' with params ["1878", "44"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1878-44' for key 'PRIMARY'


I am at a loss where to look for this or what to do exactly when I find it. A search of the forums and Google brought zero results.

I have opened up MyPHPadmin and run a check on the database which all comes back OK. I cannot see a duplicate error?

I have logged back into my website and tried again to edit the Attributes but to the same error throws up when I try to Save it.

If any maestro knows what to do could they please give me the heads up.

Fanflame
 
Fanflame replied on at Permalink Reply 1 Attachment
Fanflame
Further to this post I have found the avID entry in the MyPHPadmin and simply post here as an image as there is no duplicate entry.

As a matter of interest some time back I created a events page which I use as a template: I open that events page and then go into versions and add a new page off the last version from where I create the 'new' event. I have been doing this for over a year now and this is the first time it has thrown an error.

If anyone knows what to do please can they advise me - do I simply delete the line (44) and try again?

Any help would be gratefully appreciated.
Fanflame replied on at Permalink Reply
Fanflame
Um, I know its a Sunday but it appears no -one has looked at this ?

I am in need of advice as I need to get two events posted on my site and cannot as it will not save changes to the SEO...

Thank you for any help or advice offered.

Fanflame
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
I think the error message is telling you that those parameters already exist so it is unable to duplicate them.
Fanflame replied on at Permalink Reply 1 Attachment
Fanflame
Hi Weyboat,
Thanks for coming back to me on this. I cannot see where this is being duplicated and can only see one entry in the MyPHP database. See attached image...

DO I simply delete the one line I can see - will it re-add it again when I log into the new page?

I have already added all the text, links and content to the new event and it just won't save the SEO??

I am at a loss what to do?

Again thanks for your advice.

Fanflame
Fanflame replied on at Permalink Reply
Fanflame
HI A day on and I am in a Pickle - I cannot add any SEO as I get the Integrrity Constrain Violation when I try to save it..

It appears no one knows what to do with this exception.

As I have said in previous posts I can see one line in the PHP Admin database and if I click on it to edit it - it appears empty.

Being a complete novice when it comes to PHP databases I do not know what to do - I cannot see a duplication of lines or numbers as the exception text suggests. However I can also see that at the end it states that the duplicate entry is for the PRIMARY key - how do I find out what the primary key is?

I really wish I knew coding or PHP but my brian just can't take it in!

An exception occurred while executing 'insert into atSelectOptionsSelected (avID, atSelectOptionID) values (?, ?)' with params ["1878", "44"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1878-44' for key 'PRIMARY'
Gondwana replied on at Permalink Reply
Gondwana
There isn't a duplication in your current database. The error message is telling you that there WOULD be one if the query were executed. Because duplicates aren't allowed, the database prevents execution. That's why you won't find a duplicate.

This info probably won't help you fix the problem, but it might save you from searching for something that isn't there. :)
Fanflame replied on at Permalink Reply
Fanflame
Hi Gondwana,

Thank you for the heads up - that is why I have spent hours fruitlessly searching for a duplicate!

Have you any idea how I might proceed ?

Do I delete the newly created event and try again?

I have also tried to add another new article to the website and even though it takes all my text and images in creating the new article I cannot add any SEO as it throws up a similar exception when I try to save - but I can save the article! So I now have two published articles which have no SEO.

Advice would be gratefully received.

Fanflame
Gondwana replied on at Permalink Reply
Gondwana
Surgery on a corrupt database requires much more inside knowledge than I've got. I'd restore the site from the last known good backup (files and database).
Fanflame replied on at Permalink Reply
Fanflame
Hi Gondwana,

I will hold off doing a restore just yet to see if anyone else knows a simpler answer. I did check the database for corruption and it says that it is OK.

I can copy the two new articles offline and then do a restore if required.

Thanks

Fanflame