• 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
    • Redirect not working

    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: Redirect not working

    • Issue Tools
      • View Changes
    1. issueid=493 April 9, 2009 2:03 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Redirect not working

      I'm struggling to get the REDIRECT tags to work. Created the article, and the article to redirect from, linked to the article... and I end up only on the article to be redirected from. :S
    Issue Details
    Issue Number 493
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Redirects
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 2.2.2
    Fixed Version 2.2.3
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 9, 2009 2:29 PM
      pegasus pegasus is offline
      VaultWiki Team
      What are the two article's names, and exactly what code are you using for the redirect?
      Reply Reply  
    2. April 9, 2009 4:58 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Links are below, but I'm using [REDIRECT]Alpha Photon Pulse Cannon[/REDIRECT]

      http://www.thexuniverse.com/forum/sh...hp?title=Boron - Article with the link to the redirect from article
      http://www.thexuniverse.com/forum/sh...php?title=Appc - Article with the redirect
      http://www.thexuniverse.com/forum/sh...n+Pulse+Cannon - where the redirect should go
      Reply Reply  
    3. April 10, 2009 12:42 AM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs because the current code expects the tag to be lowercase as in your example. However, using an uppercase "[REDIRECT]" tag is not caught. Since the editor button would insert an uppercase version of the tag, this problem occurs quite frequently.

      Fixed for the next build. Until then you can edit vault/special_class_bbcode.php. Find:
      PHP Code:
      strpos($text, '[redirect]') 
      Replace with:
      PHP Code:
      stripos($text, '[redirect]') 
      Find:
      PHP Code:
      strpos($text, '[/redirect]' 
      Replace with:
      PHP Code:
      stripos($text, '[/redirect]' 
      Reply Reply  
    4. April 10, 2009 3:28 AM
      Mokonzi Mokonzi is offline
      Senior Member
      Hmm...

      Used the fix, and now when I click on the article that's being redirected from, I end up on the forum index page (index.php).

      Tried it accessing the article via the wiki forum and through a link in another article.

      Doesn't happen for all links though.

      Thanks again for the help.
      Reply Reply  
    5. April 10, 2009 1:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      This happens for successful redirects before vBulletin 3.8.0 and after VaultWiki 2.2.2.

      The reason is because it attempts to match your user agent with the list of search crawlers, and give a 301 redirect instead of creating a duplicate content page (as a regular user would see). But the list of crawlers is not available globally in 3.7.6, which means we are trying to match an empty string against the user agent (this will be true 100%). On top of this, the 301 redirect creates an empty URL, resulting in a 404. Your server is set up to forward 404's to your home page.

      To fix this, open vault/special_class_bbcode.php. Find:
      PHP Code:
      if (preg_match('#(' . $this->registry->wol_spiders['spiderstring'] . ')#si', $this->registry->session->vars['useragent'], $agent)) 
      Replace with:
      PHP Code:
      if (empty($this->registry->wol_spiders) AND !empty($this->registry->datastore->dbobject))
      {
          
      $this->registry->datastore->do_db_fetch("'wol_spiders'");
      }

      if (!empty(
      $this->registry->wol_spiders['useragent']) AND preg_match('#(' . $this->registry->wol_spiders['spiderstring'] . ')#si', $this->registry->session->vars['useragent'], $agent)) 
      Find:
      PHP Code:
      special_permanent_redirect($threadinfo['url']); 
      Add above:
      PHP Code:
      $vault->urlgenerate($threadinfo); 
      Reply Reply  
    6. April 10, 2009 1:07 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Ok, will have a look at changing it now, and see what happens.
      Reply Reply  
    7. April 10, 2009 1:11 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Ok, tried it, and still not working. Moving me back to the index page.

      I've also noticed (on a slightly auxiliary but related point) that the option to 'not create redirect' when renaming an article, doesn't work. It's created a redirect for me.
      Reply Reply  
    8. April 10, 2009 1:35 PM
      pegasus pegasus is offline
      VaultWiki Team
      You made BOTH edits right? Because the second one prevents a server 500 error which may be forwarding to your index. If I erase my wol_spiders in 3.8 (this would match 3.7), I have the same problem and this fix does it for me.

      The "do not create redirect" problem is slightly more involved as it involves templates, so you'll have to wait on the next build for that one.
      Reply Reply  
    9. April 10, 2009 4:18 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Definitely not working. Both edits made, and double checked.
      Reply Reply  
    10. April 10, 2009 5:36 PM
      pegasus pegasus is offline
      VaultWiki Team
      Not sure where you made the edits. I just spat out the contents of the file in question at the following URL: http://www.thexuniverse.com/forum/sh...7%3Bs+Dominion

      It doesn't look like any of the edits mentioned here were made.
      Reply Reply  
    11. April 11, 2009 3:28 AM
      Mokonzi Mokonzi is offline
      Senior Member
      Working on it now...
      Reply Reply  
    12. April 11, 2009 3:34 AM
      Mokonzi Mokonzi is offline
      Senior Member
      I've got some major problem at the site atm, not sure what's caused it. Did you enable or disable anything to check the contents? Cos now I can't get access to a lot of things, including editing posts, etc.
      Reply Reply  
    13. April 11, 2009 3:43 AM
      Mokonzi Mokonzi is offline
      Senior Member
      Ok, got it working. Worked out what you switched to show the content data. Switched it off, and then double checked the file. Not sure what caused the problem, but reuploading eventually worked.

      All is fixed now. Thanks again for the help.
      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 11:37 PM.
    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.