[TYPO3-Solr] Problem with SOLR_RELATION
Tim Werdin
t.werdin at web-vision.det.werdin
Tue Jun 26 17:44:45 CEST 2012
On 2012-06-21 11:14:23 +0000, Tim Werdin said:
> On 2012-05-21 15:01:59 +0000, Ingo Renner said:
>
> Hi Ingo,
>
> I have tested the txdam_getMediaTCA method now. Unfortunatelly extbase
> has a problem with the TCA I think.
>
> The tca looks like this now:
> 'images' => array(
> 'exclude' => 0,
> 'label' =>
> 'LLL:EXT:wv_stx3/Resources/Private/Language/locallang_db.xml:tx_wvstx3_domain_model_car.images',
>
> 'config' => array(
> 'form_type' => 'user',
> 'userFunc' =>
> 'EXT:dam/lib/class.tx_dam_tcefunc.php:&tx_dam_tceFunc->getSingleField_typeMedia',
>
> 'type' => 'group',
> 'internal_type' => 'db',
> 'allowed' => 'tx_dam',
> 'prepend_tname' => 1,
> 'MM' => 'tx_dam_mm_ref',
> 'MM_opposite_field' => 'file_usage',
> 'MM_match_fields' => array (
> 'ident' => 'tx_wvstx3_images',
> ),
> 'allowed_types' =>
> 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai',
> 'max_size' => '1000',
> 'show_thumbs' => 1,
> 'size' => 5,
> 'maxitems' => 10,
> 'minitems' => 0,
> 'autoSizeMax' => 30,
> 'softref' => 'dam_mm_ref',
> ),
> ),
>
> But when I try to see the model in the fe I get this error:
> #1247602160: You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near '* FROM tx_dam_mm_ref LEFT JOIN ON tx_dam_mm_ref.uid_local =
> .uid WHERE (tx_dam_' at line 1: SELECT .* FROM tx_dam_mm_ref LEFT JOIN
> ON tx_dam_mm_ref.uid_local = .uid WHERE (tx_dam_mm_ref.uid_foreign =
> '5' AND tx_dam_mm_ref.ident = 'tx_wvstx3_images') ORDER BY
> tx_dam_mm_ref.sorting_foreign ASC
>
> Tx_Extbase_Persistence_Storage_Exception_SqlError thrown in file
> /Users/Shared/twerdin/Sites/autorate/typo3_src-4.5.15/typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php
> in line 993.
>
>
> As you can see 'tx_dam' is missing at three points in this statement.
>
> Have you ever tried txdam_getMediaTCA together with extbase? Or am I
> missing something?
>
> Regards,
> Tim
Ok I found the problem, this is a bug in dirty extbase code.
To fix this you have to add 'foreign_table' => 'tx_dam', to the config array.
Now I can see all my images on the frontend.
Unfortunatelly I can't save them now but this is not part of this mailinglist.
Regards Tim
More information about the TYPO3-project-solr
mailing list