Diagnosing Empty Views in Drupal 10: A Step‑by‑Step Troubleshooting Guide
Empty Drupal 10 Views? Follow this step‑by‑step diagnostic guide to check view status, filters, relationships, permissions, and cache – then fix the issue and verify the result.
20 Sept 2026, 14:56 UTC

Problem Statement
When a Drupal 10 View renders but shows no results, the underlying configuration is often correct while a hidden setting or environment issue prevents data from being displayed. This guide walks you through a logical sequence of checks, each tied to a specific cause, so you can isolate and resolve the issue quickly.
Quick Takeaway
Empty Views usually stem from one of five common causes: the view is disabled, filter criteria exclude all items, a broken relationship hides rows, permissions block data, or stale cache/rebuild issues corrupt the SQL. Follow the ordered checks below to pinpoint the root cause.
Recognizable Condition
• The view page loads (no 404 or permission error).
• The page contains the view block or page placeholder, but no rows are displayed.
• No error messages appear in the status or watchdog logs.
Common Causes Table
| Cause | Typical Symptom | Quick Check |
|---|---|---|
| View disabled or set to "Admin only" | Page loads but no rows, admin sees them | Check Show setting in view UI |
| Incorrect or missing filter criteria | All nodes filtered out | Remove filters temporarily |
| Broken or missing relationships | Fields resolve to NULL, rows hidden | Validate relationship target |
| Permission or role restrictions | Only privileged users see data | Test with minimal role |
| Cache or rebuild issues | View shows stale or empty data after changes | Clear cache and rebuild view |
Ordered Checks & Fixes
Verify View Status & Visibility
In the Views UI, open the view and confirm the
Showtab is set toPublic(orPublic, unfilteredfor pages). If it is set toAdmin onlyorHidden, change it toPublicand save.Check the
Statusfield on theAdvancedtab. If the view is disabled, enable it.Inspect Filters & Exclusion
Remove all filter criteria temporarily (click
Remove allunder theFilter criteriasection). Reload the view page. If rows appear, the issue lies in one or more filters.Re‑add filters one at a time, testing after each addition. Pay special attention to filters like
Status = PublishedorContent type. If all nodes are unpublished, the filter will exclude everything.Check Relationships & Field Resolutions
Open the
Relationshipssection. Each relationship should point to an existing table or field. If a relationship references a missing field (e.g., a custom module removed a field), the view will silently drop rows.Use the
Showoption in the view UI to display the generated SQL. Verify that the JOIN clauses reference valid tables.Review Permissions & Roles
Navigate to
People > Permissionsand confirm that the role you are logged in with hasView published content(or the relevant content type permission).To isolate the problem, log in as a user with the minimal permissions required and test the view. If data appears, adjust the permissions accordingly.
Inspect Cache & Rebuild
Drupal caches the view’s SQL in the
cache_viewsbin. If the bin is stale, the view may return no rows.Clear all caches via the UI:
Configuration > Development > Performance > Clear all caches. Or run:# Run in the root of the Drupal site # Requires sudo or site user privileges $ drush crRebuild the view’s SQL directly with:
# Rebuild view named "article_list" $ drush ev "\Drupal\views\Views::getView('article_list')->build();"After clearing caches and rebuilding, reload the view page.
Practical Example
Suppose you have a view called article_list that should display all published Articles. The view currently shows no rows.
- Open
admin/structure/viewsand editarticle_list. - Ensure the
Showtab listsContent (Article)and theDisplayis set toPage. - Under
Filter criteria, confirm there is a filter forStatus = Publishedand that there are no contradictory filters. - Check
Relationships– if you have a relationship toContent: Author, verify that theusertable exists and the fielduidis present. - In the
Advancedtab, clickShowto view the SQL. It should resemble:
SELECT * FROM {node} n
WHERE n.type = 'article' AND n.status = 1
ORDER BY n.created DESC
If the SQL contains unexpected JOINs or missing conditions, adjust the relationships or filters accordingly.
Escalation Criteria
- All checks above yield no change and the view still returns empty.
- The view’s SQL is correct, but the database contains no matching rows (verify via direct SQL).
- Custom modules or contributed modules that alter view behavior (e.g., hook_views_query_alter) are suspected.
At this point, consider disabling contributed modules one by one or inspecting custom code for query alterations. If the problem persists, file a bug with the module maintainer or seek help on the Drupal community forums.
Limitations & Best Practices
- Never disable core caching layers (e.g.,
cache_page,cache_render) unless you understand the performance impact. - Do not edit view configuration files directly; use the UI or configuration export/import to keep environments in sync.
- Always test changes on a staging environment before pushing to production.
How to Verify the Fix
- Reload the view page and confirm that rows are now displayed.
- Use the
Showdebug option to ensure the generated SQL matches expectations. - Check the
Recent log messagesfor any warnings about missing relationships or permissions.
By following this diagnostic flow, you can systematically identify why a Drupal 10 View is empty and apply the appropriate fix without unnecessary trial and error.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.