Issue Bug Closed

#106283DataHandler copy for not-nullable passwords fails with SQL error

Garvin Hicking 02/28/25, 19:08 updated 12/02/25, 14:22

Description

- Use EXT:styleguide
- Create an empty record of type “elements basic”, no fields filled out
- Copy that record
- Paste the record onto the same page
- SQL Error: 2: SQL error: "An exception occurred while executing a query: Column 'password_1' cannot be null" (tx_styleguide_elements_basic:NEW67c209516b0d0488988845)

This is repeated for all passwords fields that do not have the 'nullable' => true TCA option (password_1, 4, 5, 6, 7)

This happens because the DataHandler method call $value = $newHashInstance->getHashedPassword($value); can return null as a value, which is then tried to be persisted.

Reviews 2