Closed getvois closed 6 years ago
What are the errors you get? Could you paste a code example where you using these types?
Did you update your assets?
@aistis- the error is: could not load type 'wysiwyg'.
here is my page part class.
namespace Acme\WebSiteBundle\Form\PageParts; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Form\FormBuilderInterface; use Kunstmaan\MediaBundle\Validator\Constraints as Assert; /** * BoatShowPagePartAdminType */ class BoatShowPagePartAdminType extends \Symfony\Component\Form\AbstractType { /** * Builds the form. * * This method is called for each type in the hierarchy starting form the * top most type. Type extensions can further modify the form. * @param FormBuilderInterface $builder The form builder * @param array $options The options * * @see FormTypeExtensionInterface::buildForm() */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('image', 'media', array( 'pattern' => 'KunstmaanMediaBundle_chooser', 'mediatype' => 'image', 'required' => false, )); $builder->add('imageAltText', 'text', array( 'required' => false, )); $builder->add('city', 'text', array( 'required' => false, )); $builder->add('name', 'text', array( 'required' => false, )); $builder->add('data', 'wysiwyg', array( 'required' => false, )); $builder->add('linkUrl', 'urlchooser', array( 'required' => false, )); $builder->add('linkText', 'text', array( 'required' => false, )); $builder->add('linkNewWindow', 'checkbox', array( 'required' => false, )); } /** * Returns the name of this type. * * @return string The name of this type */ public function getName() { return 'acme_websitebundle_boatshowpageparttype'; } /** * Sets the default options for this type. * * @param OptionsResolver $resolver The resolver for the options. */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => '\Acme\WebSiteBundle\Entity\PageParts\BoatShowPagePart' )); } // BC for SF < 2.7 public function setDefaultOptions(OptionsResolverInterface $resolver) { $this->configureOptions($resolver); } }
Hi you are probably getting this because you have upgraded Symfony to 2.8 or 3.0 when you need to refer to form components by their classname. I.e. Wysiwig::class etc.
See the Symfony upgrade documents for more information.
Hello, i have error when trying to load kunstmaan form fields like wysiwyg, urlchooser etc seems like they are not loaded from the KunstmaanAdminBundle.
Files exist in folders and the bundle is loaded in AppKernel and services.yml contains types of fields.
Any ideas what next??