Log record insert logic

Created on 13 March 2023, almost 2 years ago

Problem/Motivation

Our website has content-scheduled publishing mechanics with content moderation workflow. When we run cron from /admin/config/system/cron page (either the button or URL) we are getting two log entries per node: one for node, the other one for workflow. That is the expected behavior. However, if cron is triggered via drush cron command, there are no log records generated for the transition. The reason is

if (PHP_SAPI == 'cli') {
    // Ignore CLI requests.
    return;
  }

condition in admin_audit_trail_insert
Is it a bug or it works as expected?

Steps to reproduce

1. Install Scheduled Transitions module
2. Create a new scheduled transition for a node with a date in the past
3. Run drush cron
4. Verify that the node is updated with no Admin Audit Trail log entries

Proposed resolution

  • N/A

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States dmitryl Austin

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

Comments & Activities

Production build 0.71.5 2024