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

Unknown function "dump" #355

Closed
AlexHaan-i opened this issue Oct 2, 2024 · 5 comments · Fixed by #357
Closed

Unknown function "dump" #355

AlexHaan-i opened this issue Oct 2, 2024 · 5 comments · Fixed by #357

Comments

@AlexHaan-i
Copy link

In geocoder.html.twig the method dump is used once: https://github.com/geocoder-php/BazingaGeocoderBundle/blob/master/templates/Collector/geocoder.html.twig#L102

Further along profiler_dump is used. Shouldn't that first also be like this?

Somehow this triggers an error on our production servers. Though I'm not yet sure how. And I doubt that profiler_dump is available then anyway.
Unknown function "dump"

I've found this similar issue in a different project: api-platform/core#5786

@norkunas
Copy link
Member

norkunas commented Oct 2, 2024

Will check this tomorrow, but why your production servers/projects are accessing/using dev template in the first place?
Could you include stacktrace?

@AlexHaan-i
Copy link
Author

Thanks!

You asked for a stack trace.

We use kriswallsmith/assetic in our Symfony projects (old Symfony version - working on it...).
Somehow Assetic dump finds this template as a resource and loads it. Even in production.

I haven't yet figured out completely why that happens. But since you asked for a stack trace:

bin/console in run at line 44
vendor/symfony/symfony/src/Symfony/Component/Console/Application.php in doRun at line 148
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php in doRun at line 74
vendor/symfony/symfony/src/Symfony/Component/Console/Application.php in doRunCommand at line 255
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php in doRunCommand at line 86
vendor/symfony/symfony/src/Symfony/Component/Console/Application.php in run at line 1010
vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php in execute at line 255
(project own wrapper around the Assetic DumpCommand) .../Assetic/Command/DumpCommand.php ...
vendor/symfony/assetic-bundle/Command/DumpCommand.php in getNames at line 117
vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php in load at line 195
vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php in load at line 160
vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php in load at line 59

@norkunas
Copy link
Member

norkunas commented Oct 3, 2024

Thanks. Okay so I've replaced it with profiler_dump already, can you test it if it fixes your issue?

@AlexHaan-i
Copy link
Author

I'll have to update and see at a later time (with some days off coming up).
I doubt that would help in our case though. Since profiler_dump shouldn't be defined either, right?

We just need to prevent it from being loaded when it shouldn't.

@norkunas
Copy link
Member

norkunas commented Oct 3, 2024

Probably yes 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants