Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
402 stars 186 forks source link

Taggable form field error: Array to string conversion #55

Closed konstantinsp closed 9 years ago

konstantinsp commented 9 years ago

Hello, i've added tags for page following this article http://www.kadeke.be/en/developer-blog/tagging

but when i add field to form

 $builder->add('tags', 'kunstmaan_taggingbundle_tags');

i've get an error.

Notice: Array to string conversion in /opt/lampp/htdocs/kunstmaan/vendor/symfony/symfony
/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php line 462 

could you help me with that?

konstantinsp commented 9 years ago

i found the solution

File: /../vendor/kunstmaan/bundles-cms/src/Kunstmaan/TaggingBundle/Form/TagsAdminType.php
//ADD
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
    $resolver->setDefaults($this->getDefaultOptions([]));
}