Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedI'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.