Hello,

Here's the scenario:

I have a view which has a page display and two attachment. The page display display either nothing or some text. The attachment displays are controlled by a an argument, a PHP code defines which attachment to display.

Inside each attachment I have exposed different type of filters. The attachment does not inherit exposed filters.

The problem is that none of the exposed filters are displayed when I preview or execute the actual view. And also when I set the exposed form in block to yes, the block is not created.

This is not a duplicate of #753226: Attachment causes exposed filters to break because the exposed filters does not appear in the source code too.

Is it a bug? Is it possible to display exposed filters in the attachment display?

Comments

ecos36’s picture

I have exactly the same question

akadimi’s picture

Anyone to answer this question?

dawehner’s picture

Do you have overriden the filters of the attachment display? If no i would try it.

akadimi’s picture

StatusFileSize
new3.9 KB

Filters are already overriden. I tried to recreate the view from the scratch but the problem remains even when I don't use arguments.

The attachment works but filters are not being exposed. Here's the steps to reproduce the problem:

1- create a node type view
2- add a page display
3- add an attachment to the page display
4- add exposed filters to the attachment

I tried with 6.x-3.0-alpha3 also but same issue

Below is an export of a view test that doesn't work for me.

akadimi’s picture

Any thoughts?

akadimi’s picture

Up

akadimi’s picture

Any clue on this please?

rschwab’s picture

Title: Is it possible to expose filters on attachment display » Exposed filters do not appear on attachment display
Version: 6.x-2.11 » 6.x-2.12
Component: Miscellaneous » exposed filters
Category: support » bug
StatusFileSize
new5.81 KB

I was able to reproduce using the steps in #4. I've attached the view from my sandbox because its a very simple example of this bug in action.

eL’s picture

same problem

killua99’s picture

Same problem, subscriben.

thommyboy’s picture

same here- really need exposed filters in attachments...

aaron’s picture

Category: bug » support
Status: Active » Fixed

@rschwab in #8, it looks like you need to check 'inherit exposed filters' for the attachment view (in the bottom-left section when you edit it). I'm not sure re. #4, as that export doesn't contain the necessary information; OTOH, it looks like that file was modified before posting.

valarauco’s picture

Same problem!

flyingL123’s picture

same problem...here's what I'm seeing:

I created a page view that contains an exposed filter. I created an attachment display to that view, for which I created a different exposed filter.

1. If I set the attachment to NOT inherit exposed filter values from the parent display, then the exposed filter for the attachment appears, but it does not function (if the user enters a value and clicks "submit", nothing happens).

2. If I set the attachment TO inherit exposed filter values from the parent display, the exposed filter for the attachment does not appear anywhere on the page.

In both cases the exposed filter for the parent view appears and functions correctly.

Does anyone have an idea why this would be happening?

d.novikov’s picture

Subscribing.

illepic’s picture

subscribing

Status: Fixed » Closed (fixed)

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

dalinian’s picture

This should not be closed. There has been nothing fixed here. The problem persists for me, but I don't see a solution posted on this issue. Does no one have an idea about this behavior?

rschwab’s picture

Status: Closed (fixed) » Active

Re-opening per all the reports of this problem still being out there.

fourmi4x’s picture

Suscribing. I just can't see exposed filters whether I use "inherit exposed filters" or not!

I think the module Exposed Filter Data might help those who really badly need this...

This thread is quite interesting too.

kappaluppa’s picture

Subscribing... having the same problem.

Create a view
Add two attachments
Set exposed filters on MAIN page
set Inherit exposed filters to yes -
filters show, but results of search yields false results
set inherit exposed filters to no -
no filters show at all
Set exposed filters on ONE attachment
set Inherit exposed filters to yes -
filters show, but results of search yields false results
set inherit exposed filters to no -
no filters show at all
Set exposed filters on BOTH attachment
set Inherit exposed filters to yes -
filters show, but results of search yields false results
set inherit exposed filters to no -
no filters show at all
Set exposed filters on ONE attachment AND Main Page
set Inherit exposed filters to yes -
filters show, but results of search yields false results
set inherit exposed filters to no -
no filters show at all
change label on exposed filter on ATTACHMENT
only exposed filter with label as set on MAIN page is displayed
remove exposed filter from main page, no exposed filter is displayed

I've tried this with attachments before, after and both
I've also rearranged the order of the attachments

When I submit on the filter, the Main page goes away, leaving just the two attachments.
The Exposed filter & label do not change to the exposed filter that is set on the attachment
I submit again, nothing happen

I've come at this from every angle I can imagine. So far, views attachment & exposed filters are not working for me. Any help on this would be greatly appreciated!

drupaledmonk’s picture

I cannot provide any new information from what is there in this thread, but I would like to see some progress on this issue. Can we not do some work around using tpl files by hiding filter in one of the templates and outputting in the other.

liminu’s picture

Maybe it works, try to expose the filter and set also in the views attachments type and set to yes the option.

alanom’s picture

Same problem with latest 7.x.3 dev, similar behaviour to @kappaluppa.

Yotamb’s picture

Any news on this bug?
I think it should be at least major.. This is an issue with a views core feature (exposed filters) and i'm surprised that 1 year after initial report, it's still untouched.
Can't any dev even give a status report or something?

Yotam Bar-On.

hiddenfellon’s picture

Version: 6.x-2.12 » 7.x-3.x-dev
Category: support » bug
Priority: Normal » Critical
Status: Active » Needs work

Can someone please take a look at this issue and come up with a solution?

dawehner’s picture

Category: bug » support
Priority: Critical » Normal
Status: Needs work » Active

Calm down, you don't pay for support.

Reno Greenleaf’s picture

Can we give up using attachments at all? By replacing them with blocks inside header or footer as "Global: View area". Exposed filters work here.

myevit’s picture

Same

jamesrutherford’s picture

For anyone else running into this issue, I was able to get the behavior working with the following configuration in 7.x-3.5.

Page display with exposed filter. Attachment display with inherit exposed filter checked. In the filters for the attachment add the exact same exposed filter thats on the page view. It wont show, but the attachment will inherit the filter choice as expected.

brephraim’s picture

Didn't work for me.

leoklein’s picture

#30 -- Worked for me. Thanks.

skyredwang’s picture

Category: support » bug

This is not a support request. It's a bug that attachment view is not able to have its own independent exposed filter (you can configure, but it won't show), no matter how you use attachment view with other views types.

Ways to reproduce: simply create an attachment view, and add an exposed filter, in the preview, there is no exposed filter.

sassafrass’s picture

Subscribing

umeshpatil’s picture

StatusFileSize
new98.49 KB

To use Master page filter with attachments you just have to enable some settings which are already there in views. I have attached screenshot with this. But to use master's filter you must attach it to master page first.

hovel’s picture

Same remark as #33:
view is not able to have its own independent exposed filter.

merlinofchaos’s picture

If you want independent exposed filters, I recommend adding the view via the area handlers (i.e, in the header) rather than as an attachment.

cck’s picture

I use a page display to show a summary table. A few attachment displays to show more details in two levels. That is, clicking a link in the page display, the related attachment display will appear, and clicking a link in the attachment display, the lowest level of attachment display will appear with the most details. Contextual filters are used to hide or show the attachments depending on the links being clicked.

Ran into the same issue that I need independent exposed filters at the lowest attachment displays. Looks like the attachment cannot have its own filter from the code below (D7.19)

/**
* Attachment displays only use exposed widgets if
* they are set to inherit the exposed filter settings
* of their parent display.
*/
function uses_exposed() {
if (!empty($this->options['inherit_exposed_filters']) && parent::uses_exposed()) {
return TRUE;
}
return FALSE;
}

/**
* If an attachment is set to inherit the exposed filter
* settings from its parent display, then don't render and
* display a second set of exposed filter widgets.
*/
function displays_exposed() {
return $this->options['inherit_exposed_filters'] ? FALSE : TRUE;
}

I tried 2 workarounds to get the filters exposed:

1. Create a new page view with the required exposed filter and add it in the footer/header using view area of the original page view. Adding an attachment display in the view area in the original view does not work.
2. Returning TRUE in the display_exposed()

Contextual filter does not control the exposed filter, so when attachments hide and show according to the links clicked, the exposed filters do not hide. So my problem is not completely solved, jQuery is needed to hide/show these filters.

likewhoa’s picture

Issue summary: View changes

bump, this is an old bug. @merlinofchaos, would work if global view area had an option to inherit 'Filter criteria' along with 'Contextual filters'. Currently two things happen depending on what kind of view display you are adding to the header,

  1. When attaching a view from a block display, no filter criteria is shown
  2. When attaching on a page display, on the page display 'Filter criteria' is shown

My use case is that I am using "better_exposed_filters" on the main page display with a few filters exposed and with 'auto-submit' form on selection turned on since these are taxonomy terms shown as check boxes so the page should reload on selection. Initially there was a 'search terms' exposed filter but that doesn't play well with 'auto-submit' form feature, so I decided to attach a secondary display with just the search terms filter and auto-submit turned off which is the default anyways. Using views attach doesn't expose filter criteria and with global views area it shows it but only for the secondary display which is being shown on the primary one.

ron collins’s picture

Old news but Merlin's suggestion works if you build the inserted view as a page, but not as a block.

ron collins’s picture

spgd01’s picture

Status: Active » Closed (works as designed)

**Here is the solution I found**
Attachments work as designed in my opinion and how I want it to work. If you want the exposed filters to be seen then what you want is a block embedded in the header or footer.

If you want the exposed filter in an embedded view to be available and INDEPENDENT from the view then you need to:

  1. Create a page with exposed filters. Create
  2. Create a block with exposed filters.
  3. In the block "Other" section turn on AJAX
  4. On the page add the block to the header or footer

For INHERITED Exposed filters on page with a block inserted in header or footer.

  1. Create a page and a block with the exact same exposed filters
  2. You can also use Contextual Filters for both
  3. Select “Use AJAX” “yes” on both
  4. On Page add the block to a header or footer using “global Views” and click “inherit Contextual Filters”
  5. On the page under “exposed form” in “Exposed form in block” chose “Yes”
  6. Go to blocks and add your “exposed form block” to the region and this view on the site.
  7. Your new exposed form block will control both the page and the block in the header of the page.
  8. Use CSS to hide the extra “Exposed Filter” on the block that is in the header of the view page.

Attachments: Inherit exposed filters without exposing attachment filters to the user

  1. Create a page and an attachment with the exact same exposed filters
  2. The page can have contextual filers no need to add them to the attachment
  3. Select “Use AJAX” “yes” on both
  4. On attachment “Attachment Settings”: chose the page and the location to attach to
  5. Select inherit the exposed filters and contextual filters
  6. This will work without having to create an exposed form in block like you do with blocks but it will work with one as well
    1. On the page under “exposed form” in “Exposed form in block” chose “Yes”
    2. Go to blocks and add your “exposed form block” to the region and this view on the site.
    3. Your new exposed form block will control both the page and the attachment of the page.