Project

General

Profile

Actions

Bug #23815

closed

addToAllTCATypes after certain fields does not work anymore

Added by Susanne Moog about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-10-21
Due date:
% Done:

0%

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

Description

Since the restructuring of the pallettes and fields the addToAllTCAtypes after:fieldname does not work anymore..

To test try:
t3lib_extMgm::addToAllTCAtypes("tt_content", 'subheader;;8', '', 'after:header');

The field gets added to an empty tab.

(issue imported from #M16096)


Files

16096.diff (1.94 KB) 16096.diff Administrator Admin, 2010-12-14 23:14
16096_v2.diff (7.17 KB) 16096_v2.diff Administrator Admin, 2010-12-15 21:32

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #24366: PHP warning in any system BE moduleClosedSteffen Kamper2010-12-18

Actions
Related to TYPO3 Core - Bug #24441: [Unit tests] Failing tests in t3lib_extmgmTestClosedSteffen Kamper2010-12-29

Actions
Actions #1

Updated by Jo Hasenau about 14 years ago

We already talked about that during the code sprint and came to the conclusion that we need to define a rule for this function:

Do we want to enable developers to insert fields into existing palettes, or do we want to move the field to a place before or after the palette containing the field?

Developers could restructure the whole TCA types and palettes anyway, so this is just about the behaviour of this function.

Opinions please!

Actions #2

Updated by Susanne Moog about 14 years ago

I'd say we want to enable developer to insert fields into existing palettes, as that is the only way to enable a real "after" some field. For example if you take the subheader field:
I want it to appear directly after the header field, not after the whole palette with all the other fields.

Only thing I see is that if you want to create a new palette / place your field after the palette you'd have to be able to specify that, too. Probably with another keyword like "afterpalette:header" or something like that.

(And of course I could restructure the whole TCA types and palettes but that is overkill for simply wanting to add a single field.

Actions #3

Updated by Jo Hasenau about 14 years ago

Then we would just have to make sure that there wil be additional "--linebreak--" inserted as well depending on the position inside the palette, since the palette is based on "nowrap" and "inline-block"

Actions #4

Updated by Ernesto Baschny about 14 years ago

Yes, discussed in our release meeting today. Some "magic --linebreak--" around would indeed be needed to be as "backwards compatible" as possible (the custom fields being rendered more or less on the same context as before and in a "stand alone" line.

Actions #5

Updated by Ingo Renner about 14 years ago

Fixed target version, always set target to final release, use "Fixed in Version" for specific preview releases...

Actions #6

Updated by Jo Hasenau almost 14 years ago

After trying to put the fields into the palettes containing the fieldname to position the field before or after, I found out, that this will lead to multiple field entries as soon as the fieldnames differ for certain types.

i.e.:
t3lib_extMgm::addToAllTCAtypes('pages','tx_dampages_files','1',);
t3lib_extMgm::addToAllTCAtypes('pages','tx_dampages_files','2','after:no_cache');
t3lib_extMgm::addToAllTCAtypes('pages','tx_dampages_files','3','after:media');

would lead to a triple entry for page type 1, since this is using both palettes, no_cache and media, and gets the field appended as well due to the fact that there is no position given in line 1.

So after discussing this with Steffen Kamper, we came to the conclusion that the only option we've got is to position the field as a separate field entry after or before the whole PALETTE containing the fieldname used for the position.

Attached patch does exactly this.

Actions #7

Updated by Björn Pedersen almost 14 years ago

Just for the record:
http://bugs.typo3.org/view.php?id=16349 woudl be solved with this.

Actions #8

Updated by Jo Hasenau almost 14 years ago

See my comment at #16349

Actions #9

Updated by Jo Hasenau almost 14 years ago

Attached V2 patch adds the command "replace:fieldname" to the existing "before" and "after"

Actions #10

Updated by Steffen Kamper almost 14 years ago

committed v5 to trunk rev 9835

Actions #11

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF