• 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
    • Ampersand results in permanently wanted page

    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: Ampersand results in permanently wanted page

    • Issue Tools
      • View Changes
    1. issueid=649 June 24, 2009 2:37 PM
      tommythejoat tommythejoat is offline
      Regular Member
      Ampersand results in permanently wanted page
      If an article title contains an & character the title gets stuck in Wanted Pages

      The use of & in article titles was fixed earlier, but it still has the problem that the title is not recognized when selecting links for missing pages. i.e. the vault_links table has 0 in the target_id even though clicking on the title in the wanted pages list goes to the completed article.
      Here is a link to a thread demonstrating the problem. The titles shown in red are all autolinked except the last one that has wiki codes around it. They all pop up "not yet written" but if clicked they go to the fully written article.
      I have not deleted all the & bearing links from vault_links. Would deleting them cause them to be rebuilt correctly.
      I also had a large number of one word entries from previous bad one word titles. They have not faded away over time and so I deleted all of those earlier today.
    Issue Details
    Issue Number 649
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 2.3.1
    Fixed Version 2.3.2
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 24, 2009 3:45 PM
      pegasus pegasus is offline
      VaultWiki Team
      When an article is deleted, entries that link TO it are not deleted, only articles that it links itself.
      Deleting the & entries should cause them to be rebuilt correctly.
      Reply Reply  
    2. June 24, 2009 10:00 PM
      tommythejoat tommythejoat is offline
      Regular Member
      I ran a set of delete queries against vault_links to get rid of all the ampersand titles that were there without an article reference (that was all of them actually). The articles with the ampersands in the title do exist and can be reached by clicking on their links in an article.

      However, the links remain red and after the link has been exercised, the entry reappears in vault_links with refid 0 and the name is back in the Special Pages wanted pages list.

      It is difficult to document the behavior of red and blue links for my users when these very common names behave badly.

      You can look at my special pages report on wanted pages to get into the loop on this. Here is a thread showing the behavior.

      Clicking on any of the articles with & in the name will take you to the article.
      Reply Reply  
    3. June 28, 2009 9:17 AM
      pegasus pegasus is offline
      VaultWiki Team
      As far as I can imagine, the following should have some effect on this (of course you would need to clear the &-titles from the table again). In vault/special_dm_link.php, find:
      Code:
      		$threadtitle = unhtmlspecialchars($this->link['data']['threadtitle']);
      		$linktitle = unhtmlspecialchars($this->link['data']['title']);
      Replace with:
      Code:
      		$threadtitle = $this->link['data']['threadtitle'];
      		$linktitle = htmlspecialchars_uni($this->link['data']['title']);
      In vault/special_plugins_bbcode.php, find:
      Code:
      	if (empty($linkid))
      	{
      		$option = preg_replace('#\%23#', '#', $option);
      Add before:
      Code:
      	if (!$parser->options['do_html'])
      	{
      		$option = unhtmlspecialchars($option);
      		$tokoption = unhtmlspecialchars($tokoption);
      
      		if (strpos($tokoption, 'amp;') === 0)
      		{
      			$tokoption = substr($tokoption, 4);
      		}
      	}
      This problem with still exist for the following case: HTML enabled in the article, HTML disabled in an included template that has the link. However, for security reasons, I don't know why anyone would use that specific configuration.

      To handle this particular case, we need to extend the current behavior which uses the shallowest level allow-HTML setting. In vault/special_class_template.php, find:
      Code:
      			$vault->parser['current_template'] = $title;
      
      			if ($this->parser->recursion['template'] == 1)
      Replace with:
      Code:
      			$vault->parser['current_template'] = $title;
      
      			if ($this->parser->recursion['template'] == 1 AND !$this->parser->options['do_html'])
      Reply Reply  
    4. June 28, 2009 3:11 PM
      tommythejoat tommythejoat is offline
      Regular Member
      Code:
      		$threadtitle = $this->link['data']['threadtitle'];
      		$linktitle = htmlspecialchars_uni($this->link['data']['title'];)
      May I assume that the ";)" is a typo?
      Reply Reply  
    5. June 28, 2009 4:36 PM
      tommythejoat tommythejoat is offline
      Regular Member
      The code in special_plugins_bbcode.php differs from your example it is:
      Code:
      	if (empty($linkid) AND is_array($vbulletin->vaultlist["$nsid"]))
      	{
      		$option = preg_replace('#\%23#', '#', $option);
      		$option = preg_replace('#\%26#', '&', $option);
      		$fetch_option = strtolower($option);
      I think this is the code segment you are talking about, but I need a confirmation that adding the code to this module will work.

      This is 3.2.1.
      Reply Reply  
    6. June 28, 2009 6:17 PM
      pegasus pegasus is offline
      VaultWiki Team
      That looks like the place.
      Reply Reply  
    7. June 28, 2009 11:13 PM
      tommythejoat tommythejoat is offline
      Regular Member
      Thank you.

      It seems ok now. The links turn blue if the post is edited and the vault_link table is remaining empty. I have not tried any new ampersand article names.

      I did not do the html fix because we do not allow html from any but admins in notices.
      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:11 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.