If you create a view with only a field that is Global: custom text, the query breaks as it gives
SELECT FROM
with nothing selected.

However it does not give the error that you must include a field to save the view.

Comments

merlinofchaos’s picture

Priority: Normal » Minor

I'm going to call this minor. It is a bug, but it's a special case that isn't really valid, and we currently have no easy way to validate for the case. We can hardcode a fix, but that won't help us if it turns out there's some other field like global: custom text (such as PHP field) that also does not add fields to the query.

We can have the view simply fail to build and come up as empty if there are no fields at all in the query, I suppose. That might be a better validation solution.