Strange. It's definitely not working for me on my test site with XF 2.2.1 and XFMG 2.2.0. If I upload an image with metadata to the gallery then the metadata is displayed, but if I attach the same image to a mirrored forum the metadata is not displaying.The metadata is working fine for me, both from uploading into a media gallery category and uploading into a mirrored forum (XF 2.2.1 and XFMG 2.2.0)
call in
\XFMG:Media\MirrorManager::insertAttachmentExif` service fails. When json_last_error_msg()
is added to get a meaningful message on why this is failing, it returns "Malformed UTF-8 characters, possibly incorrectly encoded". if ($exif)
{
$this->db()->insert('xf_mg_attachment_exif', [
'attachment_id' => $attachment->attachment_id,
'attach_date' => $attachment->attach_date,
'exif_data' => json_encode($exif)
], false, 'exif_data = VALUES(exif_data)');
}
if ($exif)
{
$this->db()->insert('xf_mg_attachment_exif', [
'attachment_id' => $attachment->attachment_id,
'attach_date' => $attachment->attach_date,
'exif_data' => $this->em()->encodeValueForSource(\XF\Mvc\Entity\Entity::JSON, $exif)
], false, 'exif_data = VALUES(exif_data)');
}
Yup, you're right.Yes, but the EXIF data has already been captured in the FileWrapper.
There may be a delay before changes are rolled out to the XenForo Community.When inserting EXIF data from mirrored attachments, avoid JSON encoding errors with malformed characters.
Awesome, many thanks @TickTackk
I've made that change to /src/addons/XFMG/Service/Media/MirrorManager.php and it now appears to be working correctly
We use essential cookies to make this site work, and optional cookies to enhance your experience.