• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • The page isn't redirecting properly

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: The page isn't redirecting properly

    • Issue Tools
      • View Changes
    1. issueid=1032 January 21, 2010 10:49 AM
      xopek xopek is offline
      New Member
      The page isn't redirecting properly
      With UTF-8 Support for URLs enabled it gets into infinite redirect loop

      On my test board running 3.0.0b2 I have 'Simplify Wiki Links' option enabled as well as 'UTF-8 Support for URLs' option.

      When I try using normal ascii characters in URLs everything works fine (which proves it's not issue with .htaccess) but when I try any UTF8 chars in URL page goes into infinite cycle with browser reporting:

      Code:
      The page isn't redirecting properly
      
      Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
      Exactly the same setup worked fine with 2.5.7...

      Code:
      RewriteBase /
      RewriteRule ^showwiki.php?title=(.*)$ showwiki/$1 [L,R=301]
      RewriteRule ^showwiki/DEFAULT:(.*)$ showwiki/$1 [L,R=301]
      RewriteRule ^showwiki/(.*)?$ showwiki_proxy.php [L,QSA]
      from the log...
      ascii in url - all works ok
      [20/Jan/2010:22:35:48 +0000] "GET /showwiki/a HTTP/1.0" 200 57846 "-"
      utf8 in url - loops
      [20/Jan/2010:22:36:53 +0000] "GET /showwiki/%d0%b0 HTTP/1.0" 301 - "-"
      [20/Jan/2010:22:36:53 +0000] "GET /showwiki/%d0%b0 HTTP/1.0" 301 - "-"
      [20/Jan/2010:22:36:53 +0000] "GET /showwiki/%d0%b0 HTTP/1.0" 301 - "-"
      etc... until ff gives up

      out of curiocity i've disabled 'utf8 if url' option and in this case i get:
      [20/Jan/2010:22:38:13 +0000] "GET /showwiki/%d0%b0 HTTP/1.0" 301 - "-"
      [20/Jan/2010:22:38:13 +0000] "GET /showwiki/Dj HTTP/1.0" 200 57853 "-"

      Any ideas?

      Denis
    Issue Details
    Issue Number 1032
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Infinite Loops
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 3.0.0 Beta 2
    Fixed Version 3.0.0 Beta 3
    Milestone VaultWiki 3.0.0
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. January 21, 2010 12:32 PM
      pegasus pegasus is offline
      VaultWiki Team
      You may have to Rebuild Page URLs from the URL Manager, because the upper/lower case support was added for UTF-8 characters. If the cached "canonical" URL is incorrect, this may cause an infinite loop.

      I have a feeling this is related to your other report. We have simplified the way canonical URLs are checked since 2.5.7, but in some cases this has caused problems. We have an extended method that was written for the next beta, but it requires changes in several locations.

      In vault/special_class_wiki.php, find:
      Code:
      		if (THIS_SCRIPT == 'showwiki' AND VAULT_FRIENDLY_ENTRY AND empty($_REQUEST["$titlevar"]))
      Replace with:
      Code:
      		if (THIS_SCRIPT == 'showwiki' AND VAULT_FRIENDLY_ENTRY AND empty($_GET["$titlevar"]))
      In vault/special_plugins.php, find:
      Code:
      function special_fetch_url()
      Replace with:
      Code:
      function special_fetch_url($strip_query = false)
      Find:
      Code:
      	if (VAULT_40X_COMPAT)
      	{
      		$url = $vbulletin->input->fetch_basepath();
      		$path = substr($vbulletin->scriptpath, 1);
      	}
      	else
      	{
      		$basepath = parse_url(create_full_url('/'));
      		$url = $basepath['scheme'] . '://' . $basepath['host'] . $basepath['path'];
      		$url = $vbulletin->input->xss_clean($url);
      		$path = substr($vbulletin->input->fetch_scriptpath(), 1);
      	}
      
      	if ($vbulletin->options['vault_spaces'] == 0)
      	{
      		$path = str_replace(' ', '+', $path);
      	}
      
      	$url .= $path;
      Replace with:
      Code:
      	global $vault;
      
      	if (VAULT_40X_COMPAT)
      	{
      		$url = $vbulletin->input->fetch_basepath();
      		$path = $vbulletin->input->fetch_relpath();
      	}
      	else
      	{
      		$basepath = parse_url(create_full_url('/'));
      		$url = $basepath['scheme'] . '://' . $basepath['host'] . $basepath['path'];
      		$url = $vbulletin->input->xss_clean($url);
      		$path = substr($vbulletin->input->fetch_scriptpath(), 1);
      	}
      
      	if ($vbulletin->options['vault_spaces'] == 0)
      	{
      		$path = str_replace(' ', '+', $path);
      	}
      
      	$relpath = explode('?', $path);
      
      	if ($vault->misc['paths'][$relpath[0]] !== null)
      	{
      		$path = $vault->misc['paths'][$relpath[0]];
      
      		if ($relpath[1] AND !$strip_query)
      		{
      			$path .= '?' . $relpath[1];
      		}
      	}
      	else if ($strip_query)
      	{
      		$path = $relpath[0];
      	}
      
      	$url .= $path;
      Find:
      Code:
      				$compurl = special_fetch_url();
      
      				if (strpos($compurl, $threadinfo['url']) === false)
      Replace with:
      Code:
      				$compurl = special_fetch_url(true);
      
      				if ($compurl != $threadinfo['url'])
      Reply Reply  
    2. January 21, 2010 3:50 PM
      xopek xopek is offline
      New Member
      Hi,

      Thanks for the reply.. I have rebuild page URLs and that indeed has solved the mystery of missing special pages.. All special pages are now working ok and the pages created with 2.5.7 before its removal are now visible in 3.0.0b2.

      I should stress that only pages with ascii names started working.. The old pages with UTF8 characters are still not working.

      I have also applied the patched as above but that made no visible difference. If I use the URL like wiki/абц (utf8 chars) i'm still getting indefinite loops..

      Denis
      Reply Reply  
    3. January 21, 2010 3:59 PM
      xopek xopek is offline
      New Member
      One more observation... After applying the patches above it stopped working with 'simplify wiki link' option set to off.

      1. Applied patches
      2. Set 'simplify wiki link' off
      3. Changed php file name back to 'showwiki'
      4. Removed all entries from .htaccess
      5. Open site.com/showwiki.php?title=blah
      6. Enjoyed yet another redirection loop

      When I reverted to the original 3.0.0b2 code (no patches), this url works fine.
      Reply Reply  
    4. January 22, 2010 5:41 AM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks for testing this patch - this has allowed us to fix a critical bug in it before rolling it out in the next beta. I'm afraid I'm out of ideas right now for the UTF8 issue - if you can, please PM me with the following information: FTP access to the /vault directory, and access to your wiki (depending on your site's permissions). I will try to create a patch for the problem directly.
      Reply Reply  
    5. January 22, 2010 6:08 AM
      xopek xopek is offline
      New Member
      Hi, getting access to the test board is rather tricky.. it's hidden behind some firewalls that outside of my control.. I'll see what i can do here.
      In the mean time, i'll keep playing with UTF8 ..

      I was curious on how your setup will behave and I don't see such loops.. So it's unlikely to be a bug in the software, probably my setup!
      But what I did find - and that's the behavious that is on both yours any my boards...

      if you try to open http://www.vaultwiki.org/showwiki.php?title=абв (or any utf8 chars) it redirects you to a page like http://www.vaultwiki.org/pages/%E0%E1%F6 and then on the page itself it shows some garbage (���) instead of the article name.. If you go to http://www.vaultwiki.org/pages/абв - it seems to be working properly.

      I have tried this on my board with and without 'simplify url' option and it seems to corrupt the page name all the times..

      Denis
      Reply Reply  
    6. January 22, 2010 1:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      What browser are you using? Both showwiki path types resolve correctly for me in FireFox 3.5
      Reply Reply  
    7. January 22, 2010 10:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      Another user was having the same redirecting issue. In that case, the forum was not installed in the site root directory, but /forum
      You can bypass this by disabling the cache_templates plugin (not ideal), or modifying vault/special_plugins.php. Find:
      Code:
      	if (VAULT_40X_COMPAT)
      	{
      		$url = $vbulletin->input->fetch_basepath();
      		$path = $vbulletin->input->fetch_relpath();
      	}
      	else
      	{
      		$basepath = parse_url(create_full_url('/'));
      		$url = $basepath['scheme'] . '://' . $basepath['host'] . $basepath['path'];
      		$url = $vbulletin->input->xss_clean($url);
      		$path = substr($vbulletin->input->fetch_scriptpath(), 1);
      	}
      Replace with:
      Code:
      	$basepath = parse_url(create_full_url('/'));
      	$url = $basepath['scheme'] . '://' . $basepath['host'];
      	$url = $vbulletin->input->xss_clean($url);
      
      	if (VAULT_40X_COMPAT)
      	{
      		$path = '/' . $vbulletin->input->fetch_relpath();
      	}
      	else
      	{
      		$path = $vbulletin->input->fetch_scriptpath();
      	}
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 1:08 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.