Skip to content

encore_entry_css_files returns nothing if called multiple time #33

Closed
@soullivaneuh

Description

@soullivaneuh

I'm using this function to render PDF with inline CSS as it was suggested in #16 (comment):

<style>{{ asset_get_content(encore_entry_css_files('pdf')) }}</style>

But if I call the twig render method multiple time (to render multiple PDFs on one command), only the first will get CSS.

For the other, the css file list is just empty.

So I tried this for test on my homepage:

{{ dump(encore_entry_css_files('pdf')) }}
{{ dump(encore_entry_css_files('pdf')) }}
{{ dump(encore_entry_css_files('pdf')) }}

And it confirms the issue:

image

To me, it's a bug. Why this function would not return the needed files if call multiple times?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions