Skip to content
Advertisement

Tag: symfony

Unable to create new answer in Symfony

I’m making a a app in Symfony. I get Entities Answer and Question which are related. I want to enable users to add the answer to the question but I’ve got the problem with getting question_id to AnswerEntity. Here it what I came up with: Answer Controller AnswerForm: and AnswerEntity The error is: [enter image description here][1] [1]: https://i.stack.imgur.com/fYGpo.png but

Symfony reusable AJAX select / ChoiceType

I want to create a reusable AJAX-based select (select2) using Symfony form types and I’ve spent quite some time on it but can’t get it to work like I want. As far as I know you cannot override options of form fields after they have been added, so you have to re-add them with the new config. The Symfony docs

Error framework-extra-bundle Anotation “Unable to parse file […] The XML file is not valid.”

There is a recurring error in my Symfony projects since a few months. Every time a file at the root of the project is edited (even a space add in an a.txt file will reproduce the bug), I get this error. Unable to parse file “[RootPath]vendorsensioframework-extra-bundlesrcDependencyInjection/../Resources/configannotations.xml”: The XML file “[RootPath]vendorsensioframework-extra-bundlesrcDependencyInjection/../Resources/configannotations.xml” is not valid. The error is remove with the command

Symfony 5 queryBuilder count data

in one of my queries I am joining three tables to allow me to filter by taking into account these three tables. The problem is when I do a counter of the data from the main table (CV table), like I join the language table (ManyToMany), the categories table and the diploma table (manyToMany), when I do a counter of

Symfony 5 – ManyToOne __isInitialized__: false

I try to get value from object but objects return __isInitialized__: false and null values what did I miss? twig situ dump : situ entity : event entity : category entity : Answer You just got to know the doctrine lazy loading feature. It fetches the data until you fired the getter method the first time. You could know this

Why kernel.controller and AppFiltersListener take too long time

I’m trying to improve the project’s performance, and discover all request takes 567ms. Why do those two sections take too long time ??!! I use symfony2.5 and php5.6 Any ideas, please? Answer I’ve solved First of all i installed APC (PHP caching) on my webserver and restart it. Modify my doctrine configuration to use APC. Modify the service configuration as

using simple XML (php to change one attribute)

I have an xml input in the form of a string and I want to look at it and find a particular element and modify it. The part of the xml input I’m interested in looks like this and is part of the hierarchy of the in the string the ED element varies so im only interested in identifying all

Advertisement