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.
In the 'Add Filter Criteria' and 'Add Sort Criteria' pop-up windows, only a small portion of the available fields are displayed (13 and 8, respectively, out of roughly 250). Some details:
- They are not the first ones alphabetically but seem rather random alphabetically.
- They seem to be rather fundamental drupal fields.
- The 8 displaying for 'Add Sort Criteria' are a subset of the 13 for 'Add Filter Criteria'.
- This does not occur on my local dev site, but is occuring on the live site.
- Have cleared cache many times.
- Don't see any errors in Drupal logs or Chrome/Safari console
Here is the list of the fields showing:
'Add Filter Criteria' | 'Add Sort Criteria' |
---|---|
Content: Author uid | |
Content: Has taxonomy terms (with depth) | |
Content: Nid | Content: Nid |
Content: Post date | Content: Post date |
Content: Promoted to front page | Content: Promoted to front page |
Content: Published | Content: Published |
Content: Published or admin | |
Content: Sticky | Content: Sticky |
Content: Title | Content: Title |
Content: Type | Content: Type |
Content: Updated date | Content: Updated date |
Content: User has a revision | |
Date: Date (node) |
Does anybody have an idea of what could be causing this?
Comments
Comment #1
Mark_L6n CreditAttribution: Mark_L6n commentedAfter simply trying lots of things, I found that checking 'Disable views data caching' in admin/structure/views/settings/advanced solved the problem.
Clicking 'Clear Views cache' (on the same page) did not fix the problem. (Tried clearing other caches in conjunction with this, but still no success there.)
I would hope there is a better solution to this problem, but at least checking this box temporarily allowed me to edit Views.
Comment #2
JKingsnorth CreditAttribution: JKingsnorth commentedI have this problem too.
The suggestion in #1 fixed it for me, but I don't think is counts as the issue being 'fixed' so I'm reopening it.
Comment #3
sjhuskey CreditAttribution: sjhuskey commentedClicking "Clear Views Cache" worked for me.
Comment #4
Panther256 CreditAttribution: Panther256 commentedI have just encountered the same issue. In my case I am accessing User and Profile 2 information in my View and a Search: Fulltext search (exposed) filter.
I tried #1 but it did not allow me to select the field I wish to sort by.
Any ideas?
Comment #5
gisleI am also encountering this.
I am trying get the view implemented by Enabled Modules (
admin/reports/enabled-modules
) sorted bySystem: Package
. This field appears in the fields list, but is not available as a sort criteria. I tried the workaround suggested in #1 but that did not change anything.Comment #6
Sameer Jambhulkar CreditAttribution: Sameer Jambhulkar commentedThe solution given by Mark_L6n is probably the best solution for this issue. I have also experienced the same issue many times and "Disable views data caching" has always worked for me.
Comment #7
parasolx CreditAttribution: parasolx as a volunteer and commentedI'm most of the time disable Views cache when working with complex project.
But if your environment in very condition, I think it should be not a problem.
Comment #8
scotty014 CreditAttribution: scotty014 as a volunteer commentedMake sure the field you are looking for is indexed. Also, the way you index the field matters. I came across this when trying to sort by a field of type Text. I had indexed the field but it was being indexed as type 'Fulltext' and when I changed it to be indexed as type 'String' then it showed up to the list for possible filter criteria.
Hope this helps someone.
Comment #9
baldalo CreditAttribution: baldalo commentedSubscribing.
Same issue here, the suggestion #8 by scotty014 works bu it has a downside. If you index your field as String instead of Fulltext you will find it within the list of possible sort criteria but it will be excluded from the "Fulltext Search" if you expose it.
Comment #10
cobberas63 CreditAttribution: cobberas63 commentedI only have 4 fields, and none of them start with "Content" (which is what I'm looking for) despite following solution given by @Mark_L6n
Any ideas on how to make Content type fields appear? (sorry, just new to this and have been searching for a solution for 2 days)
Thanks!
Comment #11
cobberas63 CreditAttribution: cobberas63 commentedFound the solution to my issue here: https://www.drupal.org/node/1421752