Author Topic: WBLingual - how to get rid of ugly URL  (Read 154 times)

Offline CodeALot

  • Posts: 442
  • Gender: Male
WBLingual - how to get rid of ugly URL
« on: October 10, 2019, 02:16:28 PM »
When switching from one language to another (in this case, to English) the URL of the 'landing page' shows unwanted variables.   (?_wb=.... etc)
Code: [Select]
https://exampledomain.com/en/what-we-do/?_wb=en/what-we-do/

Am I overlooking something? Doing something wrong? :)  I don't want ugly URL's

WB 2.12.2 r379
WBLingual 2.0.2
ShortURL active

Offline hgs

  • Betatester
  • **
  • Posts: 1127
    • EFG MG
Re: WBLingual - how to get rid of ugly URL
« Reply #1 on: October 11, 2019, 08:38:06 AM »
I can confirm that,
https://domäne.org/de/gallery/?_wb=de/gallery/
AFTER another "click" in the language
https://domäne.org/de/ueber-uns/
it is then clean again, so only when changing the URL via the flags the URL is "wrong".
What do the developers say?
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline dbs

  • Betatester
  • **
  • Posts: 8075
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: WBLingual - shorturl - how to get rid of ugly URL
« Reply #2 on: October 11, 2019, 09:04:23 AM »
Halrald, you have also shorturl active.
?_wb= is part of the htaccess code for shorturl.

Offline astricia

  • Posts: 709
  • Gender: Female
    • netSchmiede24
Re: WBLingual - how to get rid of ugly URL
« Reply #3 on: October 11, 2019, 10:43:31 AM »
I had this problem on a website a few months ago and contacted Ruud about it, since he developped shorturl. He said this was caused by WebsiteBaker and he made "a small change in class.frontend.php" to prevent this happening. It worked - but unfortunately I don't know what exactly he changed....

I have attached the new class.frontend.php from that particular server (as txt - you need to rename it), so maybe this helps.

Astrid

Offline hgs

  • Betatester
  • **
  • Posts: 1127
    • EFG MG
Re: WBLingual - how to get rid of ugly URL
« Reply #4 on: October 11, 2019, 10:56:16 AM »
Halrald, you have also shorturl active.
?_wb= is part of the htaccess code for shorturl.
Yes I have shortURL active
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline dbs

  • Betatester
  • **
  • Posts: 8075
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: WBLingual - how to get rid of ugly URL
« Reply #5 on: October 11, 2019, 11:00:13 AM »
@astricia: thanks, to you and Ruud. Seems to work. File ist from 2.12.1 but the change is the same for 2.12.2
framework/class.frontend.php line 192. change this:
Code: [Select]
\header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING']);to this
Code: [Select]
\header('Location: '.$this->page_link($this->page['link']));

Offline hgs

  • Betatester
  • **
  • Posts: 1127
    • EFG MG
Re: WBLingual - how to get rid of ugly URL
« Reply #6 on: October 11, 2019, 11:12:28 AM »
 (Y)
Then, if there are no concerns from the developers, it should be transferred to the next version like this.
@dbs please create a ticket, because my internet is currently very slow on vacation.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline hgs

  • Betatester
  • **
  • Posts: 1127
    • EFG MG
Re: WBLingual - how to get rid of ugly URL
« Reply #7 on: October 11, 2019, 01:54:49 PM »
Tested on a bilingual site. Everything runs as it should. (Y)
Thanks to all
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline CodeALot

  • Posts: 442
  • Gender: Male
Re: WBLingual - how to get rid of ugly URL
« Reply #8 on: October 11, 2019, 03:01:18 PM »
Works! Thanks all  8-)

Offline crnogorac081

  • Posts: 1913
  • Gender: Male
Wblingual
« Reply #9 on: October 11, 2019, 05:34:46 PM »
I would like to ask what is happening with link eg. http://wb_url/my_pretty_url/?page=2

Is _get('page') going to be dumped too if we apply the proposed fix :?

I would suggest to only remove _wb from $_SERVER['QUERY_STRING'] if exists..
« Last Edit: October 11, 2019, 06:35:24 PM by dbs »
no bb in signature

Offline dbs

  • Betatester
  • **
  • Posts: 8075
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: WBLingual - how to get rid of ugly URL
« Reply #10 on: October 12, 2019, 03:37:49 PM »
Dev Dietmar will take a look at the change. The way I see it, there will be another solution.