• 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
    • data loss: .attach files are not created on designated filepath when being imported from mediawiki

    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: data loss: .attach files are not created on designated filepath when being imported from mediawiki

    • Issue Tools
      • View Changes
    1. issueid=2478 October 2, 2011 12:18 PM
      Lord Doys Lord Doys is offline
      Junior Member
      data loss: .attach files are not created on designated filepath when being imported from mediawiki
      data loss: .attach files are not created on designated filepath when being imported from mediawiki

      I am using a local filepath for my downloads and attachments instead of the database (due to performance issues)

      When trying to add an image manually to the wiki, the .attach file is created. (works perfectly!)

      BUT when importing them from media wiki.. all the entries are made in the attachment table.. but no .attach file is created in the given directory

      thus getting the error:
      Code:
      Warning: fopen(C:/xampp/htdocs/forums/downloads/3/409.attach) [function.fopen]: failed to open stream: No such file or directory in [path]\attachment.php on line 252
      i have double checked all the path setting and all seems ok.

      attachment path:
      Code:
      C:/xampp/htdocs/forums/downloads
      mediawiki.php in vault/import/config
      Code:
      # full URL path to your wiki image directory, including trailing slash
      $vault->config['imgpath']		= 'http://localhost/forums/brwiki/images/';
      gives a nice:
      Code:
      Index of /forums/brwiki/images
      
          Parent Directory
          0/
          1/
          2/
      etc..
    Issue Details
    Issue Number 2478
    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.15
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags Import


    Page 1 of 2 12 Next LastLast


    1. October 2, 2011 12:45 PM
      Lord Doys Lord Doys is offline
      Junior Member
      I just checked the /tmp forlder where php creates the temp uploads, and that looks nicely..
      the files are created like vbuF1D6.tmp and you see them come and go..
      only thing is ..where they go
      Reply Reply  
    2. October 2, 2011 3:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      The importer is trying to upload the image via the URL using vBulletin's uploader. To test this particular upload type:
      1. In the navbar, click "Upload New File"
      2. Enter the filename.
      3. Scroll down and click "Manage Attachments".
      4. In the Attachment Manager, click "Add Files".
      5. At the top you will see "Upload Files from Your Computer | Website". Click "Website".
      6. Enter the localhost URL to one of the images that should have been imported.
      Are you able to upload it this way?
      Reply Reply  
    3. October 2, 2011 3:19 PM
      Lord Doys Lord Doys is offline
      Junior Member
      just tested it, and works fine

      i put a new image in the old wiki image dir, pointed to there through http://localhost .. and uploaded as intended
      Reply Reply  
    4. October 2, 2011 3:27 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please try to upload one of the same images that was supposed to import but failed.
      Reply Reply  
    5. October 2, 2011 3:48 PM
      Lord Doys Lord Doys is offline
      Junior Member
      Quote Originally Posted by pegasus
      Please try to upload one of the same images that was supposed to import but failed.
      when entering the name of the PNG of one-of-the-supposed image in the new file upload dialog box, it took me straight to the page that was created during the import.
      straight to the edit screen.

      i removed the old not working one

      again.. when using
      Code:
      http://localhost/forums/brwiki/images/0/00/Barak_Wohlken.png
      it worked like a charm
      Reply Reply  
    6. October 2, 2011 3:50 PM
      Lord Doys Lord Doys is offline
      Junior Member
      Quote Originally Posted by Lord Doys
      when entering the name of the PNG of one-of-the-supposed image in the new file upload dialog box, it took me straight to the page that was created during the import.
      straight to the edit screen.

      i removed the old not working one

      again.. when using
      Code:
      http://localhost/forums/brwiki/images/0/00/Barak_Wohlken.png
      it worked like a charm
      i double checked my config file again, should be ok
      Code:
      # full URL path to your wiki image directory, including trailing slash
      $vault->config['imgpath']		= 'http://localhost/forums/brwiki/images/';
      Reply Reply  
    7. October 3, 2011 5:13 AM
      Lord Doys Lord Doys is offline
      Junior Member
      I am running a full scale conversion again, now with all namespaces in place and at the same time.
      still converting the 80k history pages, but at the looks of it the images are still not placed on the FileSystem
      Reply Reply  
    8. October 3, 2011 3:07 PM
      pegasus pegasus is offline
      VaultWiki Team
      To debug the next import attempt. In vault/import/mediawiki.php, find:
      Code:
      		$attachid = $upload->process_upload($attachment);
      Add after:
      Code:
      if ($upload->errors) {
      var_dump($upload->errors);
      exit;
      }
      Let me know what kind of output you get.
      Reply Reply  
    9. October 4, 2011 4:10 AM
      Lord Doys Lord Doys is offline
      Junior Member
      Quote Originally Posted by pegasus
      To debug the next import attempt. In vault/import/mediawiki.php, find:
      Code:
      		$attachid = $upload->process_upload($attachment);
      Add after:
      Code:
      if ($upload->errors) {
      var_dump($upload->errors);
      exit;
      }
      Let me know what kind of output you get.
      after adjusting the file and running the images again (restored the vb attachments tables first and pruned the wiki image forum)
      no error at all..
      Reply Reply  
    10. October 4, 2011 1:47 PM
      pegasus pegasus is offline
      VaultWiki Team
      In your wiki, go to Special pages > Oldest Pages (Special:Ancientpages), and sort by the Image namespace. Starting at the top, check if the very first image was created. If it was, how many images from #1 before they stopped being created?

      Also, I apologize, it seems I made a mistake yesterday. The errors property of the upload object is actually different from every other data manager in vB -- it's singular:
      [code]
      Code:
      if ($upload->error) {
      var_dump($upload->error);
      exit;
      }
      Reply Reply  
    11. October 5, 2011 11:46 AM
      Lord Doys Lord Doys is offline
      Junior Member
      Quote Originally Posted by pegasus
      In your wiki, go to Special pages > Oldest Pages (Special:Ancientpages), and sort by the Image namespace. Starting at the top, check if the very first image was created. If it was, how many images from #1 before they stopped being created?

      Also, I apologize, it seems I made a mistake yesterday. The errors property of the upload object is actually different from every other data maanger in vB -- it's singular:
      [code]
      Code:
      if ($upload->error) {
      var_dump($upload->error);
      exit;
      }
      Showing 50 results of 1288 starting with #1.
      View (previous 50) (next 50) (20 | 50 | 100 | 250 | 500).
      1. Brlogo.gif (06:14 PM, 11-14-2006)
      etc etc...

      when i click on Brlogo i am taken to the imagepage

      Image:brlogo.gif

      Rate This Page
      brlogo.gif (File Size: 39.76 KB, MIME type: image/gif)
      [hide] - [top]Links
      The following pages link to this file:
      Cover page

      but then.. when i click on brlogo.gif, i get the error:
      Code:
      Warning: fopen(C:/xampp/htdocs/forums/downloads/3/393.attach) [function.fopen]: failed to open stream: No such file or directory in [path]\attachment.php on line 252
      gonna run the script now
      Reply Reply  
    12. October 5, 2011 12:20 PM
      Lord Doys Lord Doys is offline
      Junior Member
      ok this is weird....i got no explanation for this:

      it created 240 images BEFORE it came with an error... the error is: string(11) "Invalid URL"

      but here comes the funny part:

      if i look at the oldest pages again, now it DID create some images.

      the first 20 in the list give the error i mentioned before, the the other 220! images are created like they should??

      so i was doubting to see if maybe some images werent downloaded to my HD.. or perhaps even dissapeared from the live server.

      so taking the logo example again: brlogo.gif

      live: http://www.birthright.net/brwiki/images/8/80/Brlogo.gif check
      live page: http://www.birthright.net/brwiki/ind...age:Brlogo.gif check (although it is redirecting to File:Brlogo)
      wiki img folder on hd: C:\xampp\htdocs\forums\brwiki\images\8\80Brlogo.gif check

      so i have really no clue why the first 20 are "blanks" then 220 are created like they are supposed to (they werent created in previous attemps...).. en THEN come with an error string(11) "Invalid URL"
      Reply Reply  
    13. October 5, 2011 2:48 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, make sure that localhost is configured to listen to HEAD requests. The vB uploader sends a request of type HEAD before uploading the file and if the request fails, we get an "Invalid URL" error. I already know that HEAD requests are declined by my server, so this is a possibility.

      Make sure also that the server isn't configured to deny HTTP requests to a user when the user makes them too close together. Image importing is going to make over 200 requests per second, and if the server refuses the connection, it won't be able to read the image.
      Reply Reply  
    14. October 5, 2011 4:12 PM
      Lord Doys Lord Doys is offline
      Junior Member
      ok there stops my knowledge, where do i check that?
      i am using xampp for local dev
      Reply Reply  
    15. October 6, 2011 4:08 PM
      Lord Doys Lord Doys is offline
      Junior Member
      i have located some of the errors:

      Code:
      [Thu Oct 06 21:26:52 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/f/fd/M\xfcden.png HTTP/1.0 to file
      [Thu Oct 06 21:33:03 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/8/82/Spears_of_Cuira\xe9cen.png HTTP/1.0 to file
      [Thu Oct 06 21:36:32 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/e/e5/Evershr\xfcden.png HTTP/1.0 to file
      [Thu Oct 06 21:45:31 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/9/9c/G\xfcnther_Brandt.png HTTP/1.0 to file
      [Thu Oct 06 21:45:52 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/4/49/Ber_Fala\xefa.png HTTP/1.0 to file
      [Thu Oct 06 21:46:20 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/c/c4/Ghour\xedn.png HTTP/1.0 to file
      [Thu Oct 06 21:46:28 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/d/dc/Ras_Dheired\xedn.png HTTP/1.0 to file
      [Thu Oct 06 21:47:23 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/4/45/El-Fey\xedn.png HTTP/1.0 to file
      [Thu Oct 06 21:47:25 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/8/87/Iz\xe9das.png HTTP/1.0 to file
      [Thu Oct 06 21:49:06 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/1/15/Besa\xefam.png HTTP/1.0 to file
      [Thu Oct 06 21:51:26 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/d/d2/Sari_bint_B\xe9dize.png HTTP/1.0 to file
      [Thu Oct 06 22:00:26 2011] [error] [client 127.0.0.1] (22)Invalid argument: Cannot map GET /forums/brwiki/images/a/aa/Fh\xedrda.png HTTP/1.0 to file
      it are images with special characters in the name... any solution for this?
      Reply Reply  
    Page 1 of 2 12 Next LastLast
    + 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 5:23 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 © 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.