Remove undefined $has_translations variable causing PHP warning on email revision pages

Created on 14 June 2025, 2 months ago

Problem/Motivation

The EasyEmailController::revisionOverview() method contains an undefined variable $has_translations on line 279, which causes a PHP warning when users view
email revision pages. This appears to be leftover code from when Easy Email entities supported translations, but that functionality has since been removed. While the revision
functionality still works, the PHP warning is logged and may be displayed depending on error reporting settings.

Steps to reproduce

  1. Enable the Easy Email module
  2. Create an email template with some content
  3. Create and send an email using that template
  4. Edit the email to create a new revision
  5. Navigate to the email's revision history page (/admin/reports/email/[ID]/revisions)
  6. Observe PHP warning in logs: "Undefined variable: $has_translations"

Proposed resolution

Since Easy Email entities no longer support translations, remove all translation-related code from the revision operations:

  1. Remove the undefined $has_translations variable reference
  2. Clean up the revert URL logic to use the standard (non-translation) route
  3. Remove any other leftover translation references in the controller

Remaining tasks

  • Remove $has_translations variable and related conditional logic
  • Update revert URL to use standard route instead of translation route
  • Test that revision pages load without PHP warnings
  • Review codebase for any other leftover translation references
πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024