Jump to content

Database got corrupted? Strange errors, no indexes and primary key on pages table


jtborger
 Share

Recommended Posts

Hi,

I have a strange issue here. Im running ProcessWire for years now without a problem but since yesterday I have a problem. I have a site which malfunctions, I cannot create any page. It gives me this:

(exceptions.log):

2023-11-10 15:34:55    admin   https://acme.test/processwire/page/add/  Unable to save to 'field_title' for page that doesn't exist in pages table (in /wire/core/Fieldtype.php line 1306)

Same for users (which are pages too of course).

Now, the pages table does not have any primary key, as I found out. Nor any other indexes. Strange, isn't it? And as I now see it, all other tables 'under' pages (alphabetically) miss their indexes too, so clearly something went corrupted somewhere. :( 

How could this have happened?  Im sure not to have messed with the database myself. But more important: how to fix? Where is the original db schema so I can recreate the indexes, in the hope all will be fine?
 

Link to comment
Share on other sites

OK I found the setup schema now, but somehow if I manually create the PK on the tables, the auto increment value is missing...

Ok on lots (if not all) tables, AUTO_INCREMENT is missing from the ID fields... I figure this is a database (management) issue and not a ProcessWire issue... although it started yesterday when I started working (after a long while) on the site and refreshing modules etc.... so something must went wrong there...

Edited by jtborger
extra info
Link to comment
Share on other sites

Good one...

I did try to find a proper backup but it seemed to happen long time ago. Site was sleeping for a while so I didnt notice...

I manually created all indexes and settings and now it works like it should...

Tnx anyhow.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...