I talked to merlin on IRC about this issue.

Basically I have a 'page' view which contains 2 arguments, a 'taxonomy term with depth 1', and 'term id'. If the 2nd argument (term id) is not present, then I have configured the view to display the empty text. I also have an attachment associated with the page display. It inherits its arguments from the main display. If the 2nd argument isn't set / valid, then it will display a summary listing. However I've configured the 2nd argument to never validate (with php code returning false), so a summary listing should always be displayed.

Everything works fine until no 2nd argument is provided to the main page display. The empty text is displayed correctly, but the attachment summary list isn't rendered at all. This is because once views determines there's no data to display, it returns from the init_query() function before attaching the displays.

The attached patch fixes this. I'm not sure if this is the correct solution, but it does fix the problem for me.

An export of my view is at http://drupalbin.com/10803 in case you need it.

CommentFileSizeAuthor
views_argument_empty_text_attachment.patch416 bytesstella
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

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