7 users online. Create an account or sign in to join them.Users
fatal SQL error: querying
This is an open discussion with 6 replies, filed under Troubleshooting.
Search
Hmm not sure why that's firing in the backend as pages are for the frontend. What extensions are enabled, specifically any fields in this section. Is it just one section?
Hi Nick and thanks for the reply. I was just trying to access the Admin Publish view of one particular section (site.dev/symphony/publish/my-section/). This happens only with this (very simple) section.
The field that might be causing this is a 'Page Selectbox' pagesfield (v. 1.4 from https://github.com/klaftertief/pagesfield)
Also: the Section's entries render fine on the frontend. Everything except viewing the Publish list in the Admin seems to work…
Yeah, I would lean towards there being something a bit off in the field. I did a quick project search for a sym_pages query and can't find anything that resembles that particular query.
did a quick project search for a sym_pages query and can't find anything that resembles that particular query
The only one I can find is in Blueprints > Pages so we can rule that out.
It looks like the Pages field is the culprit, this line. If $data has no value then the query will fail. A quick fix might be to add a check in this function:
if(!isset($data['page_id'])) return;
(Not 100% sure but you might need to return a string return ''; or an XMLElement, return new XMLElement('span', 'Nothing to see here...'); instead...)
Hmm, maybe klaftertief (pinggg) can shed some light on this. There should be entries in this Section (I presume the $data refers to entries?).
Update: @nickdunn et al. Your quick-fix (adding if(!isset($data['page_id'])) return;) did work and showed my Publish overview.
The value for this pagesfield field was shown in the entry-listing and I noticed one entry did not have a value for the pagefield field (None).
Removing the pagesfield value from the display by unchecking Display field’s value in entries table in the Section settings solved the issue.
This seems a bug: the pagesfield field was not required so could be 'None' but apparently the prepareTableValue function always assumes a Page…
I'll post a bugreport for klaftertief. In the meantime I just uncheck the Display field’s value in entries table option.
Create an account or sign in to comment.
Trying to access a
publishview for one of my Sections I run into a Fatal SQL Error.The query involved is:
.. and the issue seems a missing
page IDvalue:… WHERE p.'id' = [NOTHING-HERE] ORDER BY …Any ideas what could cause this? And, more importantly, how to fix this? I'm happy to dive into the db through PHPMyadmin - I've been ex-/importing the db between test-environments.