xperseguers / t3ext-fal-protect

This extension protects everything within fileadmin/ based on associated file restrictions.
https://extensions.typo3.org/extension/fal_protect
GNU General Public License v2.0
11 stars 7 forks source link

[TASK] Rearange TCA fields #57

Closed cdaecke closed 7 months ago

cdaecke commented 7 months ago

Rearange TCA fields for sys_file_metadata to the same order like without ext:fal_protect.

Without ext:fal_protect you have the following fields in the General tab:

Bildschirmfoto 2024-04-08 um 12 38 21

Installing ext:fal_protect will move the fields description and title to the tab Access.

Bildschirmfoto 2024-04-08 um 12 39 05 Bildschirmfoto 2024-04-08 um 12 39 23

This pull request restores the field order to the "default" behaviour.

xperseguers commented 7 months ago

I don't know how to reproduce, just had a look on a TYPO3 v10. Firstly I have much more fields on the general tab:

image

and secondly I don't have any "corrupted" Access tab.

cdaecke commented 7 months ago

I guess, you have ext:filemetadata in place, so the code in the following condition does not apply:

https://github.com/xperseguers/t3ext-fal-protect/blob/c9e201c57c4184fad6892d8bd7172837262e3c70/Configuration/TCA/Overrides/sys_file_metadata.php#L36

xperseguers commented 7 months ago

True, that's the reason. Looks like at some point description and title have been added by default, or reordered.

Your solution seems to work but puts the Access tab after Categories, whereas it's supposed to be placed before.

As such, I'd say the correct fix should be to replace

'after:alternative'

by

'after:title'

instead.

cdaecke commented 7 months ago

I have added the changes.