PDA

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



tavenger5
23-05-11, 20: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.

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

vBET
24-05-11, 21: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.

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

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

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations supported by vBET 4.10.1