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

AZBackgroundMediaFormatter Null Reference on Orphaned Media #3544

Closed
tadean opened this issue Jul 12, 2024 · 0 comments · Fixed by #3545
Closed

AZBackgroundMediaFormatter Null Reference on Orphaned Media #3544

tadean opened this issue Jul 12, 2024 · 0 comments · Fixed by #3545
Assignees
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

Comments

@tadean
Copy link
Contributor

tadean commented Jul 12, 2024

Problem/Motivation

In cases where AZBackgroundMediaFormatter is used for media, a php error occurs if the file associated with the media has been deleted.

Describe the bug

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. This can also lead to problems with CAS and Cron breaking since content is sometimes rendered internally during those processes.

To Reproduce

  • Delete a file entity that is in use by media that is employed as background media
  • Visit the content that contains the background media paragraph

Proposed resolution

AZBackgroundMediaFormatter should check to determine the file of its media actually exists before using it.

Expected behavior

Background media should display blank content if the associated file has somehow disappeared.

@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
@joeparsons joeparsons linked a pull request Jul 12, 2024 that will close this issue
32 tasks
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant