Log record insert logic

Created on 13 March 2023, over 1 year 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.69.0 2024