• 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
    • Wrong redirect after posting

    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: Wrong redirect after posting

    • Issue Tools
      • View Changes
    1. issueid=873 September 29, 2009 3:42 AM
      Sebi Sebi is offline
      Junior Member
      Wrong redirect after posting

      Adding new articles to the moderation queue works fine, but there is an error on redirecting after posting the new article.

      After adding the new article the message with information about moderation is displayed, but after that the user is redirected to a wrong url, for example:

      /wiki/forumdisplay-php?f=210&forumid=210

      This url produces an VaultWiki error, that there is no text on this page (forumdisplay-php), because it's a wiki article url and not the vB board url.

      We are using vbSEO and our wiki is not under the forum root, it's directly under /wiki/. The correct redirect url in this case should be "/forum/wiki/", because this is the url of the wiki board in the vB. I think the error occurs because of the url rewriting in combination with vbSEO?

      Is there any easy solution for this problem?
    Issue Details
    Issue Number 873
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Editing / Posting Articles
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 2.5.4
    Fixed Version 2.5.5
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. September 29, 2009 1:16 PM
      pegasus pegasus is offline
      VaultWiki Team
      I have been unable to reproduce this particular problem, so perhaps it is related to browser settings. Try the following, in AdminCP > Plugins & Products > Plugin Manager > CES VaultWiki > "New Thread - Rewrite Duplicate Redirect" > Plugin PHP Code, find:
      Code:
      	$url = $vbulletin->options['bburl'] . '/' . $url;
      Add after:
      Code:
      	$js_url = $vbulletin->options['bburl'] . '/' . $js_url;
      Reply Reply  
    2. September 30, 2009 5:26 AM
      Sebi Sebi is offline
      Junior Member
      Hm, it doesn't work or has no effect, the redirect url isn't changend in the output ...

      I looked a bit deeper in the html of the redirect page and both the link and automatic js redirect points to

      /wiki/forumdisplay.php?f=210

      in the wiki path instead of

      /forum/forumdisplay.php?f=210

      So like every url under /wiki it's rewritten to its seo-friendly version forumdisplay-php? and in this case (correctly) displayed as an article. But why is the wiki "root" used instead of the "forum" root?

      ---

      I could capture exactly this url via mod_rewrite condition und redirect the user to my own page or to the correct board. It would work, but it seems to me, that this can't be the final solution
      Reply Reply  
    3. September 30, 2009 1:32 PM
      pegasus pegasus is offline
      VaultWiki Team
      What is the name of the forum? If it's "wiki", then I have seen this cause problems in the past, where vBSEO wants to redirect the forum to the same path as the wiki.

      Even so, I don't believe that vbSEO would redirect to a forumdisplay URL like that. Make sure your vBulletin setting "Wiki PHP File" is set to "wiki". If this setting doesn't match the actual location of your wiki, it would prevent VaultWiki from detecting that it needs to move you up one level to /forum on the redirect, among other nasty problems.

      Does this occur in multiple browsers? What browsers (and versions) have you tested?

      Do you have any other plugins using hook redirect_generic (Plugins & Products > Plugin Manager, sort by "Hook Location")? What are the contents?
      Reply Reply  
    4. October 10, 2009 10:56 AM
      Sebi Sebi is offline
      Junior Member
      I renamed the forum, but it's still the same problem.

      The wiki is located under "/wiki/", the forum is now located under "forum/lexikon/". In the "VaultWiki: Server-Settings" the filename of the Wiki PHP file is set so "wiki" and the wiki base url is set to "http://subdomain.domain.de".

      When I add as an unregistered person a new article I get the message that the new article will be checked by a moderator and then I get redirected to "/wiki/forumdisplay.php?f=210" which is rewritten by VaultWiki to "/wiki/forumdisplay-php?f=210&forumid=210" and I get a page, that this article "forumdisplay php" has actually no text.
      But why I'm redirected to "/wiki/forumdisplay.php?f=210" instead of "/forum/forumdisplay.php?f=210", which would be correct?

      There are no other plugins using "redirect_generic", it's a clean vB installation with vb-Blog, vbSEO und VaultWiki.

      It seems to me, that the changes in "New Thread - Rewrite Duplicate Redirect" has no effect. I changed the variables $url and $js_url to another url, but I always get redirected to the page above. In another test I switched off vbSEO in the vbSEO control panel, but nothing changed ... why is the wiki-root used for forumdisplay.php instead of the forum-root, that must be a problem somewhere in the VaultWiki.

      I tested it in FF, IE and Safari with the same results, but I don't think, it's a browser-based problem, because the wrong url ("/wiki/forumdisplay.php?f=210") is hardly coded in the html of the vbulletin redirect page in meta-refresh, js and the normal link.
      Reply Reply  
    5. October 10, 2009 2:26 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, figured this out. Replace plugin "New Thread - Rewrite Duplicate Redirect" with:
      Code:
      if (THIS_SCRIPT == 'postings' AND $_POST['do'] == 'dodeletethread')
      {
      	special_header_redirect($url);
      }
      else if ($vbulletin->options['vault_seo'])
      {
      	if (strpos($url, '://') === false)
      	{
      		// article generator flood check bug fix
      		$url = $vbulletin->options['bburl'] . '/' . $url;
      		$js_url = $vbulletin->options['bburl'] . '/' . $js_url;
      	}
      	else if (preg_match('#/' . preg_quote($vbulletin->options['ces_wiki_php'], '#') . '/(?:showthread|forumdisplay)\.php#', $url, $match))
      	{
      		$url = str_replace('/' . $vbulletin->options['ces_wiki_php'], '', $url);
      		$js_url = str_replace('/' . $vbulletin->options['ces_wiki_php'], '', $js_url);
      	}
      }
      Replace plugin "Thread Manage - Disable Forum Redirect" with:
      Code:
      if (THIS_SCRIPT == 'postings' AND $_POST['do'] == 'dodeletethread')
      {
      	special_header_redirect($url);
      }
      else if ($vbulletin->options['vault_seo'])
      {
      	if (strpos($url, '://') === false)
      	{
      		// article generator flood check bug fix
      		$url = $vbulletin->options['bburl'] . '/' . $url;
      	}
      	else if (preg_match('#/' . preg_quote($vbulletin->options['ces_wiki_php'], '#') . '/(?:showthread|forumdisplay)\.php#', $url, $match))
      	{
      		$url = str_replace('/' . $vbulletin->options['ces_wiki_php'], '', $url);
      	}
      }
      Reply Reply  
    6. October 13, 2009 5:10 AM
      Sebi Sebi is offline
      Junior Member
      Thanks. On the way .. but not at the end.

      Now I'm redirected to

      /forumdisplay.php?f=210

      instead of

      /forum/forumdisplay.php?f=210
      Reply Reply  
    7. October 13, 2009 5:18 AM
      Sebi Sebi is offline
      Junior Member
      I replaced in both codes

      Code:
      str_replace('/' . $vbulletin->options['ces_wiki_php'], '', $url)
      with

      Code:
      str_replace('/' . $vbulletin->options['ces_wiki_php'], '/forum', $url)

      Not an overall solution, but it works for the moment
      Reply Reply  
    8. October 13, 2009 10:24 AM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks for that. It should actually be:
      Code:
      str_replace(
      	$vbulletin->options['vault_bburl'] . '/' . $vbulletin->options['ces_wiki_php'],
      	$vbulletin->options['bburl'],
      	$url
      )
      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:05 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.