I created several vocabularies, each with several terms.

Then I went in to make views, type=taxonomy, made a block view, filter on Taxonomy Vocabulary, set it to exposed, set ajax = yes, exposed in block = no.

Then enabled the block conditionally on one page (/node/67).

The block renders with the pick-list and the submit button but the html source shows the submit button has dropped the /node/67 from the url. It submits to the root page on the site. That causes a bunch of teasers to show up (no idea why) but the form doesn't render.

Make a page with the same settings and it works.

Wasn't ajax=yes/exposed in block=no supposed to allow this kind of dynamic filtering in a block?

Comments

tobiasb’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 7.x-dev » 7.x-3.x-dev
Component: other » Code

you say that, views. sorry dereine one more issue :D

DeweyOxberger’s picture

Wow, I just drush'ed a clean install, built three vocabularies, built the view, and I get different results. Now I get:

Notice: Undefined index: #value in forum_form_alter() (line 589 of /home/quickstart/websites/example.dev/modules/forum/forum.module).

And an ajax error box:

An error occurred while attempting to process /views/ajax: a.tagName is undefined

The page source shows:

form action="/" method="get" id="views-exposed-form-browse-terms-block-browse-terms" accept-charset="UTF-8"

Looks like I added a few problems - I'll poke around and see what I can find.

DeweyOxberger’s picture

So it looks like two problems at least:

1) Line 589 has: if (isset($form['vid']) && $form['vid']['#value'] == $vid) {

It looks like vid is defined but it has no value key (It does have all the vid values in a sub array, just no default value).

2) Action in the form is set to "/". I can't see how it gets changed to the current page.

tobiasb’s picture

Status: Active » Closed (duplicate)
DeweyOxberger’s picture

Status: Closed (duplicate) » Needs review

This issue is not a dup - that issue was for 6.x. This issue is for 7.x.

DeweyOxberger’s picture

I had posted to the other issue (then got my karma - 1 notice, so I'm back here):

http://drupal.org/node/796530#comment-4052598

DeweyOxberger’s picture

Why was this set to project:views ? It's not clear to me where the fault is. Is it forms needed to create the #value key and be safer in how it accesses it? Or was it that some other code was required to make the #value key before it got here?

dawehner’s picture

Status: Needs review » Active

It's definitive not on needs review, because there is no patch.

skadu’s picture

I am having a similar problem using the 7.x.3.0-alpha1 branch. I have a view set up that is pulling fields from a custom content type. I set up a filter that handles whether the nodes displayed should be published or not. Using AJAX I am receiving the following error:

"An error occurred while attempting to process /views/ajax: a.tagName is undefined"

The action on the form is set correctly to the page I am on, there is no loss of the url as described by jonb_cirris.

bojanz’s picture

Status: Active » Fixed

Update to 7.x-3.x-dev.
Reopen this issue if needed (a fix for the error you're describing went in months ago, if I remember correctly)

Status: Fixed » Closed (fixed)

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

pritisolanki’s picture

Status: Closed (fixed) » Needs review

View : 7.x-3.3
Drupal: 7.0

I enabled the "Glossary" default view.

And when I click on the alphabet I received following error:

An error occurred while attempting to process /drupal/views/ajax: a.tagName is undefined

Kindly review the modification, In case possible please share what fix is done or resolve this issue?.

dawehner’s picture

Status: Needs review » Fixed

... This is fixed already, but just in 7.x-3.x-dev

Status: Fixed » Closed (fixed)

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