1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 images located in old path after migrating?

Discussion in 'Installation, Upgrade, and Import Support' started by badstraw, Mar 20, 2016.

  1. badstraw

    badstraw Member

    Hey guys I recently migrated from vbulletin to xenforo in a test folder, everything seems to be working fine because I can see the attached images and everything.
    But when I click to edit a user's post and then if I click on whatever picture the user uploaded I get the old path where the real picture is located:

    http://domain.com/images/imported/2016/03/323.jpg

    Do I have to change the folder or what? The migration looks ok to me because Im able to see every single picture, but Im afraid to do the real migration on my live site because that folder doesn't exist in xenforo.

    I would really appreciate any input.
     
  2. Mike

    Mike XenForo Developer Staff Member

    Can you show what the underlying BB code is? We don't change message content for the most part. I assume it'll be an IMG tag and that isn't something we modify. If there are paths you need to change, the post content replacement add-on may help, though perhaps you just want to handle redirects via a .htaccess file in the relevant directory.
     
  3. badstraw

    badstraw Member

    Actually it doesn't show a BB code, it's just the image but It won't let me see the code unless I click on it.

    Since our members use tapatalk we installed "vB4 Import External Images" to automatically import the pictures to the server, the problem is that all the images are stored inside a folder called "imported".

    I see that xenforo migrates only the attachments, but how can I import those images?

    This is a screenshot of my test site:

    Captura de pantalla 2016-03-19 a las 10.00.00 p.m..png

    I would really appreciate your help guys!
     
    Last edited: Mar 20, 2016
  4. badstraw

    badstraw Member

    this is the code in firebug:

    Code:
    <img class="bbCodeImage LbImage" data-url="http://www.domain.com/images/imported/2016/02/305.jpg" alt="[IMG]" src="http://www.domain.com/images/imported/2016/02/305.jpg" style="">
    Can I just move the "images/imported/" folder into xenforo root folder to keep all the pictures, or they are somehow associated with the thread ID...
    If thats not possible, do I need to use a VB migration tool for that?
     
    Last edited: Mar 20, 2016
  5. Mike

    Mike XenForo Developer Staff Member

    It sounds like those are just external images. No association with anything, just bare files. There wouldn't be anything for us to import.

    The simplest thing is probably to just ensure these old URLs continue to work.
     
  6. badstraw360

    badstraw360 New Member

    Great ! So I think I can just copy that folder to the root directory just in case to preserve the files.

    What I don't understand is why those urls got transferred when I migrated the database to the test site, and why the images are shown automatically if they're not linked to anything.
     
  7. Mike

    Mike XenForo Developer Staff Member

    I'm not really following. The images are just referenced in the content of posts with those URLs; we don't generally change content when importing. There's nothing in the database related to those images; it's just like they're being linked from Photobucket, Imgur, etc.
     
  8. badstraw360

    badstraw360 New Member

    Exactly, we have a VB script that automatically imports images from external sites, we mainly use it to preserve the pictures uploaded via tapatalk since those pictures go to an external (tapatalk) server.

    Basically the script creates a folder where it automatically downloads the images to link them to the threads. As far as I know the script won't create attachments, so I thought it would be a little difficult to import those images to a live site because the migration tool only works with attachments, not folders.

    So if you're saying that the images are just referenced in the context of posts with those URLs, that means that in order to preserve the images I would need to keep the original (images/imported) folder in the server.

    I have a few gigabytes in that folder. Lots of pictures...
     
    Last edited: Mar 20, 2016
  9. Brogan

    Brogan XenForo Moderator Staff Member

    As the images already work in the XF installation, you don't need to do anything.

    Just keep the directory as is.
     
  10. badstraw360

    badstraw360 New Member

    Thanks man, again I did a test migration just to make sure that everything works, including plugins, likes and everything.

    Playing around a bit more I discovered that when I click to edit a post that has images on the recently migrated forum, I get this code depending on the thread :

    http://mydomain.com/images/imported/2016/03/660.jpg

    I deleted the image "660.jpg" from the folder images/imported/2016/03/ but I'm still seeing it on my forum and the test site at the same time.

    Since the picture hasn't been "genuinely" migrated from that folder to the test site, I think that the reason why it's showing on the new site its because some type of caching from the server, right? I'm using cloudflare.

    It may sound obvious, but I'm just making sure that I'm doing the right move..
    So... do I have to move the whole "images" folder to the new xenforo installation ?

    Thanks guys .
     
    Last edited: Mar 31, 2016
  11. Brogan

    Brogan XenForo Moderator Staff Member

    No.
    Any genuine attachments in VB are imported into XenForo and new files created within the XF directory under the data and internal_data directories.

    As Mike stated above, those are not imported attachments, just URLS in posts and won't be updated as part of the import.
    Deleting the images from the file server and leaving the post content will result in 404s if people click on them, or broken image placeholders if they are embedded.
     

Share This Page