The "Add content item" widget has a "Content Type" filter, which is currently pretty useless. :-)

You can set a content type which is presumably there to filter the autocomplete for "Piece of Content", however, it doesn't actually do that! It's ignored by the autocomplete, but if you set the "Content Type" to a different type than the "Peice of Content", the widget will say "There is no content to be shown."

views_autocomplete_filters has a feature for making the autocomplete take the other filters into account, which is currently disabled for the "Piece of Content" filter. Unfortunately, if we enable it, it doesn't actually work because Panels or panopoly_magic is rearranging the form so that the exposed filters are under array('exposed' => array(...)) rather than at the top-level.

Here is a follow-up issue to fix that: #2374697: views_autocomplete_filters 'dependent' feature doesn't work in Pane settings

However, even if I patch views_autocomplete_filters to find the exposed filters values, it doesn't work as expected... The Drupal autocomplete functionality will cache previously found results. So, if the "Content Type" is set to "- Any -" and I type "abc" and it finds something, then I switch it to a specific type, it'll continue to find the same results for "abc" even if those results are no longer valid for the currently selected type.

Here is an issue I just opened on views_autocomplete_filters for this issue: #2374709: Autocomplete caches previous results even when dependent filters change

So, as I see it there are two options:

  1. Fix both of the above issues so that this filter works as expected, or
  2. Simply remove the "Content Type" filter from the "Add content item" widget

Comments

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new1.66 KB

I committed #2374697: views_autocomplete_filters 'dependent' feature doesn't work in Pane settings which fixes the problems I identified with views_autocomplete_filters (by adding patches to panopoly_core.make).

Now, here is a patch which makes the "Piece of Content" autocomplete depend on the other exposed filters (ie. enabling the views_autocomplete_filtes feature we just fixed above).

  • dsnopek committed f9d6dd2 on 7.x-1.x
    Update Panopoly Widgets for #2374715 by dsnopek: Fixed "Content Type"...
dsnopek’s picture

Status: Needs review » Fixed

Committed!

dsnopek’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.