Deleting a site

Hi,

I created a site just as a test besides our main site, but I can’t delete it in the administration page, it returns an error page… Has anybody encountered the same issue ?

Thank you for your help

A.

Please copy and paste the error message which you get when you try to delete the site here as a comment.

Hello @mebrett, it just says " Omeka S Encountered an Error " whenever I try to delete the website from the graphic backend of our omeka S. Is there another way to delete a site ?

You can turn on error logging and robust error messages to get more information about what’s happening.

Did you find a solution for this? I’m also experiencing this error…

Are you getting the generic error? If you turn on robust error messages, what does it say?

Just turned on those options, and this is the detailed error:

Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException
An exception occurred while executing ‘DELETE FROM site WHERE id = ?’ with params [6]: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (ocomedu_os1.site_page, CONSTRAINT FK_2F900BD9F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id))

Details:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (ocomedu_os1.site_page, CONSTRAINT FK_2F900BD9F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)) in /home/ocomedu/odc.ocom.edu/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105 Stack trace:

Let me know if you’d like to see the entire log.

I’m not really sure why that’s happening (and can’t reproduce it) but you should be able to work around the issue by just going into the site’s Pages admin screen and deleting all the pages, then deleting the site.