Hello,
I'm having a strange issue. I set a redirect URL: http://www.example.com/drupal_root/content/thanks. But when submitting, I'm redirected to: http://www.example.com/drupal_root//drupal_root/webform (drupal_root/webform is the url of the webform I submitted).

Looking at the code, I see that drupal runs webform.module:1947 and 1948 and sets $form_state['redirect'] with my correct URL. Then I don't know what happens, because I don't know well how drupal works. :-(

How can I fix that?

Thanks.

Comments

quicksketch’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.03 KB

I can't quite reproduce the problem you're describing, but I did find a similar issue where entering a full URL as the redirect URL may result in the confirmation message not being shown. Could you try out this patch and see if it helps your problem also? As an alternative, you may just enter your URL as "content/thanks" instead of "http://www.example.com/drupal_root/content/thanks".

quicksketch’s picture

StatusFileSize
new786 bytes

That last patch included some debugging code, here's a patch with only the necessary changes.

ermannob’s picture

Hi,
thanks for your reply.
With your patch I see that $form_state['redirect'] is different. It's like: array("content/thanks", "sid=1614", null).
Unfortunatly the problem persists. I get redirected to the same URL as my first post.

Using an internal URL as redirection (I used "content/thanks"), I got the same result.

It seems that after running webform_client_form_submit() some other code modifies the redirection url. Can you give me some advice where to look?

Thanks.

ermannob’s picture

I just found what the problem is: webform_block 6.x-1.x-dev (2010-Mar-02).
When I set my webform to "Generate a block", the URL error comes up.
Please note that I tried both ways to display my webform: as a block and as a node. The result was the same... wrong URL for redirection.
It's so strange... I'm going to report this to webform_block devs.

Thanks.

quicksketch’s picture

Category: bug » support
Status: Needs review » Fixed

Thanks ermannob. As noted on the project page, Webform Block has not yet been updated to work with Webform 3 and I wouldn't recommend using it until they announce complete compatibility. I went ahead and applied the patch from #2, since it's a bug regardless, even if it didn't fix the issue at hand.

bcobin’s picture

Workaround is to create a view and add a block view. Working OK for me.

ermannob’s picture

That's interesting, bcobin. I used another workaround: Nodes In Block http://drupal.org/project/nodesinblock .
It seems that with Drupal we can find several ways to solve problems... :-)

loophole080’s picture

confirmed #6

-> disabled webform_block
-> using webform 3.0 dev
-> create node view
-> block display
-> field: node - webform form body
-> filter: node type - webform

redirect path in webform conf now works as expected

ganges’s picture

FIXED third party module dependencies

Sirs

After submission in browser instead of redirect page/or message i see this

Array
(
[0] => Submitted on 05/07/2010 - 10:09
Submitted by user: ssclientsiteadmin [109.104.170.41]

Submitted values are:

Name: ds
Company: sd
Job Title: sd
Phone: 44444
Email:
Your question: ervreverv

The results of this submission may be viewed at:
http://development.smartsite.com.ua/node/16/submission/13
)

please, if possible, point me to some decision
thnks

quicksketch’s picture

Sounds like this issue is solved. @ganges see #785544: Confirmation Page is an Array.

Status: Fixed » Closed (fixed)

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

keva’s picture

the original issue can also be solved by deleting the following line (57) in webformblock.module:

$form['#redirect'] = $current_url;

not the ideal solution, but it works for now.

Webform Block 6.x-1.x-dev
Webform 6.x-3.0-beta5

betz’s picture

#12 did the trick