• 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 4.x Series
    • Bug
    • redirect bb code broken after import

    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 bb code broken after import

    • Issue Tools
      • View Changes
    1. issueid=4571 March 4, 2016 4:07 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      redirect bb code broken after import

      Please see:
      wiki_index.php?title=Nitrous
      There is a line break in the bb code and the title is autolinked. This breaks the redirect.
    Issue Details
    Issue Number 4571
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Importing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.9
    Fixed Version 4.0.10
    Milestone (none)
    Software DependencyvBulletin 3.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. March 4, 2016 4:43 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I guess that this also caused many redirects not to be imported as synonyms.
      Reply Reply
    2. March 5, 2016 9:56 AM
      pegasus pegasus is offline
      VaultWiki Team
      VaultWiki 4 does not provide a redirect BB-Code. Synonyms are used instead.

      Any redirect that contains a line break would be invalid, which I suppose is why it wasn't imported. This behavior would be consistent with previous imports too. If you used a lot of invalid redirects in VW3, the following change would be needed in order to import them. In vault/core/controller/import/handle/vw3/page/vw.php, find:
      Code:
      		$patterns = array('#\[redirect\](.*)\[/redirect\]#iU');
      
      		if ($option == 1)
      		{
      			$find[] = '#\<!(--) (.*) --\>#siU';
      			$find[] = '#\<(nowiki)\>(.*)\</nowiki\>#siU';
      
      			$patterns[] = '#\#REDIRECT \[\[(.*)\]\]#iU';
      		}
      		if ($option == 2)
      		{
      			$patterns[] = '#\#REDIRECT \[wiki\](.*)\[/wiki\]#iU';
      		}
      Replace with:
      Code:
      		$patterns = array('#\[redirect\](.*)\[/redirect\]#siU');
      
      		if ($option == 1)
      		{
      			$find[] = '#\<!(--) (.*) --\>#siU';
      			$find[] = '#\<(nowiki)\>(.*)\</nowiki\>#siU';
      
      			$patterns[] = '#\#REDIRECT \[\[(.*)\]\]#siU';
      		}
      		if ($option == 2)
      		{
      			$patterns[] = '#\#REDIRECT \[wiki\](.*)\[/wiki\]#siU';
      		}
      Reply Reply
    3. March 5, 2016 10:23 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      There were re no line breaks in the bbcode in VW3 before the import.
      Reply Reply
    4. March 5, 2016 11:55 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      20% of all redirects were not imported as synonyms but as 100 stub pages. Please see: /forum/wiki_index.php?title=Wiki-Redirects
      You can find the original pages here: /forum/forumdisplay.php?f=190
      Reply Reply
    5. March 5, 2016 12:25 PM
      pegasus pegasus is offline
      VaultWiki Team
      It looks like there may have been several culprits here:
      1. Redirects that contained a line break, such as: /forum/showthread.php?t=150874
      2. Redirects that used NuWiki syntax, such as: /forum/showthread.php?t=78304
      3. Pages that were not actually redirects, such as: /forum/showthread.php?t=232424

      For #1, I have stated above that redirects with line breaks were not handled. We had never expected a valid redirect to contain a line break.
      For #2, redirects using NuWiki syntax are only imported if VW3 had Options > VaultWiki: Legacy Options > Support Legacy Syntax = NuWiki. The only example I found of this was a URL conflict with #1, so it is not clear if these kinds of redirects were actually imported.
      For #3, these were not redirects so they would not be imported as synonyms in any case.

      A majority of the "stub pages" you refer to are a result of #3.
      Reply Reply
    6. March 5, 2016 1:21 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      1. I will go through them on my live site and correct these as much as possible.

      2. is this nuwiki syntax:
      [REDIRECT]Category:pagename[/REDIRECT]
      That is the syntax being used. I do not have nuwiki syntax active on my live site and have turned it off many years ago.

      I see that a lot of redirects on my site are redirects to categories. This is done because VW3 does not autolink a category just by the pagename. But we need the category name to link to the category. Therefore a lot of redirects were created.
      How can this be resolved in VW4?
      Reply Reply
    7. March 5, 2016 2:52 PM
      pegasus pegasus is offline
      VaultWiki Team
      NuWiki Syntax (requires NuWiki legacy support turned on in the source database):
      Code:
      #REDIRECT [wiki]Target[/wiki]
      MediaWiki Syntax (requires MediaWiki legacy support turned on in the source database):
      Code:
      #REDIRECT [[Target]]
      Of these, I only noticed the NuWiki variant, and I only found it in the one page that I linked above.

      VaultWiki 4 does not require the "Category" prefix in front of category names (unless you setup your areas to require that). Because of this, the prefix (even if it's the word "Category") becomes meaningful. Once you are using VaultWiki 4, you may wish to rename the Category to the non-prefixed title variant. Then autolinks would point directly to the category without need for a redirect. For existing backlinks, still double-check that a redirect was automatically created from "Category:pagename" when you renamed it, or those existing links would be broken.

      Then from now on, just use un-prefixed names for categories that should autolink.
      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 7:29 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 © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.