Announcement

Collapse
No announcement yet.

Almost got it, only one item left for success.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Almost got it, only one item left for success.

    I am so close to 100% successful import. My last hurdle has me scratching my head. For some reason I am not able to import attachments from any posts. I am importing from a test database of smf 2.0.2

  • #2
    Are your attachments in the file system or in the database? They must be in the database.

    https://www.vbulletin.com/docs/html/impex_attachments

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      Thank you for the quick response. I do not think smf gives the option of attachments in the database but only the file name to the attachment is stored int he database. The attachment itself is stored in a folder on the server.

      Comment


      • #4
        Is it possible to just move the current attachment folder over to a location in the vb forums and access them that way? I have a ton of attachments on my site and would hate to lose them.

        Edit: I am hoping this might work once I change the VB setup to file system instead of database? Move the attachment folder over to the new vb forum?
        Last edited by RazorsEdge; Thu 15 Mar '12, 9:10am.

        Comment


        • #5
          Originally posted by RazorsEdge View Post
          Is it possible to just move the current attachment folder over to a location in the vb forums and access them that way? I have a ton of attachments on my site and would hate to lose them.

          Edit: I am hoping this might work once I change the VB setup to file system instead of database? Move the attachment folder over to the new vb forum?
          Is it possible to do this?

          Comment


          • #6
            Make sure you have a copy of the attachments folder on the same server as the vBulletin installation. Then try to import the attachments again making sure you use the full server path to the directory when prompted, not a relative path
            Vote for:

            - *Admin Settable Paid Subscription Reminder Timeframe*
            -
            *PM - Add ability to reply to originator only*
            - Add Admin ability to auto-subscribe users to specific channel(s)
            - "Quick Route" Interface...

            Comment


            • #7
              Originally posted by Trevor Hannant View Post
              Make sure you have a copy of the attachments folder on the same server as the vBulletin installation. Then try to import the attachments again making sure you use the full server path to the directory when prompted, not a relative path
              The import system began and had me excited until it reached this error.

              ImpEx Database error


              mysql error: Invalid SQL:
              INSERT INTO attachment
              (
              importattachmentid,
              filename,
              userid,
              dateline,
              counter,
              reportthreadid,
              caption,
              state,
              contentid,
              filedataid,
              contenttypeid,
              settings,
              displayorder
              )
              VALUES
              (
              '1846',
              'My pic\'s 170.jpg',
              '1908',
              '',
              '51',
              0,
              'My pic's 170.jpg',
              'visible',
              21169,
              1203,
              1,
              '',
              0
              )



              mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's 170.jpg',
              'visible',
              21169,
              1203,
              1,
              '',
              0
              )' at line 25


              mysql error number: 1064


              Date: Monday 19th 2012f March 2012 10:09:17 PM
              Database: micompan_vbforum
              MySQL error:
              This happened during the second stage of attachment imports 1000 - 2000 attachment imports. Any insight as to what I am doing wrong?

              Comment


              • #8
                Looks like an ImpEx bug. Try editing this file:

                impex/ImpExDatabaseCore.php

                Add the red code:

                Code:
                		$Db_object->query("
                			INSERT INTO " . $tableprefix . "attachment
                			(
                				importattachmentid,
                				filename,
                				userid,
                				dateline,
                				counter,
                				reportthreadid,
                				caption,
                				state,
                				contentid,
                				filedataid,
                				contenttypeid,
                				settings,
                				displayorder
                			)
                			VALUES
                			(
                				'" . $this->get_value('mandatory', 'importattachmentid') . "',
                				'" . addslashes($this->get_value('mandatory', 'filename')) . "',
                				'" . intval($content['userid']) . "',
                				'" . $this->get_value('nonmandatory', 'dateline')  . "',
                				'" . $this->get_value('nonmandatory', 'counter')  . "',
                				0,
                				'" . addslashes($caption) . "',
                				'" . $state . "',
                				" . intval($content['contentid'])  . ",
                				" . $filedataid . ",
                				$contenttypeid,
                				'" . addslashes($this->get_value('nonmandatory', 'settings')) . "',
                				" . intval($this->get_value('nonmandatory', 'displayorder')) . "
                			)
                		");

                Comment


                • #9
                  Originally posted by Jake Bunce View Post
                  Looks like an ImpEx bug. Try editing this file:

                  impex/ImpExDatabaseCore.php

                  Add the red code:

                  Code:
                          $Db_object->query("
                              INSERT INTO " . $tableprefix . "attachment
                              (
                                  importattachmentid,
                                  filename,
                                  userid,
                                  dateline,
                                  counter,
                                  reportthreadid,
                                  caption,
                                  state,
                                  contentid,
                                  filedataid,
                                  contenttypeid,
                                  settings,
                                  displayorder
                              )
                              VALUES
                              (
                                  '" . $this->get_value('mandatory', 'importattachmentid') . "',
                                  '" . addslashes($this->get_value('mandatory', 'filename')) . "',
                                  '" . intval($content['userid']) . "',
                                  '" . $this->get_value('nonmandatory', 'dateline')  . "',
                                  '" . $this->get_value('nonmandatory', 'counter')  . "',
                                  0,
                                  '" . addslashes($caption) . "',
                                  '" . $state . "',
                                  " . intval($content['contentid'])  . ",
                                  " . $filedataid . ",
                                  $contenttypeid,
                                  '" . addslashes($this->get_value('nonmandatory', 'settings')) . "',
                                  " . intval($this->get_value('nonmandatory', 'displayorder')) . "
                              )
                          ");
                  Thanks! This fixed the problem of attachment import not finishing the operation. Thank you, I was able to import 2/3 of my attachments.

                  Comment


                  • #10
                    I can not believe I am going to ask this, but I am in the process of doing this upgrade from smf to vb4 and go live, but I have failed to remember my full server path. I am using /public_html/forums/attachments but I am not getting anything except source file not found.

                    Comment


                    • #11
                      Ok, My brain fart has gone away and I figured out what I was doing wrong with the server path. My only problem occurs during the import and I get this error.

                      Code:
                      WHERE filedataid = 151
                      					
                      
                      
                      mysql error: Got a packet bigger than 'max_allowed_packet' bytes
                      
                      
                      mysql error number: 1153
                      
                      
                      Date: Friday 11th 2012f May 2012 11:05:34 PM
                      Database: micompan_vbforum
                      MySQL error:
                      Any ideas?

                      Comment


                      • #12
                        Going to need to ask your webhost to up the max_allowed_packet

                        Comment


                        • #13
                          Originally posted by Zachery View Post
                          Going to need to ask your webhost to up the max_allowed_packet
                          Is this max allowed packet for the MySql database? I did not have this problem in all my test runs with a demo setup using the backup database.

                          Comment


                          • #14
                            Ok, My host increased the max_allowed_packet and I restarted the import when I received this error during the attachments import.

                            Code:
                            Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 75672839 bytes) in/home/micompan/public_html/vbforum/impex/ImpExDatabaseCore.php on line 1749
                            



                            Any ideas for this one?

                            Comment


                            • #15
                              That is another server error that you will need to show to your host so they can fix it.

                              Please don't PM or VM me for support - I only help out in the threads.
                              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                              Want help modifying your vbulletin forum? Head on over to vbulletin.org
                              If I post CSS and you don't know where it goes, throw it into the additional.css template.

                              W3Schools <- awesome site for html/css help

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X