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
Almost got it, only one item left for success.
Collapse
X
-
Tags: None
-
Are your attachments in the file system or in the database? They must be in the database.
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 -
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
-
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
-
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?Comment
-
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 pathComment
-
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:Comment
-
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, '" . [color=red]addslashes([/color]$caption[color=red])[/color] . "', '" . $state . "', " . intval($content['contentid']) . ", " . $filedataid . ", $contenttypeid, '" . addslashes($this->get_value('nonmandatory', 'settings')) . "', " . intval($this->get_value('nonmandatory', 'displayorder')) . " ) ");
👍 1Comment
-
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, '" . [COLOR=red]addslashes([/COLOR]$caption[COLOR=red])[/COLOR] . "', '" . $state . "', " . intval($content['contentid']) . ", " . $filedataid . ", $contenttypeid, '" . addslashes($this->get_value('nonmandatory', 'settings')) . "', " . intval($this->get_value('nonmandatory', 'displayorder')) . " ) ");
Comment
-
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
-
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:
Comment
-
-
Comment
-
Ok, My host increased the max_allowed_packet and I restarted the import when I received this error during the attachments import.
Code:[B]Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 75672839 bytes) in[B]/home/micompan/public_html/vbforum/impex/ImpExDatabaseCore.php on line [B]1749 [/B][/B][/B]
Any ideas for this one?Comment
-
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 helpComment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment