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

An exception has been thrown during the rendering of a template ("Cannot assign null to property Sonata\MediaBundle\Model\Media::$cdnIsFlushable of type bool"). #2451

Closed
hongdoan1 opened this issue Apr 4, 2024 · 1 comment

Comments

@hongdoan1
Copy link

i got this error when trying to get the path of $media

private FileProvider $provider;

public function __construct( FileProvider $provider)
{
    $this->provider  = $provider;
}

$this->provider->generatePublicUrl($media, $format);

@VincentLanglet
Copy link
Member

Hi,

When opening an issue there is a template to fill

Environment

Sonata packages

show

$ composer show --latest 'sonata-project/*'
# Put the result here.

Symfony packages

show

$ composer show --latest 'symfony/*'
# Put the result here.

You can't expect someone to solve/fix your probleme without any information.
Also, when you have an exception, you have a stacktrace with it, which helps to understand which method are called and where the issue come from. Without such information, there is nothing to do.

@VincentLanglet VincentLanglet closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants