Hi,

I found a bug with incorrect using of element "query" for drupal_goto function which makes redirect incorrect. Please check below:

Before
line 210: $dest = array('query' => 'destination=fbconnect/link');

Correct
line 210: $dest = array('query' => array('destination' =>'fbconnect/link'));

Maybe there is other places with such a issue.

Regards,
Vadim

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rajeev_drupal’s picture

Assigned: Unassigned » rajeev_drupal
Issue summary: View changes

Working on this issue...

rajeev_drupal’s picture

Status: Active » Needs work

Start creating patch...

rajeev_drupal’s picture

Status: Needs work » Needs review
FileSize
801 bytes

Here parameters were not properly passed to drupal_goto() function. Second argument should be array format

This is right format for drupal_goto() function
drupal_goto($path = '', array $options = array(), $http_response_code = 302);

$path: (optional) A Drupal path or a full URL, which will be passed to url() to compute the redirect for the URL.

$options: (optional) An associative array of additional URL options to pass to url().

$http_response_code: (optional) The HTTP status code to use for the redirection, defaults to 302. The valid values for 3xx redirection status codes are defined in RFC 2616 and the draft for .

Example of proper use of this:
drupal_goto("products", array('mynode' => $node->nid));

Please find attached patch for this:Wrong_using_of_drupal_goto-issue-1874710-3.patch

jcisio’s picture

Status: Needs review » Needs work

Please note that $dest is used twice: in url() and later in drupal_goto().

rajeev_drupal’s picture

Status: Needs work » Needs review
FileSize
1.16 KB

Fixed it...assigned 2 different variable to 2 different function .
Updated patch: Wrong_using_of_drupal_goto-issue-1874710-5.patch

rachit_gupta’s picture

Testing this patch. Will report my findings soon.

rajeev_drupal’s picture

Assigned: rachit_gupta » Unassigned
rajeev_drupal’s picture

Someone Please review this patch.

Thanks,
Rajeev

nidhi.badani’s picture

Assigned: Unassigned » nidhi.badani
nidhi.badani’s picture

Assigned: nidhi.badani » Unassigned

Apologies for keeping it so long with me, but could not create the perfect environment to test this issue.