Skip to content

Commit

Permalink
Fix UI language switching bug (#21597) (#21749)
Browse files Browse the repository at this point in the history
Backport #21597

Related:
* #21596 (comment)

There was a bug when switching language by AJAX: the irrelevant POST
requests were processed by the target page's handler.

Now, use GET instead of POST. The GET requests should be harmless.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
5 people authored Nov 10, 2022
1 parent 805a14c commit a2a42cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function initHeadNavbarContentToggle() {
export function initFootLanguageMenu() {
function linkLanguageAction() {
const $this = $(this);
$.post($this.data('url')).always(() => {
$.get($this.data('url')).always(() => {
window.location.reload();
});
}
Expand Down

0 comments on commit a2a42cd

Please sign in to comment.