• 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
    • clicking the edit button for the next section after Introduction shows the content for Introduction.

    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: clicking the edit button for the next section after Introduction shows the content for Introduction.

    • Issue Tools
      • View Changes
    1. issueid=2085 November 16, 2010 12:28 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      clicking the edit button for the next section after Introduction shows the content for Introduction.

      The title explains it all.
    Issue Details
    Issue Number 2085
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Editing / Posting Articles
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.5
    Fixed Version 3.0.6
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 16, 2010 12:37 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed. In vault/class/bbcode/fake.php, find:
      Code:
      		($hook = vBulletinHook::fetch_hook('vault_bbcode_fake')) ? eval($hook) : false;
      Add before:
      Code:
      		($hook = vBulletinHook::fetch_hook('bbcode_create')) ? eval($hook) : false;
      Find:
      Code:
      		$this->tag_list = $new_tag_list;
      Add before:
      Code:
      		foreach ($this->tag_list AS $has_option => $group)
      		{
      			foreach ($group AS $tag => $info)
      			{
      				if ($tag == 'h')
      				{
      					$new_tag_list['bbcode']["$has_option"]['h'] = array(
      						'callback' => 'handle_h',
      						'strip_empty' => false
      					);
      				}
      				else if (!$info['cycle'] OR $info['cycle'] == 'bbcode')
      				{
      					$new_tag_list['bbcode']["$has_option"]["$tag"] = array(
      						'callback' => 'handle_fake',
      						'strip_empty' => false,
      						'disable_smilies' => true,
      						'disable_wordwrap' => true,
      						'cycle' => 'bbcode'
      					);
      				}
      			}
      		}
      Find:
      Code:
      		($hook = vBulletinHook::fetch_hook('vault_template_complete')) ? eval($hook) : false;
      Add after:
      Code:
      		if ($this->recursion['level'] == 1)
      		{
      			if ($this->legacy_parser)
      			{
      				$this->set_cycle('legacy');
      				$this->get_parser_stats();
      
      				$input_text = $this->legacy_parser->parse($input_text);
      
      				$this->get_parser_stats(true);
      				$this->set_cycle();
      			}
      
      			($hook = vBulletinHook::fetch_hook('vault_legacy_complete')) ? eval($hook) : false;
      
      			if (!empty($this->tag_list['bbcode']))
      			{
      				$this->set_cycle('bbcode');
      				$this->get_parser_stats();
      
      				$input_text = $this->parse_array('bbcode', $this->fix_tags($this->build_parse_array('bbcode', $input_text)), false, false);
      
      				$this->get_parser_stats(true);
      				$this->set_cycle();
      			}
      		}
      Find:
      Code:
      		return $input_text;
      	}
      Add after:
      Code:
      	function handle_fake($text, $option = '', $fake = true)
      	{
      		if ($fake)
      		{
      			$open = ';';
      			$close = ';';
      		}
      		else
      		{
      			$open = '[';
      			$close = ']';
      		}
      
      		$info = $this->current_tag;
      		$html = $open . $info['name_orig'];
      
      		if ($info['option'])
      		{
      			$html .= '=' . $info['delimiter'] . $option . $info['delimiter'];
      		}
      
      		$html .= $close . $text . $open . '/' . $info['name_orig'] . $close;
      
      		return $html;
      	}
      
      	function handle_h($text, $option)
      	{
      		$noedit = false;
      
      		if (count($this->stack) > 1)
      		{
      			$noedit = true;
      		}
      
      		if ($option == 1)
      		{
      			$noedit = false;
      		}
      
      		if (!empty($this->current_tag['no_edit']))
      		{
      			$noedit = true;
      		}
      
      		if ($noedit)
      		{
      			return $this->handle_fake($text, $option);
      		}
      
      		return $this->handle_fake($text, $option, false);
      	}
      Reply Reply  
    2. November 16, 2010 1:03 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      When using the edit chapter function, i get this:
      Code:
      Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /forum/vault/class/bbcode/fake.php on line 398
      Reply Reply  
    3. November 16, 2010 2:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      Make sure that you did not overwrite the end of function exec_cycles -- that the closing } is still there, and that the file also still ends with a } after the newly inserted code.
      Reply Reply  
    4. November 16, 2010 7:57 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Weird. I tried it twice. The second time I took a clean version from the zip and applied the changes again. Now I get this error:
      Code:
      Fatal error: Call to undefined method vB_WikiFakeParser::handle_h() in /forum/vault/class/bbcode.php on line 1339
      Reply Reply  
    5. November 16, 2010 8:07 PM
      pegasus pegasus is offline
      VaultWiki Team
      I don't know. If you applied the last edit correctly I don't see how it can be saying that method handle_h is missing.
      Reply Reply  
    6. November 18, 2010 10:58 AM
      Alfa1 Alfa1 is offline
      Distinguished Member
      I dont understand, but either I keep doing this wrong or something is wrong with the code. My users/testers still report both errors. Please email me the edited page to exclude the possibility of editing mistakes.
      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 9:35 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.