• 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
    • build 003 upload image works, file not attached to post

    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: build 003 upload image works, file not attached to post

    • Issue Tools
      • View Changes
    1. issueid=2490 October 12, 2011 12:41 PM
      Lord Doys Lord Doys is offline
      Junior Member
      build 003 upload image works, file not attached to post
      build 003 upload image works, file not attached to post

      Doing a fresh conversion with the 003 build i noticed that the images are uploaded to the local fileserver, the pages are created, but the images are not attached.

      the conversion is still running, so my question is, are they going to be attached later (at the end of all page creations?) or should they have been attached already?
    Issue Details
    Issue Number 2490
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Importing
    Status Fixed
    Priority 1 - Security / Login / Data Loss
    Affected Version 3.0.14
    Fixed Version 3.0.14
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags Import




    1. October 12, 2011 5:12 PM
      pegasus pegasus is offline
      VaultWiki Team
      No they won't be attached later which is annoying, but at least this time they made it to your file system.

      It looks like the following is necessary. In vault/import/mediawiki.php, find:
      Code:
      			$page['attachid'] = $this->forge_attachment($page);
      Add after:
      Code:
      			$page['attach'] = 1;
      We rearranged the code from your previous reports so the pages would stop being created if the image wasn't even uploaded, but it looks like another flag was needed to sync the two tables (although I'm sure the postdata_presave plugin should have handled this).

      By the looks of it, you shouldn't need to reimport. If you can run the following database query, it should sync up:
      Code:
      UPDATE post AS post
      LEFT JOIN thread AS thread ON (thread.threadid = post.threadid AND post.postid = thread.firstpostid)
      SET post.attach =1, thread.attach =1
      WHERE thread.forumid = {ID OF YOUR IMAGE FORUM}
      Reply Reply  
    2. October 12, 2011 6:23 PM
      Lord Doys Lord Doys is offline
      Junior Member
      thanks for the update
      i ran
      Code:
      2506 rij(en) bijgewerkt. ( Query duurde 1.2837 sec )
      UPDATE vb3_post AS post LEFT JOIN vb3_thread AS thread ON ( thread.threadid = post.threadid AND post.postid = thread.firstpostid ) SET post.attach =1,
      thread.attach =1 WHERE thread.forumid =35
      2506 rows were updated.. but still no image attached to the posts.

      gonna hit the sack now, will investigate tomorrow again
      Reply Reply  
    3. October 13, 2011 3:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      K we have to sync both sides it seems:
      Code:
      UPDATE attachment AS a
      SET a.contentid = (
      SELECT post.postid
      FROM post AS post
      LEFT JOIN vault_list AS vlist ON (vlist.threadid = post.threadid)
      WHERE vlist.namespaceid = {IMAGE NAMESPACE ID}
      AND a.filename = vlist.title_enc
      )
      WHERE a.contentid = 0
      To get the IMAGE NAMESPACE ID, check AdminCP > VaultWiki > Namespace Manager.

      If this isn't enough to re-link the attachments to their posts, I would re-import the namespace (having made the file edit in my previous post). It's possible that a cron job already deleted the unlinked entries.
      Reply Reply  
    4. October 13, 2011 5:53 PM
      Lord Doys Lord Doys is offline
      Junior Member
      This morning i reimported the images namespace, and everything (most of it) seem to go well (after the adjustment made to the script)
      I still have not figured out why the first 20 or so are not imported.. the images arent corrupted.
      Even deleting the image page, and recreating it still didnt upload the image.. (kept same attach file ID)
      Eventually i deleted all entries in the vb refering the attach file number, and then recreated the page.. and the image was uploaded and attached like it should.
      Really blows my head of why it isnt created in the first place..
      I am running the convert legacy code now (gonna take over night to complete) will see into the other changes you made to 003.

      As for now, i will leave the images as they are.
      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 6:52 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.