CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #28404

Automatic import of Tags from EXIF-Data leads to an exception if the EXIF Data is not encoded as UTF-8

Added by Daniel Lienert almost 2 years ago. Updated over 1 year ago.

Status:Resolved Start date:2011-07-23
Priority:Should have Due date:
Assignee:- % Done:

100%

Category:-
Target version:YAG 1.3.0
Votes: 0

Description

[Fri Jul 22 18:33:09 2011] [error] [client 192.168.1.100] Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=': SELECT tx_yag_domain_model_tag.* FROM tx_yag_domain_model_tag WHERE tx_yag_domain_model_tag.name = 'Kletterhalle Karlsruhe Hebeb\xc2\x9fhne' AND tx_yag_domain_model_tag.deleted=0 AND tx_yag_domain_model_tag.hidden=0 AND (tx_yag_domain_model_tag.starttime<=1311352380) AND (tx_yag_domain_model_tag.endtime=0 OR
tx_yag_domain_model_tag.endtime>1311352380) AND tx_yag_domain_model_tag.sys_language_uid IN (0,-1) AND tx_yag_domain_model_tag.pid IN (0) LIMIT 1 [Fri Jul 22 18:33:09 2011] [error] [client 192.168.1.100] #0
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php(239):
Tx_Extbase_Persistence_Storage_Typo3DbBackend->checkSqlErrors('SELECT
tx_yag_...')\n#1
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Persistence/Backend.php(238):
Tx_Extbase_Persistence_Storage_Typo3DbBackend->getObjectDataByQuery(Object(Tx_Extbase_Persistence_Query))\n#2
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Persistence/Manager.php(138):
Tx_Extbase_Persistence_Backend->getObjectDataByQuery(Object(Tx_Extbase_Persistence_Query))\n#3
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Persistence/QueryResult.php(133):
Tx_Extbase_Persistence_Manager->getObjectDataByQuery(Object(Tx_Extbase_Persistence_Query))\n#4
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Persistence/Repository.php(382):
Tx_Extbase_Persistence_QueryResult->getFirst()\n#5
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Domain/Model/Item.php(684):
Tx_Extbase_Persistence_Repository->__call('findOneByName', Array)\n#6
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Domain/Model/Item.php(684):
Tx_Yag_Domain_Repository_TagRepository->findOneByName('Kletterhalle
Ka...')\n#7
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Domain/Model/Item.php(645):
Tx_Yag_Domain_Model_Item->addTag(Object(Tx_Yag_Domain_Model_Tag))\n#8
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Domain/Import/AbstractImporter.php(236):
Tx_Yag_Domain_Model_Item->addTagsFromCSV('Kletterhalle Ka...')\n#9
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Domain/Import/FileImporter/Importer.php(75):
Tx_Yag_Domain_Import_AbstractImporter->importFileByFilename('/var/www/kunden...',
Object(Tx_Yag_Domain_Model_Item))\n#10
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Controller/MultifileUploadController.php(66):
Tx_Yag_Domain_Import_FileImporter_Importer->runImport()\n#11 [internal
function]:
Tx_Yag_Controller_MultifileUploadController->uploadAction(Object(Tx_Yag_Domain_Model_Album))\n#12
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php(252):
call_user_func_array(Array, Array)\n#13
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php(155):
Tx_Extbase_MVC_Controller_ActionController->callActionMethod()\n#14
/var/www/kunden/yag-gallery.de/typo3conf/ext/yag/Classes/Controller/AbstractController.php(134):
Tx_Extbase_MVC_Controller_ActionController->processRequest(Object(Tx_Extbase_MVC_Web_Request),
Object(Tx_Extbase_MVC_Web_Response))\n#15
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/MVC/Dispatcher.php(82):
Tx_Yag_Controller_AbstractController->processRequest(Object(Tx_Extbase_MVC_Web_Request),
Object(Tx_Extbase_MVC_Web_Response))\n#16
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/MVC/Web/BackendRequestHandler.php(48):
Tx_Extbase_MVC_Dispatcher->dispatch(Object(Tx_Extbase_MVC_Web_Request),
Object(Tx_Extbase_MVC_Web_Response))\n#17
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Core/Bootstrap.php(247):
Tx_Extbase_MVC_Web_BackendRequestHandler->handleRequest()\n#18
/var/www/kunden/yag-gallery.de/typo3/sysext/extbase/Classes/Core/Bootstrap.php(310):
Tx_Extbase_Core_Bootstrap->run('', Array)\n#19
/var/www/kunden/yag-gallery.de/typo3/mod.php(57):
Tx_Extbase_Core_Bootstrap->callModule('web_YagTxYagM1')\n#20 {main}

regenspaziergang-01.jpg (254.1 kB) Michael Knoll, 2011-07-23 02:36

History

Updated by Michael Knoll almost 2 years ago

Here is an test-image with Umlaute in tags that causes an Exception.

Updated by Michael Knoll almost 2 years ago

A possible solution - only working if mb_string is activated which is not the case on my installation - could be something like this:

$tagName = mb_detect_encoding($tagName, 'UTF-8', true) ? $tagName : utf8_encode($tagName);

This could cause trouble, if $tagName is not ISO encoded... So this seems to be a hard problem.

Simply using utf8_encoding() does not solve the problem as it

a) puzzles strings that are already utf-8 encoded
b) only works for certain input formats

Updated by Michael Knoll over 1 year ago

  • Status changed from New to Accepted
  • Target version set to YAG 1.3.0

Wrong database configuration and / or T3 settings could lead to this problem. Could be fixed now.

Updated by Michael Knoll over 1 year ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Although there are still problems with importing keywords, this problem seems to be fixed. Check for status report and correct charset handling in T3 than there should be no problem with importing tags. Umlauts could be broken.

Refer to: http://forums.adobe.com/message/3630579 for explanation of Umlaut-problems with Lightroom.

Also available in: Atom PDF