Skip to content

2.3.1: {{render_esi}} does not pass object to controller in production #10524

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

Closed
khusseini opened this issue Mar 24, 2014 · 5 comments
Closed

Comments

@khusseini
Copy link

Just like in #6822
the render_esi does not pass objects to a controller. For example this code

{% for box in pageparts %}
    {{ render_esi(controller(box.controller, { pagePart: box })) }}
{% endfor %}

Will work fine in dev environment but cause a PHP Exception in production environment

@pborreli
Copy link
Contributor

it makes sense, render_esi generate an ESI tag which is converted by your reverse proxy by a fragment request and you can't send a php object via a GET request

@khusseini
Copy link
Author

Now that you point it out like this. I will have to adapt my logic to it.
Thanks

@patrickallaert
Copy link
Contributor

I think there is still an issue here.

Not that it should work with objects, but rather the fact that the behaviour in dev is different than in prod.

Using objects in dev, it should produce the same error, or a more comprehensive one: throwing for example a RuntimeException mentioning that objects can never be used as parameters with render_esi().

@weaverryan
Copy link
Member

I actually agree. If an object can't be turned into a string for the URL, then that should cause an error in both environments.

@bpaulin
Copy link

bpaulin commented Jun 26, 2015

I've made a PR for this: #15056 . any feeback?

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

No branches or pull requests

5 participants