Hi -
Running v2.1.3 Build: 20101220
This is not an issue involving an upgrade from a previous version.
Here’s what happened:
Created a custom channel fieldgroup and then created 8 Relationship-type fields all populating from the same channel. Created a new channel and assigned the new channel fieldgroup to it. Then went ahead and created a new channel entry in the new channel. I was testing to see that content was correctly displaying in one of my templates, along with conditional code that would display alternative content for empty fields. Everything worked fine.
Then, I went back to the custom channel fieldgroup and added a bunch more fields (total of 62 custom fields in all), combination of relationship-type (all pulling from the same channel) and text input type. When I went back to edit the channel entry in order to populate the newly-created fields I got this error when I clicked on the channel entry title on the Content > Edit page:
<<<<<<<<<<<<<<<<<
A Database Error Occurred
Error Number: 1054
Unknown column ‘0’ in ‘order clause’
SELECT entry_id, title FROM (exp_channel_titles) WHERE `channel_id` = ‘0’ ORDER BY 0 ASC
Filename: fieldtypes/ft.rel.php
Line Number: 88
>>>>>>>>>>>>>>>>>
I then tried to publish a new entry for that channel and got the same error.
I then deleted the original entry and tried publishing a new entry again and got the same error.
I then went ahead and deleted the channel, then created a new channel, assigned the channel custom field group to that channel, and tried publishing again. Same error.
I went back to the Edit Group Assignments page for that newly created channel and selected an older field group (which had far less than 62 custom fields), and then tried publishing. Did not get the error and saw the regular publish entry form.
Just wondering if this is a known issue involving a large number of custom fields? (The other 1054 error posts I checked almost all involved upgrading from a previous version, add-on compatibility, etc.)
Thanks for your time -
Ric