• 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
    • Strange synonym creation

    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: Strange synonym creation

    • Issue Tools
      • View Changes
    1. issueid=6221 June 30, 2021 5:01 PM
      expanserpb expanserpb is offline
      Junior Member
      Strange synonym creation

      Steps taken:

      1) create a page with a prefix
      2) edit the page and remove prefix
      3) end up with page without prefix and a synonym for the page with prefix that redirects to page...with prefix...

      A prefix loop?
      https://chroniclesrp.net/Folklore/Sa...Test-redirects
    Issue Details
    Issue Number 6221
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.2
    Fixed Version 4.1.2
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 30, 2021 5:05 PM
      expanserpb expanserpb is offline
      Junior Member
      Okay it's even worse.

      It does this on EVERY name change where it tries to create a redirect.
      Reply Reply  
    2. June 30, 2021 5:07 PM
      expanserpb expanserpb is offline
      Junior Member
      Also what permission do people need to change the name of an article without creating redirects?

      I'm sorry but changing the name of an article is not a moderator/staff permission. I don't want to allow people to delete records, but do want them to be able to edit and update them and that includes the name.
      Reply Reply  
    3. June 30, 2021 10:16 PM
      pegasus pegasus is offline
      VaultWiki Team
      I don't see an obvious problem in the code, so I will try to create a synonym prefix loop locally.

      The editor currently needs "delete" permissions in order to change the title without also creating a synonym. This is because doing so removes the previous URL. Removing URLs is a higher level permission, because it has the potential to break all existing direct links.
      Reply Reply  
    4. July 1, 2021 4:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      In theory there is potential for new synonyms to steal synonyms from the target page, but I don't see how this creates a synonym loop all of a sudden, since it would require the synonym to receive the same information for both its name and its target, which never happens in any of my line-by-line tests. The code was unchanged for the past 5 years but somehow now there is a problem. Since the issue is cross-platform, it seems like a logical flaw in new PHP or MySQL releases, or possibly we are both running low on disk space or memory. But making the following edits fixed the problem for me.

      In src/addons/vw/vw/_core/controller/dm/base/routable/vw.php, find:
      Code:
      vw_DB::get()->query()->eq('targetprefixid', intval($new['prefixid']))
      Replace with:
      Code:
      vw_DB::get()->query()->eq('targetprefixid', intval($new['prefixid'])),
      vw_DB::get()->query()->eq('targetid', 0)
      In src/addons/vw/vw/_core/controller/dm/revision/vw.php, find:
      Code:
      vw_DB::get()->query()->eq('targetprefixid', intval($new['prefixid']))
      Replace with:
      Code:
      vw_DB::get()->query()->eq('targetprefixid', intval($new['prefixid'])),
      vw_DB::get()->query()->eq('targetid', 0)
      This prevents new synonyms from being able to steal synonyms from other content, which doesn't really address the underlying issue -- why it's even attempting to do that in the first place.
      Reply Reply  
    5. July 1, 2021 5:20 AM
      expanserpb expanserpb is offline
      Junior Member
      Thanks, let's give this a go
      Reply Reply  
    6. July 1, 2021 1:53 PM
      pegasus pegasus is offline
      VaultWiki Team
      I have found the reason for the loop. When saving a synonym, it verifies that the target exists and sets the target name to the existing name of the target. The problem is that during a rename, the target name is actually about to change. So the synonym gets created pointing to its own name but with the correct target ID. Then the final collections that are intended to point synonyms with no prior target to the new target if it matches, catches the synonym itself and changes the target ID to itself so that it becomes useless (with information about the originally intended target being lost forever).

      The reason that the change in my earlier post had fixed the problem was somewhat of a coincidence, because the synonym was still being created based on the pre-rename information. Escalated the issue described in my earlier post to a security issue, as it's a permissions escalation (mass-dissociating of synonyms without permission to delete synonyms).

      To fix the problem with wrong meta for new synonyms (existing affected synonyms to be fixed / removed as needed by the next upgrade), edit src/addons/vw/vw/_core/controller/dm/base/routable/vw.php. Find:
      Code:
      $redirectdm = vw_Hard_Core::controller('DM')->create('Redirect', 'SILENT');
      AFTER it, add:
      Code:
      $redirectdm->set_info('on_rename', 1);
      In src/addons/vw/vw/_core/controller/dm/redirect/vw.php, find:
      Code:
      !vw_Hard_Core::model('Node')->has_type($page, 'Island') AND
      BEFORE it, add:
      Code:
      !$this->instance->get_info('on_rename') AND
      The bug appeared in 4.0.16, which released in early 2017.
      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 8: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 © 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.