• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Add new EXIF error

boban

Well-known member
#1
Got the following EXIF error

1. Add new EXIF value "EXIF Flash {value}"
2. Rebuild EXIF Data


media_exif_data_cache column

Code:
a:13:{s:8:"FileSize";a:3:{s:4:"name";s:8:"FileSize";s:5:"value";s:6:"101677";s:6:"format";s:26:"{xen:number {value}, size}";}s:8:"MimeType";a:3:{s:4:"name";s:8:"MimeType";s:5:"value";s:10:"image/jpeg";s:6:"format";s:7:"{value}";}s:5:"Width";a:3:{s:4:"name";s:5:"Width";s:5:"value";s:4:"1600";s:6:"format";s:9:"{value}px";}s:6:"Height";a:3:{s:4:"name";s:6:"Height";s:5:"value";s:4:"1066";s:6:"format";s:9:"{value}px";}s:15:"ApertureFNumber";a:3:{s:4:"name";s:15:"ApertureFNumber";s:5:"value";s:5:"f/2.8";s:6:"format";s:7:"{value}";}s:4:"Make";a:3:{s:4:"name";s:4:"Make";s:5:"value";s:5:"Canon";s:6:"format";s:7:"{value}";}s:5:"Model";a:3:{s:4:"name";s:5:"Model";s:5:"value";s:14:"Canon EOS 450D";s:6:"format";s:7:"{value}";}s:8:"Software";a:3:{s:4:"name";s:8:"Software";s:5:"value";s:29:"Adobe Photoshop CS6 (Windows)";s:6:"format";s:7:"{value}";}s:16:"DateTimeOriginal";a:3:{s:4:"name";s:16:"DateTimeOriginal";s:5:"value";s:19:"2011:05:15 11:45:10";s:6:"format";s:7:"{value}";}s:12:"ExposureTime";a:3:{s:4:"name";s:12:"ExposureTime";s:5:"value";s:5:"1/160";s:6:"format";s:11:"{value} sec";}s:15:"ISOSpeedRatings";a:3:{s:4:"name";s:15:"ISOSpeedRatings";s:5:"value";s:3:"640";s:6:"format";s:11:"ISO {value}";}s:11:"FocalLength";a:3:{s:4:"name";s:11:"FocalLength";s:5:"value";s:4:"60/1";s:6:"format";s:23:"{xen:calc '{value}'} mm";}s:5:"Flash";a:3:{s:4:"name";s:5:"Flash";s:5:"value";s:2:"16";s:6:"format";s:7:"{value}";}}
3. Viewe media:

Code:
Error Info
ErrorException: Array to string conversion - library\XenGallery\Model\Media.php:1067
Generated By: boban, A moment ago
Stack Trace

#0 C:\Users\beke_000\Documents\www\library\XenGallery\Model\Media.php(1067): XenForo_Application::handlePhpError(8, 'Array to string...', 'C:\\Users\\beke_0...', 1067, Array)
#1 C:\Users\beke_000\Documents\www\library\XenGallery\ControllerPublic\Media.php(163): XenGallery_Model_Media->prepareMediaExifData(Array)
#2 C:\Users\beke_000\Documents\www\library\XenForo\FrontController.php(347): XenGallery_ControllerPublic_Media->actionView()
#3 C:\Users\beke_000\Documents\www\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 C:\Users\beke_000\Documents\www\index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(57) "http://127.0.0.1/media/altolamprologus-compressiceps.543/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

1. Delete value EXIF value "EXIF Flash {value}"
2. Rebuild EXIF Data


Code:
Error Info
ErrorException: Array to string conversion - library\XenGallery\Model\Media.php:1067
Generated By: boban, A moment ago
Stack Trace

#0 C:\Users\beke_000\Documents\www\library\XenGallery\Model\Media.php(1067): XenForo_Application::handlePhpError(8, 'Array to string...', 'C:\\Users\\beke_0...', 1067, Array)
#1 C:\Users\beke_000\Documents\www\library\XenGallery\Model\Media.php(2858): XenGallery_Model_Media->prepareMediaExifData(Array)
#2 C:\Users\beke_000\Documents\www\library\XenGallery\Deferred\Exif.php(32): XenGallery_Model_Media->rebuildExifDataForMedia(Array)
#3 C:\Users\beke_000\Documents\www\library\XenForo\Model\Deferred.php(256): XenGallery_Deferred_Exif->execute(Array, Array, 7.9999990463257, '')
#4 C:\Users\beke_000\Documents\www\library\XenForo\Model\Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999990463257, '', false)
#5 C:\Users\beke_000\Documents\www\library\XenForo\Model\Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 C:\Users\beke_000\Documents\www\library\XenForo\ControllerAdmin\Tools.php(159): XenForo_Model_Deferred->run(true, NULL, '', false)
#7 C:\Users\beke_000\Documents\www\library\XenForo\FrontController.php(347): XenForo_ControllerAdmin_Tools->actionRunDeferred()
#8 C:\Users\beke_000\Documents\www\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 C:\Users\beke_000\Documents\www\admin.php(13): XenForo_FrontController->run()
#10 {main}

Request State

array(3) {
  ["url"] => string(45) "http://127.0.0.1/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(56) "http://127.0.0.1/admin.php?xengallery/rebuilds&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
Home CP Error: There are manual rebuild processes that have been stopped before completion. Click here to complete them.

To go around the problem I updated xengallery_media table

UPDATE xengallery_media SET media_exif_data_cache = ''

Any helpful suggestions would be welcome :)

Thanks
 

boban

Well-known member
#2
Clean install XenForo 1.4.4 and XenForo Media Gallery 1.0.2

Add new EXIF value "EXIF Flash {value}"
Save

Uploaded image (one only)

Information - EXIF Data

File Size: 1.4 MB

Mime Type: image/jpeg

Width:4395px

Height: 2931px

Aperture:f/3.2

Make: Canon

Model: Canon EOS 5D Mark III

Date / Time: 2014:12:10 19:31:03

Exposure Time: 1/200 sec

ISO Speed Rating: ISO 2000

Focal Length: 100 mm

xengallery_exif_title_flash: xengallery_exif_flash_Array

CP Home error

Code:
ErrorException: Array to string conversion - library\XenGallery\Model\Media.php:1084
Generated By: boban, 5 minutes ago
Stack Trace

#0 C:\Users\beke_000\Documents\www\test\library\XenGallery\Model\Media.php(1084): XenForo_Application::handlePhpError(8, 'Array to string...', 'C:\\Users\\beke_0...', 1084, Array)
#1 C:\Users\beke_000\Documents\www\test\library\XenGallery\ControllerPublic\Media.php(164): XenGallery_Model_Media->prepareMediaExifData(Array)
#2 C:\Users\beke_000\Documents\www\test\library\XenForo\FrontController.php(347): XenGallery_ControllerPublic_Media->actionView()
#3 C:\Users\beke_000\Documents\www\test\library\XenForo\FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 C:\Users\beke_000\Documents\www\test\index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(45) "http://127.0.0.1/test/index.php?media/mono.1/"
  ["_GET"] => array(1) {
    ["media/mono_1/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
View media:



Flash_array.jpg
 

boban

Well-known member
#3
Media.php Line 1084

PHP:
$media['exifData']['Flash']['value'] = new XenForo_Phrase('xengallery_exif_flash_' . $media['exifData']['Flash']);
replace with:

PHP:
$media['exifData']['Flash']['value'] = new XenForo_Phrase('xengallery_exif_flash_' . $media['exifData']['Flash']['value']);
Result is: engallery_exif_title_flash Flash did not fire, compulsory flash mode.