Core now allows moderation of taxonomy terms, but an error is thrown when trying to use scheduled transitions on this

Created on 15 July 2024, 4 months ago
Updated 16 July 2024, 4 months ago

Problem/Motivation

As stated here: https://www.drupal.org/node/3424780 β†’ , Core (10.3.x) now allows moderation of taxonomy terms.
Manually updating from draft to published works.
An error is thrown when trying to use scheduled transitions on this.

UPDATE:
I just tried to see the revision log and it threw an error there, this may be why I am getting the mentioned error

This error appears:

InvalidArgumentException: The timestamp must be numeric. in Drupal\Component\Datetime\DateTimePlus::createFromTimestamp() (line 201 of /web/core/lib/Drupal/Component/Datetime/DateTimePlus.php).

#0 /web/core/lib/Drupal/Core/Datetime/DateFormatter.php(121): Drupal\Component\Datetime\DateTimePlus::createFromTimestamp(NULL, Object(DateTimeZone), Array)
#1 /web/modules/contrib/scheduled_transitions/src/Form/Entity/ScheduledTransitionAddForm.php(404): Drupal\Core\Datetime\DateFormatter->format(NULL)
#2 [internal function]: Drupal\scheduled_transitions\Form\Entity\ScheduledTransitionAddForm->Drupal\scheduled_transitions\Form\Entity\{closure}(Object(Drupal\taxonomy\Entity\Term))
#3 /web/modules/contrib/scheduled_transitions/src/Form/Entity/ScheduledTransitionAddForm.php(381): array_map(Object(Closure), Array)
#4 /web/modules/contrib/scheduled_transitions/src/Form/Entity/ScheduledTransitionAddForm.php(92): Drupal\scheduled_transitions\Form\Entity\ScheduledTransitionAddForm->getRevisionOptions(Object(Drupal\taxonomy\Entity\Term))
#5 /web/core/lib/Drupal/Core/Entity/EntityForm.php(107): Drupal\scheduled_transitions\Form\Entity\ScheduledTransitionAddForm->form(Array, Object(Drupal\Core\Form\FormState))
#6 [internal function]: Drupal\Core\Entity\EntityForm->buildForm(Array, Object(Drupal\Core\Form\FormState))

Steps to reproduce

  1. Add a workflow for a taxonomy
  2. Enable it in scheduled transition settings and give a role permissions to take away message indicating roles aren't assigned to it
  3. Go to the taxonomy term, I set it to draft
  4. Go to the scheduled transitions tab
  5. Click on the add scheduled transition button

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

2.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Guybrush Threepwood

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

Comments & Activities

Production build 0.71.5 2024