Hi,

I have a form with two taxonomy fields using the hierarchical select widget. When I use the form alone, everything works ok. But if I include the form as a page in a pageroute, the hierarchical select stops to work. It displays ok, but if I try to select something it displays the message "Received an invalid response from the server".

Don't know if it helps, but using Firebug and FirePHP, I found that it seems to be building the form twice. Inside hierarchical select there is an #after_build callback that sets an hs_form_build_id property on the form. In standalone forms, this callback is called once, and the id is correct. Inside of a pageroute, the callback is called twice: in the first one the id is generated, but not in the second.

Any ideas of what could be the problem?

Thanks in advance!

CommentFileSizeAuthor
#3 hs_pageroute.patch908 byteswim leers

Comments

caugmar’s picture

Category: support » bug
Priority: Normal » Critical
Tauran’s picture

Project: Pageroute » Hierarchical Select
Version: 6.x-1.x-dev » 6.x-3.x-dev
Category: bug » feature
Priority: Critical » Normal

As there are some issues when using form storage (http://drupal.org/node/302240), the #after_build callback gets called twice.
For pageroute it is necessary that a module can deal with that.
Maybe Hierarchical Select can be changed accordingly.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Needs review
StatusFileSize
new908 bytes

Try this patch and let me know if it works.

wim leers’s picture

Title: Hierarchical Select doesn't work inside pageroutes » HS + Pageroute compatibility

Better title.

jponch’s picture

+1 - patch in response #3 worked for me :)

aleagi’s picture

Hi there,

#3 patch make the trick!

Can it be included on HEAD?

Nice work guys! @:)

Regards,

wim leers’s picture

Status: Needs review » Fixed

Two confirmations — committed :) Sorry for the delay!

http://drupal.org/cvs?commit=244532

Status: Fixed » Closed (fixed)

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