Tagged Questions
0
votes
0answers
26 views
Symfony v2.2.1 kernel.trust_proxy_headers must be defined
Trying to use Symfony v2.2.1.
I can clear the dev cache without any problem, but when I try to clear prod cache, it keeps telling me:
...
0
votes
1answer
23 views
How get the nearest (latitude, longitude) entities with Doctrine2 and MySQL? [on hold]
I have and entity with the attributes latitude and longitude and I want to get the N entities closest to the point (LAT, LNG). How I can get them using Doctrine 2?
1
vote
1answer
31 views
File Uploads with Doctrine
I am trying to upload files with Doctrine in Symfony2.
I followed all the steps in this tutorial tutorial but whene I submit my form I get no errors but the file is not uploaded and the path in the ...
0
votes
1answer
36 views
Processing Query Strings?
Built an API using Symfony2, FOSRest and Doctrine. Given the following route:
"GET /api/path/to/product"
And the following parameters:
[("vendorID", 10), ("destination", "tanzania"), ("type", ...
-1
votes
0answers
32 views
Can't install sonata bundle
I work with symfony 2.2 and I am working on a project. I should show a progress by next week or I will get fired. I need someone who already worked with symfony 2.2 and SONATA bundle to guide me ...
0
votes
1answer
30 views
symfony2 phpunit session dosn't start
i have a strange problem with $_SESSION in my application
For different reasons that i don't explain here i had the necessity to set in the session the environment in my AppKernel.php
use ...
0
votes
1answer
44 views
SetLocale() for all pages with Symfony 2
I'm trying to make multi languages site with symfony 2, the question now is how to make $request->setLocale() applicable on all pages or methods.For the moment I needed in every method to call ...
0
votes
0answers
58 views
'Bad credentials' error with a custom authentication provider in Symfony 2
I'm working on a web application with Symfony 2. More specifically, I'm trying to make a Custom Authentication Provider thanks to the instructions of the Symfony Cookbook.
I have to make custom ...
0
votes
0answers
24 views
How create lead using wsdl file in symfony2.2
I am using sales force api for create lead and other services. I have enterprise.wsdl file but I do not that how it's file and it's method load in our service class.
One sample of service ...
0
votes
1answer
47 views
Aggregate SUM with Doctrine2 and QueryBuilder
in my repository class I have this, but the query is not working.
public function getResultsByName($page, $resultsCount, array $request_arr){
$qb = $this->createQueryBuilder('xx');
...
0
votes
0answers
28 views
PHPForce Soap Client with Symfony2.2.X
I am using symfony2.2.X for my project.I want to use PHPForce Soap Client for create new lead of salesforce then i use this documention :
https://github.com/phpforce/soap-client
but this is not ...
0
votes
0answers
30 views
Symfony2 : complex many-to-many or data sheet form
I have difficulty with the construction of the form in Symfony2 (v 2.2).
I need something like data sheet form with many-to-many connections. It looks complex.
I Have such Entities in DB:
Game
...
0
votes
0answers
18 views
Class is not a valid document or mapped super class
So I use my fork of CalendarBundle (http://github.com/permanaj/CalendarBundle), I install it, configure it, and extend it, because it usually the way to use a bundle. But when I try to run command it ...
0
votes
0answers
36 views
call console command from controller and read the output in Symfony 2.2
i faced a problem when upgrade from 2.1 to 2.2
in my action controller i am calling a console command and get the output from the command like this.
$input = new ArgvInput(array(
...
0
votes
0answers
21 views
Undefined variable: output in … vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DialogHelper.php line 411
I'm trying to generate entity with console command:
php app/console doctrine:generate:entity --entity="FoxSysBundle:Level" --fields="value:integer name:string(255)"
But i have an error:
Notice: ...
0
votes
1answer
22 views
Country list not displying in sylius?
below is my configuration i used as
apache 2.2.22
php 5.4.3
intl extension enable
so what should i do to show country list in drop-down list? Share some knowledge.
0
votes
1answer
37 views
Parse error when on production
I have developed a Symfony2 project (v2.2.2) and it was working all fine locally.
When I deploy it on my server I meet 2 issues:
the folder /bin does not transfer through Filezilla (impossible to ...
2
votes
0answers
57 views
Authentication not working in functional test
I'm new to testing and I'm facing a major problem trying to write functional tests for the admin area (behind firewall).
On my first iteration I used the way described in ...
0
votes
2answers
215 views
Upgrading Symfony 2.2 to 2.3 causes silent 500 errors
I just upgraded my Symfony 2.2 installation to Symfony 2.3. I was abe to get "composer update" to run with no errors, but this has caused every route in my application to return a blank page. If I ...
0
votes
0answers
50 views
SonataAdminBundle show dashboard blocks depending on user
I'm using SonataAdminBundle with Symfony 2.2 and want to display the dashboard blocks depending on what user is logged in.
e.g.
Users with Group Superadmin will see blocks 'UserManagement' and ...
0
votes
0answers
57 views
How to solve a Json encode pb. with JMS Serializer Bundle (not sequential array)
In my REST If I GET: "events":["Noël", "Pâques", "Foo"] When I PUT : "events":["Noël", "Pâques"] to my REST I have : "events":["Noël", "Pâques"]... PERFECT :)
when i PUT an "events":["Pâques", "Foo"] ...
0
votes
1answer
128 views
symfony2 how to upload file without doctrine?
Is it possible to upload files in symfony2 WITHOUT using doctrine? With doctrine, its example is given here: http://symfony.com/doc/2.2/cookbook/doctrine/file_uploads.html
Is there a simple way to ...
0
votes
1answer
46 views
Cannot install CalendarBundle via Composer
I want to use yvoyer/CalendarBundle on my Symfony2.2 project.
I add it on composer.json and run:
composer update star/calendar-bundle --prefer-source
And it return this error:
$ composer update ...
0
votes
2answers
48 views
symfony 2.2 getChild deprecated
so im trying to install a bundle for locations JulLocationBundle .
and i came across some problems , which i managed to solve ..
then an error came up call undefined function getChild .
some research ...
0
votes
1answer
45 views
Setting property value in custom form type
I have an entity Category that has Category children like a tree.
I have a CategorySelectorType that has a few non-mapped fields which
determine what Category should be set to the form data.
I want ...
0
votes
1answer
44 views
How can I build a Form displaying a collection of collections?
First of all, I have this DB schema:
I have categories, which contain products.
I also have attributes (for example "color"), which contain values (for example "red", "green", etc).
So, finally, I ...
1
vote
0answers
10 views
knp_pagination_bundle - using routing instead of query parameters
I'm using knp_pagination_bundle, the newest version.
I want to generate URLs like
fooroute/page/3/sort/id/direction/desc
Instead of default
fooroute?sort=id&direction=desc&page=3
I need ...
1
vote
1answer
64 views
Resource Bundle 0.2* installation failed in sylius?
I want to install resource bundle in sylius i used below command using cmd
composer require sylius/resource-bundle:0.2.*
when i ran above command i get below error
composer.json has been updated
...
0
votes
1answer
41 views
Symfony2 confirm form submission
I need to be able to do an operation on form data before it gets persisted to the database. The problem is, the operation can be risky and I need the user's consent each time.
I'd like to do this ...
1
vote
1answer
812 views
Symfony2 Upgrading 2.2 to 2.3
I just read about the new Symfony-Release: Symfony-Blog. It says 'Upgrading from 2.2 to 2.3 should be painless.'
As I only have one project and have upgraded that from 2.0 to 2.2 mainly by ...
1
vote
1answer
99 views
How to map an Entity to a form in Symfony 2
I have a problem using Symfony 2. When I try to populate a form with data coming from an Entity I get this error:
"The form's view data is expected to be of type scalar, array or an instance of ...
0
votes
2answers
96 views
symfony2 form bindRequest returns 500 error
so i have a form type "PictureType":
<?php
namespace AB\MyBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class PictureType extends ...
-1
votes
2answers
60 views
PHP: test == return false when he should not
I'm working with symfony2, and i really don't understand what's happen with this.
i have a == test, who don't return true when he should !At the very first iteration of that foreach, the == 's for ...
0
votes
1answer
52 views
Separate DB connection for each forked child process using Doctrine
I have a Symfony 2.2 application that has a Command that forks children to process entities in the DB. I'm having a hard time figuring out the proper way to force Doctrine to reconnect in each forked ...
2
votes
2answers
72 views
Cannot get user from Security Context in test environment
I'm trying to test an API call method which is securized using Basic Auth and which needs to retrieve the user from the security context.
My config_test.yml file (I'm using in-memory database for ...
0
votes
1answer
63 views
Symfony2/Doctrine2 relation same object twice
I have a problem with doctrine entity mapping.
Have a basic user entity and I want to create a Friend entity, what made up from two foreign key to the user table, the first owner of the friendship and ...
0
votes
0answers
20 views
Doctrine Behaviours - Sortable on non relationship
I am trying to sort by a property which is not in relation but part of current entity.
For some reason sortable wont work for me if property with @Gedmo\SortableGroup is part of current entitty.
...
0
votes
2answers
45 views
Use custom value on symfony2 choice form type using choice_list
I'm trying to use custom values in a choice form type which gets its data from a database query that needs post-processing. For this reason I opted to use the choice_list option and extending ...
0
votes
1answer
51 views
Container Dependecy Injection not working in Fixtures after upgrading symfony 2.0 to 2.1/2.2
I upgraded a project from Symfony 2.0 to 2.1. After that my tests stopped working. The problem is that I use fixtures which implement the ContainerAware interface. Now after the upgrade the ...
0
votes
1answer
102 views
Ratchet Symfony2.2
I am trying to create a real time Symfony app using Ratchet but I dont know where shoud I put my WampServerInterface and my server script (in a symfony service or just a class somewhere) and how ...
1
vote
2answers
166 views
Symfony2 -> Twig -> Form -> Field -> Set rendered = true
i have a simple problem.
I have a form with a field for example:
$builder
->add('x')
->add('y')
->add('z')
;
In my twig files i used multiple blocks and i want to stop render ...
0
votes
1answer
47 views
Assortment Bundle install in symfony 2.2.1
I want to install assortment bundle in symfony 2.2.1.
I added
"sylius/assortment-bundle" : "*" in composer.json
and run
composer require sylius/assortment-bundle:*
but showig error:
The requested ...
0
votes
0answers
73 views
Session symfony 2.2 admingenerator fosuserbundle LOGS OUT
Well, since I upgraded my Symfony to 2.2 version something happened with FosUserBundle. Let me introduce you first what do I currently have. I'm using AdminGeneratorBundle connected with FosUserBundle ...
2
votes
0answers
78 views
Embedded forms of inherited doctrine's entities
I'm building a form generator using Symfony 2.2 with Doctrine. The base principle is that the user create a new form by filling its name and selecting the widgets he'd likes to have in a select menu.
...
0
votes
1answer
121 views
Return JSON based on “Accept: application/json” from a Symfony2 controller
I've got a CRUD form generated via the SensioGeneratorBundle, as described here. This works great.
However, I would like to also return JSON, rather than HTML responses, if the "Accept" HTTP header ...
0
votes
0answers
21 views
Relative slug retrieval DoctrineExtensions
I have two entities, which are related and both have a slug created by @Gedmo\Slug according to this example
class Relation
{
/**
* @ORM\Column(type="string", length=255)
*/
...
0
votes
2answers
78 views
Why are exceptions not caught when overriding error templates?
I've followed the Symfony2.2 documentation on customising error templates and overridden the default error template at app/Resources/TwigBundle/views/Exception/error.html.twig as described for Twig.
...
0
votes
0answers
40 views
symfony2 set _locale in routing.yml with multiple parameters
I use symfony 2.2 and have a problem setting _locale parameter in routing.yml with multiple parameters.
If I have a route like this:
home:
pattern: /{_locale}/home
defaults: { _controller: ...
0
votes
2answers
54 views
@Route directive not working--what am I doing wrong?
I used composer.phar to install Symfony 2.2.1 standard edition, and then I used the app/console utility to generate a "ClientBundle".
I'm trying to define my routes using the @Route annotation. ...
0
votes
1answer
40 views
Convention-based routing in Symfony2
I'm trying to learn learn how routing works in Symfony2, and so far everything I've read has examples like this:
blog:
path: /blog/{page}
defaults: { _controller: ...