Hierarchical Select + Views + AJAX enabled + Pager: HS's JS not running because HS uses Drupal.settings

suidu - November 7, 2009 - 15:37
Project:Hierarchical Select
Version:6.x-3.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Hi Wim,

first: thanks for the great HS module!

I just recognized a problem with Hierarchial Select in a View with AJAX enabled using the pager.
On the first page it works. On all further pages there is the message "You don't have Javascript enabled" - see attached screenshot.

I installed the current version of 6.x-3.x-dev and the current Views module. I tested the issue in a clean Drupal installation in Safari 4 and Firefox 3.5

Do you know where the problems comes from?

Best
Suidu

AttachmentSize
drupal-test-installation-hierarchical-select.png44.99 KB

#1

Wim Leers - November 7, 2009 - 21:57
Title:Hierarchial Select + Views + AJAX enabled + Pager» Hierarchical Select + Views + AJAX enabled + Pager: HS's JS not running
Project:Hierarchical Select» Views
Version:6.x-3.x-dev» 6.x-3.x-dev

Odd. Seems that Views is not attaching Drupal behaviors? Moving to the Views issue queue to get feedback.

#2

merlinofchaos - November 8, 2009 - 06:02

If hierarchical select uses the 'settings' javascript, then it is difficult to transmit these settings back to the page during ajax operations. (Note that the ajax system in Drupal 7 has more or less aleviated this, but in D6 this is still a problem).

Views *does* call behaviors in its ajax operations.

#3

Wim Leers - November 8, 2009 - 11:05

I see. HS indeed uses Drupal.settings. Thanks Merlin!

#4

Wim Leers - November 8, 2009 - 11:10
Title:Hierarchical Select + Views + AJAX enabled + Pager: HS's JS not running» Hierarchical Select + Views + AJAX enabled + Pager: HS's JS not running because HS uses Drupal.settings
Project:Views» Hierarchical Select
Version:6.x-3.x-dev» 6.x-3.x-dev
Category:bug report» task
Status:active» postponed (maintainer needs more info)

This will cost a fair amount of time and frustrated debugging sessions. Drupal's AHAH/AJAX support is too immature to accommodate for this properly.

I'll welcome your patches but I won't figure out a work-around in my free time.

 
 

Drupal is a registered trademark of Dries Buytaert.