Issue Bug Rejected

#103491Infinite call on copy if prependAtCopy field is an integer

NET engine 03/27/24, 09:48 updated 11/22/24, 15:48

Description

If a record that is copied has TCA.TABLE.ctrl.prependAtCopy, and the label of that table (i.e., $headerField) is an integer, it triggers an infinite call of getCopyHeader() (DataHandler:3704).

The prepend string, added with a space, appears as follows: “2077 (copy 1)”.
Within getCopyHeader():8944, an equality comparison is made with the integer field but as a string.
In my case, MariaDB reports error 1292: Truncated incorrect value, though the query returns 1.
What occurs is that the database truncates the value at the space to 2077 and processes it as such, which invariably returns 1.

Solution: The condition in copyRecord():3700 should be extended to include a string check.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Stefan Bürk commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2024-04-20T20:58:28+00:00" > 04/20/24, 20:58 </span>

    Can I ask if it is possible for you to provide a more detailed
    description how to configure something or how to reproduce this
    within a CORE monorepo installation ?

    At least configuration for table/field (at best for core tables)
    which needs to be adjusted and what to do to reproduce this ?

  2. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-08-22T09:38:50+00:00" > 08/22/24, 09:38 </span>

    If you enable ‘prependAtCopy’ with anything, what would you expect when your ‘label’ field is set to an integer? IMO this sounds like a wrong TCA setup, were you should actually not use ‘prependAtCopy’.

  3. Benni Mack commented and changed status Needs Feedback Rejected <span data-processor="relativetime" data-value="2024-11-22T15:48:48+00:00" > 11/22/24, 15:48 </span>

    Closing this issue do to lack of feedback. In TYPO3 v13 there is a dedicated “type=number” field, where prependAtCopy should not work anymore.