Project

General

Profile

Actions

Bug #18997

closed

TCAselectItem not working for all tables

Added by Oliver Weiss over 16 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Content Rendering
Target version:
-
Start date:
2008-06-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The stdWrap feature TCAselectItem. is not working for tables, which come from own extensions. This is because the TCA array is not completely loaded in the TCAlookup function (class.tslib_content: Line 4977).
If t3lib_div::loadTCA($table); is added, it works.

page.10 = TEXT
page.10.value = 1
page.10.TCAselectItem.table = tt_news
page.10.TCAselectItem.field = type
page.10.TCAselectItem.delimiter = ,

does not work.

page.10 = TEXT
page.10.value = 1
page.10.TCAselectItem.table = pages
page.10.TCAselectItem.field = doktype
page.10.TCAselectItem.delimiter = ,

works.
(issue imported from #M8785)


Files

8785_v1.diff (609 Bytes) 8785_v1.diff Administrator Admin, 2010-08-14 00:31
Actions #1

Updated by Benni Mack over 16 years ago

Well, the documentation says that for the Frontend you should use $TSFE->includeTCA(). If I read this thing correctly, it also loads the columns etc.

Anyway, so what I wanted to say is that the difference between includeTCA and t3lib-div::loadTCA() is that the first one loads the whole TCA and not just the ctrl part. And it worked on my side.

If there is a bug, we should probably fix includeTCA to make it work with extensions as well. Agreed?

Actions #2

Updated by Stefan Froemken over 14 years ago

I just have the same Problem. includeTCA doesn't load the columns-fields of my extension. But there is a trick:
includeTCA includes all what it finds in ext_tables.php. So I cut the part of my selectfield out of tca.php and pasted it in ext_tables.php of my ext-directory. Now includeTCA finds my column and it works.

But you're right...there should be a function in TYPO3 like readColumnsFromTCA($table) or something like that...

Actions #3

Updated by Sebastian Michaelsen over 14 years ago

The documentation of tslib_fe->includeTCA() says: "To load full TCA for the table, use t3lib_div::loadTCA($tableName) after calling this function."

I attached a patch which adds t3lib_div::loadTCA($table);

Actions #4

Updated by Steffen Kamper about 14 years ago

committed to svn
4_4 rev 9018
trunk rev 9019

Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF