I get the error as this when I set an exposed filter in the views page.

I check the views-exposed-form.tpl.php and change the line 32 code from

<div id="<?php print $widget->id; ?>-wrapper" class="views-exposed-widget views-widget-<?php print $id; ?>">

to:

<div id="<?php print $id; ?>-wrapper" class="views-exposed-widget views-widget-<?php print $id; ?>">

So the error is gone. But I don't know any PHP code, could anybody tell me the change is right or not?

CommentFileSizeAuthor
#3 1300054.patch479 bytesdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hb.tan’s picture

Status: Needs review » Active
ak’s picture

Version: 7.x-3.0-rc1 » 7.x-3.0
Category: support » bug

I got the exact same error in views 3.0.
Scanning the DOM, I noticed that $widget->id seems to be undefined for the exposed filter "Content: Has new content (exposed)":
Views widget output reads: <div id="-wrapper" class="views-exposed-widget views-widget-checkboxes"></div>
where the id should read something like "edit-checkboxes-wrapper" instead.

Reproduce:
Set the filter "Content: Has new content" to exposed, save and visit the view page (doesn't happen on views preview).

dawehner’s picture

Status: Active » Needs review
FileSize
479 bytes

Here is a patch which fixes this issue, please try it

dawehner’s picture

Status: Needs review » Fixed

Just committed that patch as it looks fine.
Thanks for reporting this issue.

Status: Fixed » Closed (fixed)

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