ECA Form: mode token not set

Created on 30 May 2024, 6 months ago
Updated 14 June 2024, 5 months ago

Apologies if this was already reported. I didn't find anything in the issue queue.

The form mode token [current_form:mode] doesn't return a value on any form-related events. I think the issue is that it's not being set on the DataTransferObject (line 67) in modules/form/src/Token/CurrentFormDataProvider.php.

Current code:

$dto = DataTransferObject::create([
  'id' => $dto_values['id'],
  'base-id' => $dto_values['base-id'],
  'operation' => $dto_values['operation'],
  'triggered' => $dto_values['triggered'],
]);

If you add 'mode' to this array, the token works.

$dto = DataTransferObject::create([
  'id' => $dto_values['id'],
  'base-id' => $dto_values['base-id'],
  'mode' => $dto_values['mode'], // Add this line.
  'operation' => $dto_values['operation'],
  'triggered' => $dto_values['triggered'],
]);
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jvogt Seattle, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024