MyBB Community Forums

Full Version: Did a merge from Vbulletin 4.2.5 to 1.8.20
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The merge went very well all the way until my attachments.
No attachments were moved. 

My question is as follow,
can I run just the attachment module in the merge script?
Or is there another way to merge the attachments.

There's some 800mb of images.
Usually if there's no attachment being imported, there might be a misconfiguration on the path of attachment storage in Merge and/or bad reading permission on attachment storage for Merge. Check debuglogs table in your MyBB database for details.

I read vbb 4 has different attachment storages such as db, old & new, which complicates a little more on debugging.

(2019-10-10, 07:17 PM)leeman Wrote: [ -> ]My question is as follow,
can I run just the attachment module in the merge script?
Or is there another way to merge the attachments.

No, you shouldn't run the import_attachment module separately, otherwise the imported attachments will not be assigned to any post/thread.

AFAIK, there's no better way for importing attachments.
Hmm I tried a second and third run but I don't get my attachments moved...
I have tripple checked, the storage paths are correct.
The module for attachments takes a long time to run...

Hmm does the migration tool take in the image size limit when moving the attachments?
If yes, then that can be a culprit since I have allowed little bigger images in my VBulletin forum.

I have the latest version of MyBB 1.8.21 (not 1.8.20 as I wrote in thread start)...
Appended the error log.
(2019-10-17, 05:28 AM)leeman Wrote: [ -> ]Hmm I tried a second and third run but I don't get my attachments moved...
I have tripple checked, the storage paths are correct.
The module for attachments takes a long time to run...

Hmm does the migration tool take in the image size limit when moving the attachments?
If yes, then that can be a culprit since I have allowed little bigger images in my VBulletin forum.

I have the latest version of MyBB 1.8.21 (not 1.8.20 as I wrote in thread start)...
Appended the error log.

The import_attachments will take a very long time because for each attachment the importer will check all your imported posts for altering the attachment code.

The log file specifically indicates:
Errors
------
The following errors were logged during the process of the Merge System:
Attachments:
	Error could not find the attachment (ID: 2234)
(...)


It should mean that the importer cannot find the attachment files, either from the attachment path the importer can't access or read.
(2019-10-17, 08:32 AM)noyle Wrote: [ -> ]
(2019-10-17, 05:28 AM)leeman Wrote: [ -> ]Hmm I tried a second and third run but I don't get my attachments moved...
I have tripple checked, the storage paths are correct.
The module for attachments takes a long time to run...

Hmm does the migration tool take in the image size limit when moving the attachments?
If yes, then that can be a culprit since I have allowed little bigger images in my VBulletin forum.

I have the latest version of MyBB 1.8.21 (not 1.8.20 as I wrote in thread start)...
Appended the error log.

The import_attachments will take a very long time because for each attachment the importer will check all your imported posts for altering the attachment code.

The log file specifically indicates:
Errors
------
The following errors were logged during the process of the Merge System:
Attachments:
	Error could not find the attachment (ID: 2234)
(...)


It should mean that the importer cannot find the attachment files, either from the attachment path the importer can't access or read.

OK I will look into the rights ....
(2019-10-17, 02:12 PM)leeman Wrote: [ -> ]
(2019-10-17, 08:32 AM)noyle Wrote: [ -> ]
(2019-10-17, 05:28 AM)leeman Wrote: [ -> ]Hmm I tried a second and third run but I don't get my attachments moved...
I have tripple checked, the storage paths are correct.
The module for attachments takes a long time to run...

Hmm does the migration tool take in the image size limit when moving the attachments?
If yes, then that can be a culprit since I have allowed little bigger images in my VBulletin forum.

I have the latest version of MyBB 1.8.21 (not 1.8.20 as I wrote in thread start)...
Appended the error log.

The import_attachments will take a very long time because for each attachment the importer will check all your imported posts for altering the attachment code.

The log file specifically indicates:
Errors
------
The following errors were logged during the process of the Merge System:
Attachments:
 Error could not find the attachment (ID: 2234)
(...)


It should mean that the importer cannot find the attachment files, either from the attachment path the importer can't access or read.

OK I will look into the rights ....

The real issue is not easy to track.

I think you could do some scripting to log the attachment URL for importing to database.

In this Merge's file ./merge/boards/vbulletin4/attachments.php, before this line (return parent::get_file_data($unconverted_data);), add following code:
global $import_session;
$att_url = $import_session['uploadspath'].$this->generate_raw_filename($unconverted_data);
$this->debug->log->datatrace('ATTACHMENT-URL', $deb);
Then the get_file_data() function should look like:
	function get_file_data($unconverted_data)
	{
		if($this->attach_storage == ATTACH_AS_DB)
		{
			return $unconverted_data['filedata'];
		}
		global $import_session;
		$att_url = $import_session['uploadspath'].$this->generate_raw_filename($unconverted_data);
		$this->debug->log->datatrace('ATTACHMENT-URL', $att_url);
		return parent::get_file_data($unconverted_data);
	}

Try to import several attachments (maybe 5 or 9?), and go to your database, look in the TBPRE_debuglogs table (replace TBPRE with your table prefix) for the logged records for text ATTACHMENT-URL and hopefully you'll get what the real URL of an attachment is.
Well it skipped like 1000 attachments and I just said *beep* it...
It's the written word that's important and the users are fine with it.

Up and running..... Smile
Thanks to you who tried to help.