Error: Call to a member function getTimestamp() on null in Drupal\moderation_scheduler\Plugin\views\query\ModerationSchedulerQuery->execute()

Created on 8 August 2024, 5 months ago
Updated 14 August 2024, 4 months ago

I'm getting this error when browsing to admin/contents/scheduled:

Error: Call to a member function getTimestamp() on null in Drupal\moderation_scheduler\Plugin\views\query\ModerationSchedulerQuery->execute() (line 52 of modules/contrib/moderation_scheduler/src/Plugin/views/query/ModerationSchedulerQuery.php).

On inspecting line 51 of modules/contrib/moderation_scheduler/src/Plugin/views/query/ModerationSchedulerQuery.php I can see for some nodes the $scheduled_date value is null. Not sure if this is ever expected but we should probably skip adding nodes to the result array nodes when $scheduled_date is null. I'll create a MR for this change. Let me know if it's a suitable fix for the issue as I don't know this module very well.

🐛 Bug report
Status

Fixed

Version

9.1

Component

Code

Created by

🇬🇧United Kingdom welly

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

Comments & Activities

Production build 0.71.5 2024