[TYPO3-irre] Problems with order of IRRE elements

Sebastian Gebhard sebastian.gebhard at gmail.com
Wed Jan 6 09:11:40 CET 2010


Hi,

I'm quite sure my problem is based on some misconfiguration in my extension and I hope you can help 
me because i'm not yet 100% (in) IRRE (pun for the German guys around :D ).

It's about an extension i'm currently developing: 
http://forge.typo3.org/projects/show/extension-multicatalog

Problem:
When I create IRRE records, in the TCEFORM they are displayed fine but in the List module and in the 
FE the sorting of the records is inversed. I tried around some different things with the IRRE 
configuration but things did not work out yet.

There are products:
CREATE TABLE tx_multicatalog_catalog (
	# ---- 8< ---- SNIP ------
	sorting int(10) DEFAULT '0' NOT NULL,
	# ---- 8< ---- SNIP ------
	title tinytext,
	# ---- 8< ---- SNIP ------
	articles tinytext,
	# ---- 8< ---- SNIP ------
);

And there are articles (subtypes of products):
CREATE TABLE tx_multicatalog_article (
	# ---- 8< ---- SNIP ------
	sorting int(10) DEFAULT '0' NOT NULL,
	# ---- 8< ---- SNIP ------
	title tinytext,
	price tinytext,
	# ---- 8< ---- SNIP ------
);

A special thing in my extension is that for the sake of simplicity you can turn off the usage of 
articles via ext_conf_template.txt

At the bottom of the TCA for the products I have following setup:

global $TYPO3_CONF_VARS;
$_EXTCONF = unserialize($TYPO3_CONF_VARS['EXT']['extConf']['multicatalog']);
// Add Articles
if($_EXTCONF['use_articles']){
	$tempColumns = array (
		'articles' => array (		
			'exclude' => 1,
			'label' => 'LLL:EXT:multicatalog/locallang_db.xml:tx_multicatalog_catalog.articles',
			'config' => array (
				'type' => 'inline',
				'foreign_table' => 'tx_multicatalog_article',
				#'foreign_sortby' => 'sorting', // Does NOT fix the problem
				'maxitems' => 100,
				'appearance' => array(
					'showSynchronizationLink' => 0,
					'showAllLocalizationLink' => 0,
					'showPossibleLocalizationRecords' => 0,
					'showRemovedLocalizationRecords' => 0,
					'expandSingle' => 0,
					'useSortable' => 1
				),
				'behaviour' => array(
				),
			)
		),
	);
	t3lib_div::loadTCA('tx_multicatalog_catalog');
	t3lib_extMgm::addTCAcolumns('tx_multicatalog_catalog',$tempColumns,1);
	t3lib_extMgm::addToAllTCAtypes('tx_multicatalog_catalog','--div--;LLL:EXT:multicatalog/locallang_db.xml:tx_multicatalog_catalog.tabs.articles,articles', '', 'after:price');
}

To post not too much code here..
Here you can view my ext_tables.php: 
http://forge.typo3.org/repositories/entry/extension-multicatalog/trunk/ext_tables.php
And here's the TCA of the Articles: 
http://forge.typo3.org/repositories/entry/extension-multicatalog/trunk/Configuration/TCA/Article.php

Any ideas?

Kind regards and thanks in advance,
Sebastian


More information about the TYPO3-project-irre mailing list