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

charset as first argument in ListRenderer #120

Closed

Conversation

matteosister
Copy link

AFAIK this DI configuration is wrong. It shows an error in SonataMediaBundle when you try to edit a media.
The problem is that the Renderer class constructor (parent of ListRenderer) is

/**
 * @param string $charset
 * @param boolean $renderCompressed
 */
public function __construct($charset = null, $renderCompressed = false)

so, giving this DIC configuration you got array() as charset. And it throws an error like:

An exception has been thrown during the rendering of a template ("Warning: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: charset `Array' not supported, assuming 
iso-8859-1

The only thing I don't know is where the %knp_menu.renderer.list.options% parameter should be injected. But at least removing it solves the problem. Is this parameter still needed?

Regards.

@stof
Copy link
Collaborator

stof commented Jun 19, 2012

you are using an outdated version of KnpMenu. The bundle is for KnpMenu 1.1, not for 1.0

@stof stof closed this Jun 19, 2012
EmmanuelVella pushed a commit to EmmanuelVella/KnpMenuBundle that referenced this pull request Sep 23, 2020
EmmanuelVella pushed a commit to EmmanuelVella/KnpMenuBundle that referenced this pull request Sep 23, 2020
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 this pull request may close these issues.

2 participants