• 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
    • New page loading from "draft"

    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: New page loading from "draft"

    • Issue Tools
      • View Changes
    1. issueid=6066 June 20, 2020 5:27 AM
      hollosch hollosch is offline
      Senior Member
      New page loading from "draft"

      When i want to create a second new page, the content of the first page is load as "Content loaded from draft" and not as an empty page.
    Issue Details
    Issue Number 6066
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Editing Pages
    Status Fixed
    Priority 1 - Security / Login / Data Loss
    Affected Version 4.1.0 RC 3
    Fixed Version 4.1.0
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 20, 2020 11:39 AM
      pegasus pegasus is offline
      VaultWiki Team
      Was the first page that you created the one that has this error: https://www.vaultwiki.org/issues/6068/

      If so, please try this again after fixing that error. It is possible it prevented your saved drafts from updating.
      Reply Reply  
    2. June 20, 2020 12:57 PM
      hollosch hollosch is offline
      Senior Member
      I fixed the lines you told,
      when i try to create a new page, the content of the previous site is present in the text-area
      Reply Reply  
    3. June 20, 2020 1:38 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, it looks like this was originally intentional, since we believed that XenForo drafts were actually "persistent", not getting removed when you submitted the post. However, it seems like we were looking in a different place (the thread creation service) than it was taking place (the forum controller). So actually XenForo drafts are not "persistent."

      In src/addons/vw/vw/_core/model/draft/xf0.php, find and remove:
      Code:
      protected $persistent = true;
      Reply Reply  
    4. June 20, 2020 1:51 PM
      hollosch hollosch is offline
      Senior Member
      After removing the code, the "draft" from the previous site is still there:

      Reply Reply  
    5. June 20, 2020 3:39 PM
      pegasus pegasus is offline
      VaultWiki Team
      Did you create a page after making the change? A draft is only cleared if you create a page or delete the draft manually.
      Reply Reply  
    6. June 20, 2020 3:42 PM
      hollosch hollosch is offline
      Senior Member
      I created this page: https://regio-portal.wiki/wiki/Jugen..._an_der_Steige
      and now i want to create a new page, but the text from previous site is still there.
      Reply Reply  
    7. June 21, 2020 10:25 AM
      expanserpb expanserpb is offline
      Junior Member
      Also getting this behaviour
      Reply Reply  
    8. June 21, 2020 1:59 PM
      pegasus pegasus is offline
      VaultWiki Team
      In src/addons/vw/vw/_core/controller/ui/edit/vw.php, find:
      Code:
      			throw $this->no_permission('vw_session_timeout');
      		}
      AFTER it, add:
      Code:
      		if (empty($caller->orig['itemid']))
      		{
      			if (!empty($caller->parent))
      			{
      				$caller->orig['parentrouteid'] = $caller->parent['routeid'];
      			}
      			else
      			{
      				$caller->orig['parentrouteid'] = $this->area['routeid'];
      			}
      		}
      After this change, my draft was deleted the next time I used it.
      Reply Reply  
    9. June 21, 2020 3:18 PM
      hollosch hollosch is offline
      Senior Member
      Same behaviour after changing file.
      Reply Reply  
    10. June 22, 2020 1:43 PM
      pegasus pegasus is offline
      VaultWiki Team
      Are you creating the page from within an area's Create link, or are you using the navbar/index Create link and selecting an area later?

      It is possible that the navbar/index route does not delete the draft. I have not tried that. There is not a XenForo example of this kind of scenario to draw on for consistency, but the behavior might still feel incorrect in some cases. On a technical note, if this is not working, perhaps we would need to explicitly pass the draft container if a draft is used, since I think that information can get lost once you choose a different area in the picker.
      Reply Reply  
    11. July 9, 2020 5:40 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed the following in the next release:
      - When creating a new page from the navbar/index route, an index-related draft is loaded. But when creating the page, the draft is deleted from the area the page finally gets saved in. In short, the draft that was used is not deleted, and a draft that was not used gets deleted.

      This fix required template changes to pass the key for the actually used draft through the form, rather than trying to guess the key after form values are possibly changed. So you may need to revert your vw_editor_page template after upgrading.
      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 3:30 PM.
    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.