• 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
    • you are trying to view an edit that does not belong to this page, or has no edit to show

    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: you are trying to view an edit that does not belong to this page, or has no edit to show

    • Issue Tools
      • View Changes
    1. issueid=2119 December 4, 2010 9:54 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      you are trying to view an edit that does not belong to this page, or has no edit to show

      When trying to compare edits in some articles, I get the message:
      you are trying to view an edit that does not belong to this page, or has no edit to show
    Issue Details
    Issue Number 2119
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category History / Revisions
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 3.0.7
    Fixed Version 3.0.8
    Milestone VaultWiki 3.0.8
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. December 5, 2010 1:05 AM
      pegasus pegasus is offline
      VaultWiki Team
      I can see this happening only in imported articles when using the (cur) (last) links. Otherwise, it looks like the error would be valid. To fix the (cur) (last) in imported articles, edit vault/functions/history.php. Find:
      Code:
      			ORDER BY revisionid $sortorder
      Replace with:
      Code:
      			ORDER BY dateline $sortorder
      Reply Reply  
    2. December 12, 2010 12:22 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      This did not resolve it. Please see the other report.
      Reply Reply  
    3. December 12, 2010 1:18 PM
      pegasus pegasus is offline
      VaultWiki Team
      Got it. When using the next/prev keywords, VaultWiki was trying to resolve the keyword using the known revision ID as a reference, rather than the known ID's edit-time. In imported wikis, the IDs are not necessarily in time order, so this caused issues when the reference edit had the highest or lowest ID for a given article.
      Reply Reply  
    4. December 12, 2010 3:52 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Great. How do I fix this?
      Reply Reply  
    5. December 12, 2010 4:37 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/functions/history.php, find:
      Code:
      		$fetch_revisionid = $db->query_first_slave("
      			SELECT revisionid
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE threadid = " . intval($threadinfo['threadid']) . "
      				AND revisionid $sign $revisionid
      				" . (!$canrollback ? "AND pending = 0" : "") . "
      			ORDER BY revisionid $sortorder
      			LIMIT 1
      		");
      Replace with:
      Code:
      		$ref = $db->query_first_slave("
      			SELECT dateline
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE revisionid = " . intval($revisionid) . "
      			LIMIT 1
      		");
      
      		$fetch_revisionid = $db->query_first_slave("
      			SELECT revisionid
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE threadid = " . intval($threadinfo['threadid']) . "
      				AND dateline $sign " . intval($ref['dateline']) . "
      				" . (!$canrollback ? "AND pending = 0" : "") . "
      			ORDER BY dateline $sortorder
      			LIMIT 1
      		");
      Find:
      Code:
      	if ($direction != '')
      	{
      		if ($direction == 'next')
      		{
      			$sign = '>';
      			$sortorder = 'ASC';
      		}
      		else if ($direction == 'prev')
      		{
      			$sign = '<';
      			$sortorder = 'DESC';
      		}
      	}
      	else
      	{
      		$sign = '=';
      		$sortorder = 'ASC';
      	}
      
      	$revision = $db->query_first_slave("
      		SELECT revision.*, user.username
      			$hook_query_fields
      		FROM " . TABLE_PREFIX . "vault_revision AS revision
      		LEFT JOIN " . TABLE_PREFIX . "user AS user ON (revision.userid = user.userid)
      		$hook_query_joins
      		WHERE revision.revisionid $sign " . intval($revisionid) . "
      			AND revision.threadid = " . intval($threadinfo['threadid']) . "
      			" . (!$canrollback ? "AND revision.pending = 0" : "") . "
      		ORDER BY revision.dateline $sortorder
      	");
      Replace with:
      Code:
      	if ($direction != '')
      	{
      		if ($direction == 'next')
      		{
      			$sign = '>';
      			$sortorder = 'ASC';
      		}
      		else if ($direction == 'prev')
      		{
      			$sign = '<';
      			$sortorder = 'DESC';
      		}
      
      		$ref = $db->query_first_slave("
      			SELECT dateline
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE revisionid = " . intval($revisionid) . "
      			LIMIT 1
      		");
      
      		$hook_query_where = "dateline $sign " . intval($ref['dateline']);
      	}
      	else
      	{
      		$sortorder = 'ASC';
      		$hook_query_where = "revisionid = " . intval($revisionid);
      	}
      
      	$revision = $db->query_first_slave("
      		SELECT revision.*, user.username
      			$hook_query_fields
      		FROM " . TABLE_PREFIX . "vault_revision AS revision
      		LEFT JOIN " . TABLE_PREFIX . "user AS user ON (revision.userid = user.userid)
      		$hook_query_joins
      		WHERE revision.$hook_query_where
      			AND revision.threadid = " . intval($threadinfo['threadid']) . "
      			" . (!$canrollback ? "AND revision.pending = 0" : "") . "
      		ORDER BY revision.dateline $sortorder
      		LIMIT 1
      	");
      Reply Reply  
    6. December 12, 2010 5:10 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      This results in this Fatal error:
      http://www.vaultwiki.org/issues/2150/
      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 10:36 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.