Closed PFEW-ITSD closed 9 months ago
I've not got any experience with SQL server, but I would guess the issue is the id of home
- did you try removing that row in the database or assigning it a valid UUID? Failing that you could try converting to integer based IDs rather than UUIDs.
The new home page actually does have a UUID and I've deleted the page that has 51f3e305-2028-4fec-91cb-d2e079af5250
as its UUID but it still shows the same error strangely. I've had a similar error in the past with users but that was resolved by just deleting the existing file with the same UUID.
Presumably I would just need to drop the existing entries table, publish the migration for int based IDs, and change the model back to EntryModel::class?
Presumably I would just need to drop the existing entries table, publish the migration for int based IDs, and change the model back to EntryModel::class?
Correct
Unfortunately no change there - even with an empty entries table, it seems to really want to find a page with this UUID for some reason:
SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Error converting data type nvarchar to bigint.
select * from [entries] where [id] = 51f3e305-2028-4fec-91cb-d2e079af5250
Might you have some data in one of your entries (or terms) thats still linked by that id?
Might you have some data in one of your entries (or terms) thats still linked by that id?
It was exactly this! It seems that when I deleted those pages, despite not showing up in the CP anymore, they were still saved in the database under the trees for the user navigations I have. So when I signed out, I now saw this error with 2 other UUIDs for now deleted pages:
select * from [entries] where [id] in (home, 6cb90e03-172d-4f6b-b6b4-1b6d3f029660, 2b35ccc0-42d1-4c48-8850-c7e8cf36c32e)
Meanwhile, I could get to the home page once signed in by removing the deleted pages from that navigation.
Thanks for your help with all of this, Ryan!
I've imported the entry files into the database successfully, but I keep getting this same error when trying to access any page on the frontend:
I know the UUID there is from another page as that's been successfully imported. I've also deleted the
home.md
file through Statamic just in case that was causing any issues, and I've also cleared the cache too.