Page type broken after switching between Git branches

Permalink
I've been developing a Concrete 5.7.5.8 site, and I've just committed everything in, switched to another branch then come back, and I'm getting an issue when I try to create a new page with a certain type.

The current pages I have of that type display correctly, however when I go to create a new page with that certain type I get the following error message:

An exception occurred while executing 'select cID from Pages where cParentID = and cIsTemplate = 0 order by cDisplayOrder asc': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and cIsTemplate = 0 order by cDisplayOrder asc' at line 1


I have the following in my Gitignore file:
files/cache/*
files/tmp/*

 
wilkinsocks replied on at Permalink Best Answer Reply
Realised that some logic in my controller is breaking it. It's looking for a parent which it doesn't have yet.