[TYPO3-Solr] Problem with SOLR_RELATION

Tim Werdin t.werdin at web-vision.de t.werdin
Thu Jun 21 13:14:23 CEST 2012


On 2012-05-21 15:01:59 +0000, Ingo Renner said:

> Am 15.05.12 12:40, schrieb Tim Werdin:
> 
> Hi Tim,
> 
>> I have looked into the code and I have found the problem.
>> I use a config => type => group. As I saw in the code this relation
>> isn't supported (yet?).
>> 
>> My TCA looks like this, because for choosing a dam record I think group
>> is the best way.
> 
> for DAM you should use function txdam_getMediaTCA() which generates the 
> correct TCA for you. It will create the MM configuration that is 
> currently missing in your TCA, which is needed for SOLR_RELATION...
> 
> 
> HTH
> Ingo

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



More information about the TYPO3-project-solr mailing list