Symptom
A customer has a list with custom New, Edit and Display .aspx forms. The customer later changes the name of a column or removes a column. This changes in the list schema, then you get an error that there is something wrong with the query the next time you try to open the forms to edit them.
Cause
I believe the schema change invalidates the embedded query in the .aspx pages.
Solution
Create new temporary New, Edit and Display forms. Scroll to the <DataSources> element and copy it. Paste it in the corresponding section in the original New, Edit and Display Forms. Save the web pages. The new data query should work.
<DataSources>
<SharePoint:SPDataSourcerunat="server"DataSourceMode="ListItem"SelectCommand="<View><Query><Where><Eq><FieldRef Name="ContentType"/><Value Type="Text">Issue</Value></Eq></Where></Query></View>"UseInternalName="True"UseServerDataFormat="True"><SelectParameters><WebPartPages:DataFormParameterParameterKey="ListItemId"PropertyName="ParameterValues"DefaultValue="0"Name="ListItemId"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="weburl"PropertyName="ParameterValues"DefaultValue="http://TheSite"Name="weburl"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="ListID"PropertyName="ParameterValues"DefaultValue="{18873E6C-FF3E-4534-8055-23FAE05DEAAC}"Name="ListID"></WebPartPages:DataFormParameter>
</SelectParameters><UpdateParameters><WebPartPages:DataFormParameterParameterKey="ListItemId"PropertyName="ParameterValues"DefaultValue="0"Name="ListItemId"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="weburl"PropertyName="ParameterValues"DefaultValue="http://TheSite"Name="weburl"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="ListID"PropertyName="ParameterValues"DefaultValue="{18873E6C-FF3E-4534-8055-23FAE05DEAAC}"Name="ListID"></WebPartPages:DataFormParameter>
</UpdateParameters><InsertParameters><WebPartPages:DataFormParameterParameterKey="ListItemId"PropertyName="ParameterValues"DefaultValue="0"Name="ListItemId"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="weburl"PropertyName="ParameterValues"DefaultValue="http://TheSite"Name="weburl"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="ListID"PropertyName="ParameterValues"DefaultValue="{18873E6C-FF3E-4534-8055-23FAE05DEAAC}"Name="ListID"></WebPartPages:DataFormParameter>
</InsertParameters><DeleteParameters><WebPartPages:DataFormParameterParameterKey="ListItemId"PropertyName="ParameterValues"DefaultValue="0"Name="ListItemId"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="weburl"PropertyName="ParameterValues"DefaultValue="http://TheSite"Name="weburl"></WebPartPages:DataFormParameter><WebPartPages:DataFormParameterParameterKey="ListID"PropertyName="ParameterValues"DefaultValue="{18873E6C-FF3E-4534-8055-23FAE05DEAAC}"Name="ListID"></WebPartPages:DataFormParameter>
</DeleteParameters>
</SharePoint:SPDataSource>
</DataSources>