This is the Symfony 2.1.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.1.x — not just 2.x.
0
votes
2answers
15 views
Symfony Form choices customize the get url
So I have a search bar form that I need to temporarly wire up to a legacy non-symfony page.
the current get url looks like the following (url-decoded)
...
0
votes
0answers
12 views
Easy traversal through objects
I am working on a project in Symfony2.2 and MongoDB.
Currently I can retrieve all the Objects from my Database and traverse them to get the desired object.
$dm = ...
0
votes
0answers
8 views
Symfony 2.1.7 profiler
I have disabled the toolbar by edit the config-dev.yml.
framework:
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
profiler: { only_exceptions: true }
web_profiler:
...
0
votes
0answers
22 views
Symfony2 firewall issue Android
Let me explain my situation, I developed a complete backend for an Android application in Symfony2.1 that works perfectly, now I'm trying to create the Android app part, for that I created a firewall ...
1
vote
1answer
23 views
Defining custom twig form block for errors rendering
I'm trying to define a specific new block for form field errors rendering, keeping form_errors unchanged for common errors rendering.
# Twig Configuration
twig:
debug: %kernel.debug%
...
0
votes
0answers
11 views
Use keyboard events to navigate collection in Symfony2
I have a Symfony 2.1 application which can fetch a list of personnel based on a filter criteria (e.g. department, status, etc) and display details of one person at at time. I put a previous and next ...
1
vote
1answer
34 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
0answers
24 views
Symfony2.1 - SonataAdmin - Forms - How can I show a lot of checkboxes (more than 500)?
I'm having problems when I try to display a many to many relation as checkboxes.
If I try to show more than 500 checkboxes then my form doesn't work any more.
->Here is my db model:
Products <-- ...
0
votes
1answer
35 views
How to redirect FOSUserBundle user if he is not in whitelist?
I use hwioauthbundle and FosUserBundle and I need check if user Twitter ID is in whitelist. If user ID in whitelist, user authorized, if not, redirect to specific page.
For automatic registration I ...
0
votes
1answer
64 views
ParameterNotFoundException: You have requested a non-existent parameter “database_accounts_driver”
when I make update for a symfony2 project using compser.phar :
php composer.phar update
I have this error when I run the project after updating :
ParameterNotFoundException: You have requested a ...
0
votes
0answers
34 views
Symfony throwing TransformationFailedException on DateTime field
I'm new to Symfony and I'm having some trouble rendering a twig-form filled with data from database. The entity is fetched and mapped correctly by Doctrine.
It always throws a ...
1
vote
2answers
51 views
Select choice in symfony2
I spent hours to find a solution to my problem, and I hope to find the answer here.
Here is the code for my form(ExperienceType) :
public function buildForm(FormBuilderInterface $builder, array ...
1
vote
1answer
122 views
How to upgrade to symfony2.3 from symfony2.1.7, can not find correct composer.json dependencies?
I am trying to upgrade from Symfony2.1.7 to Symfony2.3 stable release. I am using php composer.phar update But I am facing package dependency problems. Below is link to my composer.json and the ...
0
votes
1answer
34 views
Doctrine Class Table Inheritance - Multiple Types
I'm trying to make a Listing system for a classifieds-like site in Symfony. I want to have multiple Listing types with different fields (and some common fields).
I was going to make a main Listing ...
1
vote
2answers
123 views
Twig/Symfony2 : multiples roles with is_granted
I want to know if a user has the 'VIEW_GEOLOC_DATA' role, but I have a problem using the twig function is_granted().
If I use in a template :
Roles : {{ dump(app.user.getRoles()) }}
...
0
votes
0answers
12 views
wrap a collection of forms into a radio choice form
The needs: I have a collection of forms, that I want to wrap into a radio choice form.
I'll try to explain it accurately:
Here are my entities: http://yuml.me/48538bd0
Notes:
Creative: can have ...
0
votes
1answer
31 views
link two fields select type symfony2
i work with Symfony2 and I want to see how I can use Form Events to link two fields select type.
The first field contains the cities and the second contains the country.
here is my entities:
user
...
0
votes
4answers
59 views
Symfony getName() not working inside of controller
I am trying to access getName() in my controller, but it is not working.
This DOESN'T work:
$supplier = ...
1
vote
1answer
106 views
Fixtures installation error in sylius?
I want to install fixtures in sylius i used below command to install it that are as below
php app/console sylius:install --fixtures
when i ran above command i get error as
>PHP Fatal error: ...
1
vote
1answer
67 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
0answers
18 views
AbstractType + Default Locale
I have a class which extends AbstractType. In this class, I need to read the current locale, I am using this:
\Locale::getDefault()
The code above always returns 'en', which is normal since it is ...
0
votes
1answer
28 views
Dynamically add elements to a form in Symfony2.1 with it still being valid?
I have a form submitting a quizz to a user, and according to their answers I may want to ask them additionnal questions that I would have to dynamically add to said form.
What I have been doing so ...
0
votes
0answers
18 views
How to use Facebook php-sdk via FOSFacebookBundle?
I want to use the Facebook's PHP-SDK in a Symfony2 project to send notifications. How is the best way to get the PHP-SDK in a controller?
0
votes
1answer
54 views
Adding additional persist calls to preUpdate call in Symfony 2.1
I have a preUpdate listener in my app. When it is fired I want it to create some additional records. A simplified example of the basic functionality is below. In this current implementation it would ...
0
votes
0answers
53 views
The annotation does not exist, or could not be auto-loaded
I have some kind of strange problem with symfony and doctrine. While sending project to development server getting an error:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical ...
0
votes
0answers
16 views
Symfony2 dynamic field depends on old value
I need to validate fields only if the value of an other field hasn't changed.
My problem is that the pre bind value should be compared with the post bind value. But if the form is bound it cannot be ...
0
votes
1answer
47 views
Why won't FR3DLdap work?
I'm running symfony 2.2 and trying to install FR3DLdap (2.0.x-dev, but tried others) as per the documentation. Upon clearing the cache I get a 'Unrecognized options "client" under "fr3d_ldap".
My ...
-1
votes
1answer
37 views
using of unique constraint making the user unable to login in symfony2
I have used an unique constraint for the username in the registration form of the user.
User entity has following code
/*
* @UniqueEntity(fields="username",message="Username is already in use")
*/
...
0
votes
0answers
32 views
how to set name attributes to the input feilds for a php template in symfony2
I used jquery.validate.js
form is :
$form = $this->createFormBuilder($register)
->add('username','text',array('required' =>false,'attr'=>array('class'=>'required')))
...
0
votes
1answer
26 views
Propel form returns object instead of id
I get this when the form is saved.
Object of class Business\CompaniesBundle\Model\Province could not be converted to int in ...
1
vote
1answer
34 views
Renaming app.php to index.php making all the routes not working in symfony2
i have renamed app.php to index.php where the routing.yml contains the following routes
index:
pattern: /
defaults: { _controller:RepairLoginBundle:home:home}
login:
pattern: /login
defaults: ...
0
votes
1answer
128 views
Symfony 404 not found
I'm new to symfony.
I did:
rm -rf app/cache/*
rm -rf app/logs/*
Then:
sudo setfacl -R -m u:www-data:rwx -m u:user :rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:user:rwx ...
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.
...
1
vote
2answers
49 views
Symfony 2 Service Error on unit Testing
I make some functional test with Symfony 2 and phpunit.
But i've some trouble with a Service.
Let me explain.
During my run test, i want to use some service used by the application. So i juste set my ...
0
votes
0answers
17 views
Symfony 2.1 handle and store one-to-abstract-one relationship
I have a situation like this:
I have an entity human and a form to type in the data for humans.
The human can have a pet that can be a cat or a dog.
So i generalized cat and dog to a petAbstract ...
0
votes
1answer
55 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
65 views
Testing a symfony 2.1 project using behat and mink
I'm trying to use Behat and Mink to test a symfony 2.1 project.
My FeatureContext.php:
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\BehatContext,
...
0
votes
2answers
41 views
Symfony2 locale isn't working properly
After reading documentation and looking for it with Google, I've to ask you.
I want to switch between 3 languages: ca_ES, es_ES and en_GB
So I did a controller like this:
/**
* ...
1
vote
1answer
32 views
How do you access control ESI routes in Symfony2 via a trusted proxy?
I have a series of routes that sit on /esi/* that need restricting from the public so that only the reverse proxy can see them.
I have the reverse proxy (localhost) set as a trusted proxy so that ...
2
votes
1answer
300 views
Symfony 2.1 - Uncaught PHP Exception Twig_Error_Runtime
I am getting this error when trying to open a route in Symfony 2.1
I realy have no idea where to check that. There is nothing on the internet.
Thank you very much for your help:
CRITICAL - ...
0
votes
1answer
74 views
Doctrine does not update FOSUserBundle User object
I'm encountered a weird problem.
I'm working on a Symfony 2.1 project with Doctrine 2.2 and the FOSUserBundle for user management.
I added a RequestListener, since the user can change the language ...
0
votes
1answer
292 views
StofDoctrineExtensionsBundle not found in AppKernel
I'm using Symfony2 v2.1.9 and I'm facing a problem while installing StofDoctrineExtensionBundle
PHP Fatal error: Class 'Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle' not found in ...
0
votes
3answers
467 views
composer.json fails to resolve installable set of package
i can't install stof/doctrine-extensions-bundle with my composer.i 'm using Symfony2.1.9 version.a lot of problems are shown.the first one is:the requested package stof/doctrine-extensions-bundle ...
2
votes
2answers
52 views
Symfony2: How can I change the value of a variable of a parent render?
I hope someone can help me with this topic.
I have two controller in a Symfony 2 structure, the second one override the first.
Here the code of the parent controller:
<?php
namespace ...
1
vote
1answer
55 views
How to append the value to the url in symfony2
I have a users list page where admin can delete a user.i have a controller when user click on delete button the respective id is passed through the url and my url looks deleteuser?id=2
like this.Now ...
0
votes
0answers
38 views
Symfony2 user no active message at login
My User entity extends the AdvancedUserInterface so I have the option to disable a user for the login.
Now when I login with an inactive user, I don't get any message. If I login with an active user ...
0
votes
1answer
197 views
Symfony2 Jobeet tutorial day 3 error invalid mapping
When I generate bundle entities with code
php app/console doctrine:generate:entities EnsJobeetBundle
I'm getting this error
[Doctrine\Common\Persistence\Mapping\MappingException]
Invalid ...
0
votes
0answers
28 views
symfony basic http authentication: credentials rejected
I'm using Symfony 2.1 and I'm trying to set up a secured area. I used the exact same security.yml as found in the documentation at ...
0
votes
0answers
61 views
How to extend the Symfony2 Debug Toolbar with custom data?
I want to extend the Symfony2 Debug Toolbar with my own custom data.
I have a service where I want to log specific method calls and then display them in the web debug toolbar.
I read the cookbook ...
0
votes
0answers
17 views
Access routing options in kernel listener
I build a kernel listener some time ago, to redirect a user to a certain language.
There are several pages, that do not have a translation and where the user should not be redirected. As i use ...