Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3544 AZBackgroundMediaFormatter Breaks with Missing Files #3545

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

tadean
Copy link
Contributor

@tadean tadean commented Jul 12, 2024

Description

AZBackgroundMediaFormatter does not check if its media entity's file actually exists before attempting to make use of it. This leads to crashes on rendering if the file has somehow gone missing. This can also lead to problems with CAS and Cron on the site since content is sometimes rendered internally during those processes.

Related issues

#3544

How to test

  • build site
  • enable az_demo
  • Delete the file entity (not media) for lynx.jpg
  • Visit the front page which uses that associated media entity, and verify the background media is rendered as a blank space rather than crashing.

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

@tadean tadean added bug Something isn't working backport Changes to be back-ported to previous minor release branch patch release Issues to be included in the next patch release labels Jul 12, 2024
@tadean tadean self-assigned this Jul 12, 2024
@tadean tadean requested a review from a team as a code owner July 12, 2024 15:28
@joeparsons joeparsons linked an issue Jul 12, 2024 that may be closed by this pull request
@joeparsons joeparsons merged commit 747de76 into main Jul 12, 2024
16 checks passed
@joeparsons joeparsons deleted the issue/3544 branch July 12, 2024 17:21
This was referenced Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Changes to be back-ported to previous minor release branch bug Something isn't working patch release Issues to be included in the next patch release
Projects
No open projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

AZBackgroundMediaFormatter Null Reference on Orphaned Media
4 participants