The module works perfectly fine, except one case:
User been redirected from some page and has query parameters passed to the url. Now suppose, if user changes the language then the query parameters in URL get disappear.

Attached is the patch, which will append query parameters in URL.

This patch is tested against 7.x-1.2

Regards,
Yogesh

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rahuldolas123’s picture

Version: 7.x-1.2 » 7.x-1.5
Assigned: Unassigned » rahuldolas123
Status: Active » Patch (to be ported)
FileSize
1.07 KB

The attached file is a patch, which will append query parameters in URL. The patch is developed and tested for version 7.x-1.5.
In version 7.x-1.5, $lang_options['query'] was not defined to update query in url. This patch fixes that issue and the url queries don't disappear anymore even after change of language.

rahuldolas123’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.07 KB

The attached file is a patch, which will append query parameters in URL. The patch is developed and tested for version 7.x-1.5.
In version 7.x-1.5, $lang_options['query'] was not defined to update query in url. This patch fixes that issue and the url queries don't disappear anymore even after change of language.

yogeshchaugule8’s picture

Assigned: rahuldolas123 » Unassigned

Thanks for pointing out that rahul, the module was already trying to maintain the query parameters in URL while changing language, but it was not setting up the value of query parameter, before assigning it to URL.

Yogesh

Sarnas’s picture

I had the same issue that then user changes the language the query parameters in url get disappear. I patched lang_dropdown.module with Your last patch and yes it helped - query parameters are not disappearing, but new issue popped out:
user had this url:
custom_module/q?name=Name&source[first]=1&source[second]=1
then user changes language and url gets like this:
custom_module/q?name=Name&source[first]=1&source[second]=1
then user changes language one more time and url gets like this:
custom_module/q?name=Name&amp%3Bsource[first]=1&amp%3Bsource[second]=1
if user continues changing languages - & keeps appearing continuously.
Could You help to fix this issue?

manfer’s picture

Version: 7.x-1.5 » 7.x-2.x-dev
Issue summary: View changes
Status: Needs review » Fixed

Version 7.x-2.1 solves this problem

Status: Fixed » Closed (fixed)

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