Tagged Questions
0
votes
0answers
3 views
Symfony2 URL matcher throwing ResourceNotFoundError when matching controller during translate function
I've got an error that is only happening on production. I have a form that uses radio buttons to change the language translation of my application. When the user selects "en", the application changes ...
0
votes
1answer
10 views
PHP Silex Framework can't add Twig_Extension_StringLoader extension
I am trying to use template_from_string as stated on
http://twig.sensiolabs.org/doc/functions/template_from_string.html
How can I do that from Silex? I see that the Twig/Exteion/StringLoader.php ...
0
votes
1answer
11 views
Symfony2 form errors not showing, UniqueEntity error message not shown next to the corresponding field
I am having problems displaying for errors on registration page.
public function createAction {
if ($request->isMethod("POST")) {
$form->bind($request);
if ...
0
votes
3answers
29 views
Can't use JOIN with related entities in doctrine2
I was guided by this, and I can't understand what's going wrong.
My entities:
/**
* @ORM\Entity
* @ORM\Table(name="term")
*/
class Term {
/**
* @ORM\Column(type="integer")
* ...
1
vote
1answer
13 views
Symfony2 Does Doctrine support “private/hidden” entity fields?
I'm looking for a function, to remove fields from a Document in doctrineauto-magically.
Let's say, I have a User Document that can be queried anonymously with a RESTful api. Of course, I want to ...
0
votes
0answers
20 views
Symfony 2 : Catch every error thrown by the symfony framework
I'm writing a custom logger wich has to catch every error that is thrown by the symfony 2 framework.
This includes stuff like: Warnings, Notices, Error and more.
Currently I have my ExceptionsListener ...
1
vote
1answer
24 views
Symfony2 - Import config.yml in services.xml
I am new in Symfony2 and I want to import my config.yml into the services.xml.
config.yml:
cleverreach:
soap:
key: myApiKey
url: myWsdlUrl
services.xml:
<parameters>
...
1
vote
1answer
22 views
When using doctrine in phpStorm console it runs in --no-interaction by default
I'm having troubles with the console when using PhpStorm in combination with Symfony 2. It runs in --no-interaction mode, and only gives my errors. But when I use the same command in the terminal, it ...
0
votes
0answers
23 views
Symfony2: pthreads produces blank page
I'm trying to use the extension php_pthreads with Symfony2.
I set up a simple controller:
<?php
namespace Test\TestBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
...
4
votes
5answers
49 views
How to speed up template rendering in Symfony2?
I have a symfony2 application that renders about 6000 database entities.
I optimized the ORM (propel) queries and the database requests are now very fast. What remains is the symfony controller and ...
0
votes
0answers
19 views
Integrate Dropzone with Symfony2 giving file “” does not exist
I'm trying to integrate Dropzone with symfony. But when I select more than one file, I get this exception:
The file "" does not exist
500 Internal Server Error - FileNotFoundException
Stack Trace ...
0
votes
0answers
26 views
Is this a good idea to use Yii Framework with Doctrine 2 ORM?
I love Yii Framework, it works fast, it's pretty cool and easy to develop with.
But now I have a problem - I am going to develop Learning Managment System with difficult domain logic and it's not good ...
2
votes
1answer
25 views
Why does Symfony still log to a dev.log file, even when I didn't define it in a loghandler?
During the execution of Symfony Commands, I want to log messages to a different file. I have read the Symfony and Monolog documentation, and it should work like I describe here. (Note that I know ...
2
votes
2answers
19 views
symfony2 access private files as admin user
In my Symfony2.3 project, i have a frontend website and a backend. The backend is secure by security.yml file and only role_admin user can acces backend.
Want i want now is only admin users can ...
1
vote
1answer
25 views
In symfony2, why AppKernel Instantiated twice?
I use symfony2. In AppKernel.php, I writed like this:
class AppKernel extends Kernel {
public function __construct ($environment, $debug) {
parent::__construct($environment, $debug);
...
1
vote
0answers
10 views
Rabbitmq Consumer hangs when using PAMI open()
I have an rabbitmq consumer(oldsound) in a Symfony 2 project, when it consumes a message that should dispatch an event that makes a call to a PAMI Client->open(), for some reason every once in a while ...
0
votes
0answers
16 views
Facebook wall style image viewer using Twig - Symfony2
Here is my problem:
I have a facebook style wall, which loads the "posts" dynamycally, and in these posts go images too.
I get the posts from the controller when the pages load, and I use the Twig ...
0
votes
0answers
20 views
Doctrine relation between tables
I Have several tables:
User (primary and auto userID)
- id
- name
Key (primary, not auto keyID)
- userID
- id
- value
Info (primary, not auto keyID)
- keyID
- infoName
Person (primary, not auto ...
1
vote
1answer
22 views
Connections in loop for SQL Server Symfony2
i´ve been trying to create a loop for different MSSQL Server in Symfony 2.3, but if some of the servers is off or the MSSQL service is down, the app don’t make an exception and it breaks the function.
...
0
votes
1answer
34 views
Symfony2 Form custom field type with more than 1 field
Struggling with Symfony2 Forms. The User object has a property of class Location. The form needs to display the Location in 2 select boxes: Country, City. (Later the city select box will be updated ...
0
votes
1answer
35 views
Symfony2 working with multiple applications
I have different projects, they all include a bundle that i wrote.
Each project (application) can have different custom bundles so not all bundles are shared.
Is there an easy way that both projects ...
0
votes
1answer
25 views
Get Data in forms fail with Symfony2
My controller is:
$form = $this->createForm(new Links());
$peticion = $this->getRequest();
if ($peticion->getMethod() == 'POST') {
$form->bind($peticion);
if ...
0
votes
0answers
9 views
Symfony2 Sonata Media Bundle Custom Image Croping
It seems that Sonata Media has only two strategies when it comes to cropping/resizing the uploaded image, Sonata\MediaBundle\Resizer\SimpleResizer and Sonata\MediaBundle\Resizer\SquareResizer. Both ...
0
votes
1answer
24 views
XDebug with Symfony2 and Sublime Text
I am running a symfony2 webapp, and Im trying to use XDebug with Sublime Text 3, using this package but I am running with the problem that I need to manually write XDEBUG_SESSION_START in the URL for ...
0
votes
0answers
16 views
Gumby FrameWork installation with Symfony
I would like to know how to install Gumby framework with symfony2 is there any tutorial or video explaining installation ...
thank you
1
vote
2answers
31 views
SF2 - Doctrine DQL - Select several columns
I have a table Item with the following columns:
Id
Category
value
date
I build a SQL request which returns all the lines with the latest date for each category:
SELECT *
FROM item i
WHERE ...
0
votes
1answer
17 views
Doctrine Unknown column type “Date” requested
I have a project in symfony2 where I want to map an entity class to the database, but executing php app/console doctrine:schema:update --force gives me following error:
...
0
votes
1answer
18 views
Symfony form emty_value and multiple
I have a "teachers" field in a form.
I would like to be able to select a blank value.
But in the symfony doc, I read that I have to set the multiple to false and the required to false, to add an ...
0
votes
1answer
16 views
Symfony 2 manyToMany clashing mapping table names
I want to to add exclusive/inclusive products to promotion entity.
There is a clash of names when it tries to generate mapping table.
like:
promotion_product for both tables
promotion.orm.yml
...
0
votes
2answers
33 views
Website doesn't run on the server with symfony 2
I have a program in symfony2 and I have a apache server with Cpanel
The project works fine in the local but when I upload it on the server it gives me this error:
Whoops, looks like something went ...
1
vote
2answers
35 views
Symfony routing not working
I am using a normal host (i.e access to web pages via public_html and no access to php (apache) configuration).
so here what i did
renamed my web dir => public_html
renamed app.php (prod ...
1
vote
0answers
45 views
Symfony2 - Persist entity without persisting its association
Im having big troubles with this issue since a month already.
Database :
--Tables :
1- "Profession" : Pre-filled
2- "User"
In my entity "User" I have :
/**
* ...
1
vote
1answer
25 views
Conditionating the routing on Symfony2
Hello I need make some conditions for the all the routes that are on my routing. In a little explication I have a DB that contains users and profiles or roles like you wanna to tell that. on this DB I ...
0
votes
2answers
22 views
Symfony UniqueEntity Constraint and javascript
i'm new to symfony, and don't know much about javascript!
i created a symfony form, and added a UniqueEntity constraint on the name and firstname, so it's not possible to add a same person twice in ...
0
votes
0answers
14 views
Post a json object using guzzle client in guzzle2 through webservices
I've to post JSON object to webservice using guzzle2.
My service description looks like this :
<command name="postJsonData" method="POST" ...
0
votes
1answer
31 views
Creating mobile app in Symfony2
I read that there is an option to create a mobile app in symfony2 and I don't really understand how to create it. As much as I do understand the concepct of emulating HTML5 to native app I don't know ...
0
votes
1answer
42 views
Twitter api 1.1, get ALL tweets by hashtag search /search/tweets.json limits
I know how to get tweets from a hashtag (Twitter request to get the latest tweets for a hashtag using Twitter API V1.1 using OAuth settings)
But it appears that some tweets associated with a hashtag ...
0
votes
0answers
7 views
Symfony2 JMS Serializer JSON_ constant error
PHP Fatal error: Uncaught exception
'JMS\Serializer\Exception\InvalidArgumentException' with message
'Expected either an integer representing one of the JSON_ constants,
or a string of the ...
1
vote
1answer
21 views
Regenerate autoload.php in symfony2
I have autoload.php with this code
<?php
// autoload.php generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ...
0
votes
1answer
20 views
Cascade saving with Symfony and Doctrine on demand
I am working with two entities related by a 'one to many' relation but I'm having some problems.
Let say the entity Article has a property with a collection of Post's, and I configure the entities to ...
0
votes
1answer
29 views
User role depending on related object
I have an entity related with some object in many-to-many relation (well, not really a relation because I have a table between them that has the roles).
Is there any way that I can set this roles to ...
2
votes
2answers
41 views
symfony2.3 performance tips on service, controller, controller as service
What are the main differences, in term of performance between service, controller as a service or using a sort of auxiliary object to do the job?
more precisely for this scenario/use-case:
i've got ...
0
votes
0answers
18 views
Fetching products by category slug using the Doctrine “Tree” extension
I currently have Product and Category entities, with a many-to-one relationship through the product's category property. The category has a slug defined using the @Gedmo\Slug annotation, which is ...
1
vote
2answers
31 views
How to send var to view from event listener in symfony2?
I am trying to send var to view from event listener in symfony2 but I am stacked.
1) Is this possible?
2) What kernel event to use (kernel.view or kernel.request)?
3) Finally how to send some var ...
0
votes
0answers
18 views
Symfony2 Gedmo error call_user_func_array()
I have a problem with gedmo annotation
I want to log the group_id of my User class (from FOSUserBundle) but i can just log my last name first name etc .. but if i ty to log on many_to_many relation ...
0
votes
1answer
33 views
Doctrine CRUD demo?
I am trying to build a CRUD interface for my 2000 records database.
I read on Stackoverflow that Doctrine might be a good solution.
I was not able to find any demo online, though!
do you know any?
I ...
0
votes
1answer
30 views
Reinit composer autoload
After updating via the Composer i want to initialize the application and send it events
"scripts": {
"post-update-cmd": [
"Acme\\Bundle\\DemoBundle\\Composer\\ScriptHandler::notify"
...
1
vote
0answers
23 views
How to use router with symfony and apache
I use the router with symfony dev server like this
app/console server:run --router="/var/www/mysite/router/router.php" 0.0.0.0:8099
This works fine, but how can I use that router when I use apache ...
1
vote
0answers
15 views
Doctrine 2: If using APC for the Doctrine Meta and/or Query Cache, does APC need to be flushed after each application deploy?
For instance, here is an article on using the doctrine meta and query cache in your Symfony2 application.
I am using Symphony2 so I will use that as an example here. Say you have the following:
# ...
1
vote
2answers
31 views
Symfony2 Unable to find controller inside an EventListener
I am trying to redirect to a controller from the EventListener but I get the following error message:
Unable to find controller "HRPortalSystemBundle:Home:login"
I am affirmative that the ...