Issue Bug Closed

#94388Slug postModifiers hook record data missing

Sven Burkert 06/20/21, 10:13 updated 08/16/25, 11:21

Description

I want to use a hook for a slug field via “postModifiers” (see feature https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5.x/Feature-88198-TCA-basedSlugModifiersForExtensions.html).
Documentation says:

> The method then receives a parameter array with the following values:
> ‘record’ … the full record to be used

But the array key “record” doesn’t contain the full record, just some:

array(5) { ["myrecord"]=> string(0) "" ["mytitle"]=> string(4) "test" ["uid"]=> int(199) ["pid"]=> int(175) ["sys_language_uid"]=> int(0) } 

It just contains two custom fields, I think because I provide these fields in the TCA configuration:

'generatorOptions' => [
  'fields' => ['myrecord', 'mytitle'],

Second bug: Field “myrecord” contains no value, even though I chose a record. Configuration for this field:

'config' => array(
  'type' => 'group',
  'internal_type' => 'db',
  'allowed' => 'tx_myext_domain_model_mymodel',

Edit 15.08.2022: Checked with newest TYPO3 v10, bug still existing.

Reviews 3

History 812

  1. Sven Burkert changed category Complexity medium Sprint Focus Needs Decision 08/15/22, 09:36

  2. Sven Burkert changed description 08/15/22, 10:16

  3. Sven Burkert changed description 08/15/22, 10:17

  4. Sven Burkert changed category 11/30/22, 14:27

  5. Gerrit Code Review pushed patch set 1 for main to change 84574 status New Under Review 06/10/24, 19:02

  6. Gerrit Code Review pushed patch set 2 for main to change 84574 06/10/24, 19:16

  7. Gerrit Code Review pushed patch set 1 for 12.4 to change 84691 06/13/24, 12:47

  8. Gerrit Code Review pushed patch set 1 for 11.5 to change 84692 06/13/24, 12:47

  9. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % 06/13/24, 13:40

    Applied in changeset commit:cfabd9dc7bc39a79b42937b96d64fb8959a002e0.

  10. Georg Ringer changed Duplicated by #91335 07/08/24, 14:48

  11. Benni Mack changed status Resolved Closed 07/09/24, 12:45

  12. Sven Burkert commented and changed TYPO3 Version 10 13 08/16/25, 11:21

    To clarify: This bug hasn’t been fixed, only documentation has been updated:

    -        'record' ... the full record to be used
    +        'record' ... important fields of the record (available fields might differ from usage type)

    But we need the full record here! Now, this hook is totally useless in most cases.

    BTW: In all newer TYPO3 documentation, there’s still the text “the full record to be used” :(