View Full Version : Solved Guest cache not redirecting default URL's properly

23-05-11, 21:02
I noticed a serious problem with URL redirection when the guest cache is enabled. The translated URL's are not redirected properly.

Here is how to reproduce:

Enable guest cache
log out of your site
go to a default URL, for example: http://www.vbenterprisetranslator.com/forum/bug-reporting/1037-avatar-popup-text-alternate-text-broken-translated-pages.html
Click on a translated URL, for example: http://www.vbenterprisetranslator.com/forum/nl/bug-reporting/1037-avatar-popup-tekst-alternatieve-tekst-gebroken-in-vertaalde-bladzijden.html
Click back on the default URL
The result will be something like http://www.vbenterprisetranslator.com/forum/bug-reporting/1037-avatar-popup-tekst-alternatieve-tekst-gebroken-in-vertaalde-bladzijden.html
when it should be http://www.vbenterprisetranslator.com/forum/bug-reporting/1037-avatar-popup-text-alternate-text-broken-translated-pages.html

This behavior will not happen when guest cache is turned off. This is creating a whole lot of duplicate URL's for default pages.

24-05-11, 21:12
We can reproduce it on our test forum too. We will fix it.
Thanks for your request.

24-05-11, 22:39
I have quick fix for it. I still want to check some things, so it is possible that I will add some additional steps here, but fix below makes you safe against duplicated content.

Quick fix:
1. Edit /includes/vbenterprisetranslator_functions_hooks.php
2. Find:

if ($threadrow && strpos($_SERVER['VBSEO_URI'], $threadurl)!= 0) {
3. Replace to:

if (strpos($_SERVER['VBSEO_URI'], $threadurl) !== 0) {

Please confirm it solved the issue.

26-05-11, 23:02
That fixed it, thanks!

26-05-11, 23:09
thanks for your confirmation - solved :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vB Enterprise Translator PRODUCER_PRODUCT_VERSION