Skip to content

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:…

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 Sy…

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 count…

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 c…

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 doct…

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