Fixed Error when importing from vb4: Received Invalid utf-8 for string column [filename]

Ivancas

Well-known member
Affected version
v2.1.10 Patch 2
I'm still having this error with the latest importer version which was marked as fixed:

The solution @Zambfd provided has worked:
Hi,

it is still broken when the source forum is iso-8859-1 and there are umlauts in the description of an attachment (settings field in attachment table).
I've added the following code to line 3396ff in /addons/XFI/Import/Importer/vBulletin.php
PHP:
if ( isset($settings['title']) ) {
   $settings['title'] = $this->convertToUtf8($settings['title']);
}
if ( isset($settings['description'])) {
   $settings['description'] = $this->convertToUtf8($settings['description']);
}

More information about my case is here:
 
There is indeed still a bug in the importer that does cause an exception:
Method rewriteEmbeddedAttachments is missing a few calls to convertToUtf8 when handling settings (title, URL, etc.) for inline attachments.

PHP:
$attributes['alt'] = $this->convertToUtf8($settings['title']);

PHP:
$description = preg_replace( '/[\r\n]/', ' ', $this->convertToUtf8($settings['description']));

PHP:
$attributes['align'] = $this->convertToUtf8($settings['alignment']);

PHP:
$attach = "[URL='" . $this->convertToUtf8($settings['linkurl']) . "']" . $attach . '[/URL]';
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFI release (1.3.3).

Change log:
Convert vBulletin attachment settings to UTF-8
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom