problem about symfony-2.1-Collection of common programming errors
Elnur Abdurrakhimov
php symfony2 symfony-2.1 composer-php
To install vendors for Symfony 2.1.0 I’m running php composer.phar install but it gives error during Generating autoload files.Error is:Warning: Unexpected character in input: ‘\’ (ASCII=92) state=1 in on line 26Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exceptionIt works fine on localhost, but not on server. Not sure what the problem is with the php set up?EDIT:PHP is 5.3.13. I checked that beforehand.I
Patt
symfony2 symfony-forms symfony-2.1
I am posting a form with Ajax.I have a surprising response when binding a form within an Ajax call:public function newCartAjaxAction(Request $request) {$form = $this->container->get(‘new_cart_form.factory’)->create();$formHandler = $this->container->get(‘new_cart_form.handler’);if (‘POST’ === $request->getMethod()){$form->bind($request);if ($form->isValid()){$formHandler->processValidForm($form);$response = new Response();$response->headers->set(‘Content-type’, ‘
EdwardBloom
php ajax symfony2 symfony-2.1 logout
I have a strange issue on Symfony 2.1.7. If an user clicks to quickly on different actions, this user is kickout (logout+redirect to homepage).Exemple of steps to issue: The user is on his account default page. He have a list of blog’s posts for example. The user clicks on a tab, wait until the browser is start loading then quickly he clicks on any blog’s post in the list. The user is logout. (The problem is here, if the user click quickly in any different actions…)Do you know if Symfony have
user1041880
bundle symfony-2.1
I am using Symfony 2.1 and I want to add a new bundle. The bundle is called pulse00/ffmpeg-bundle this bundle is added to composer.json as any other bundle: in require array is added line “pulse00/ffmpeg-bundle”: “dev-master”After running php composer.phar update process ended with success. After that was bundle registered in appkernel.php.The problem begins with registering this bundle as service. In readme of this bundle is written: dubture_f_fmpeg:binary: /usr/bin/ffmpegBut Symfony crashes wi
user172409255
php doctrine2 symfony-2.1
I have around 40 entities and many bidirectional relationships. Whenever i use var_dump($user) or any entity my browser gets loaded with too much data of arrays and variables then it just crashed.i want to whats the problem.The data is being inserted fine. Can i cause issue in production.
Charles
php doctrine symfony-2.1 sonata-admin
I have been trying to setup Sonata Admin with Symfony-CMF for my project, and i have some errors when i trying to add menu item. How to fix this?Error:The class ‘Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem’ was not found in the chain configured namespaces Doctrine\ODM\PHPCR\DocumentLogs:DEBUG – Notified event “kernel.request” to listener “Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest”. DEBUG – Notified event “kernel.request” to listener “Symfony\Bundle\Framewo
DaveFX
php symfony2 doctrine2 symfony-2.1
I’m developing a bit complex Symfony2.1 based app, with connection to two different databases (with two entity managers, one connected to Oracle and the other one to PostgreSQL) and a custom User class (with a custom password encoder).I’ve managed to have it running correctly in dev environment, but whenever I try to run it in production environment I’m getting the next error:Doctrine\Common\Persistence\Mapping\MappingException: The class ‘MyFirm\UserManagerBundle\Entity\User’ was not found in t
tolgap
symfony2 doctrine doctrine2 symfony-2.1 jmsserializerbundle
I’m having this issue with JMSSerializerBundle. It basically gives me an exception for something that I’ve already done. This is my entity:Edited to avoid confusion about annotation lines<?phpnamespace My\ProjectBundle\Entity; use JMS\SerializerBundle\Annotation\Type;use Doctrine\ORM\Mapping as ORM;/*** My\ProjectBundle\Entity\Music* * @ORM\Table()* @ORM\Entity(repositoryClass=”My\ProjectBundle\Entity\MusicRepository”)*/ class Music extends Post { /*** @var integer $id* * @ORM\Column(name=”id
j0k
twig symfony-2.1
I have setup custom error pages to display for certain HTTP errors in the folder:app/Resources/TwigBundle/views/Exception/The 403 page (error403.html.twig) works and displays as expected.The 500 page (error500.html.twig) works and displays as expected.The 404 page (error404.html.twig) throws a 500 server error:PHP Fatal error: Uncaught exception ‘Symfony\Component\Routing\Exception\ResourceNotFoundException’The error is being thrown by doing an auth check to display certain menu items for users
icksde
php symfony2 symfony-2.1 apc xcache
Because a Bug in APC, i had to use another Cache-Drive. I removed APC and installed xcache. config.php says Your configuration looks good to run Symfony.I got the following error on request:PHP Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Unable to use ApcClassLoader as APC is not enabled.’ in /var/…/app/bootstrap.php.cache:1039 Stack trace: #0 /var/…/web/app.php(11): Symfony\\Component\\ClassLoader\\ApcClassLoader->__construct(‘sf2’, Object(Composer\\Autoload\\ClassL
Stony
symfony2 symfony-2.1
I just uploaded my application to my webspace, and cleared the cache via ssh. But in the prod environment my log file shows me an exception:InvalidArgumentException: Unable to find template “Project:News:overview.html.twig”. (uncaught exception) at /path/to/my/project/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php line 123Do you have any ideas what I can do?
Milos
php symfony2 twig symfony-2.1
I am getting this error when trying to open a route in Symfony 2.1I realy have no idea where to check that. There is nothing on the internet.Thank you very much for your help:CRITICAL – Uncaught PHP Exception Twig_Error_Runtime: “An exception has been thrown during the rendering of a template (“Unable to generate a URL for the named route “_wdt” as such route does not exist.”) in “@WebProfiler/Profiler/toolbar_js.html.twig” at line 15.” at /home/milos/workspace/merrin3.0/vendor/twig/twig/lib/Twi
manu
delete doctrine2 one-to-many entities symfony-2.1
I have two entities : Episode and Version. When I trie to delete a version a get an exception:Notice: Undefined index: episode in /var/www/Mendrock/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1561 I already check relations but I don’t found the error.My entites: Episodenamespace Mendrock\Bundle\SagaBundle\Entity;use Doctrine\ORM\Mapping as ORM;/*** Mendrock\Bundle\SagaBundle\Entity\Episode** @ORM\Table(name=”episode”)* @ORM\Entity(repositoryClass=”Mendrock\Bundl
Offlein
symfony2 controller symfony-2.1
In the Symfony “Book”, they talk about Entities with references to other entities. Like, in my case, if I have a “Post” Entity with many “Comment” Entities referencing it, I can load the Post by its ID and then do $post->getComments().The Comment are lazy-loaded, it seems, and I would have to either go one-by-one through them, loading each (which is clearly wrong) or load them all in a separate query (which I could do, but I don’t know where, specifically, to put that query). The Book, however,
Phil Moorhouse
rest doctrine-odm symfony-2.1
I’m writing a Symfony2 app that allows mobile users to create and update “Homes” via a REST service. I’m using MongoDB as the storage layer and Doctrine MongoDB ODM to do the Document handling.The GET /homes/{key} and POST /homes methods are working fine. The problem comes when I attempt to update an existing Home with PUT /homes/{key}.Here’s the current code:/*** PUT /homes/{key}** Updates an existing Home.** @param Request $request* @param string $key* @return Response* @throws HttpException*/
Juan Sosa
symfony2 doctrine yaml symfony-2.1
I’m quite new with symfony2 and doctrine and I’ve recently encounter an issue with indexes that I’m not able to fix.Here is my experience.yml:Test\PersoBundle\Entity\Experience: type: entity repositoryClass: Thibanir\PersoBundle\Repository\ExperienceRepository table: experience indexes:exp: columns: [slug,company_id,begin_date,end_date,is_current]type: unique id:id:type: integergenerator: { strategy: AUTO } fields:type:type: stringlength: 255begin_date:type: datetimeend_date:type: datetimenullab
rat4m3n
jquery forms jquery-ajax symfony-2.1 jquery-select2
I am trying to implement ajax call using select2 as per this example: https://github.com/genemu/GenemuFormBundle/blob/master/Resources/doc/jquery/select2/ajax.mdHere is my code:var $configs = {{ configs|json_encode|raw }};$field = $(‘#{{ id }}’);$configs = $.extend($configs, {ajax: {id: function (friend) { return friend.username; },url: $field.data(‘url’),data: function (term, page) {return { q: term, page_limit: 10, page: page };},results: function (data, page) {var more = (page * 10) < data
sglessard
loops symfony2 login symfony-2.1 fosuserbundle
I’ve a little problem with the FOSFacebookBundle integration to my website. When I click on the “Connexion” button, user is redirected to /facebook/login_check, and some random token are added to the url (state and code). But a new value is given to these tokens every second, and the page is still blank.Here is my code:[config.yml]security: providers:fos_userbundle:id: fos_user.user_managermy_fos_facebook_provider:id: my.facebook.user firewalls:public:pattern: ^/facebookfos_facebook:app_url: “
timaschew
symfony2 doctrine2 symfony-2.1
I’m using symfony 2.1.2.I have two entities and define a many-to-one (bidirectional) association between them. I don’t want to use the primary key for the foreign key (referencedColumnName). I want to use another integer uniqe column: customer_no/*** @ORM\Entity* @ORM\Table(name=”t_myuser”)*/ class MyUser extends BaseEntity // provides an id (pk) {/*** @ORM\ManyToOne(targetEntity=”Customer”, inversedBy=”user”)* @ORM\JoinColumn(name=”customer_no”, referencedColumnName=”customer_no”, nullable=fals
Johannes Klauß
symfony2 doctrine2 symfony-2.1
I recently upgraded one of my projects from Symfony 2.0.x to 2.1.xEverything works fine, but when I try to persist an entity in a service, PHP throws an error:Call to undefined method Doctrine\Bundle\DoctrineBundle\Registry::persist()In the controllers, everything works fine. Even fetching objects from db in a service works, but no call to ->persist($entity).This is my service definition:registration_form:class: KnowHow\ERegistration\BackendBundle\Service\RegistrationFormServicearguments: [ @
deepak
php doctrine2 symfony-2.1 sonata-admin
I just upgraded my symfony2.1.6 to Symfony2.1.7 and bumped in to this issue. Please let me know I can provide more details. It was fine with 2.1.6 but does not seem to work in 2.1.7.This error comes when I try to access Customer.php Entity (customer listing)Notice: Undefined index: _per_page in /var/www/playground/vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Admin/Admin.php line 720
puntotuning
symfony-2.1 fosuserbundle sonata-admin knpmenubundle
I’m following this tutorial http://tech.dupeu.pl/2012/10/getting-started-with-symfony-2-1-fosuserbundle-sonatauserbundle-and-sonataadminbundle/#respond to install the sonata admin bundle for symfony2.1(i’m currently using symfony2.1.7). Everything is working perfectly but when i click on the “List” button once logged in, i get a fatal error: Fatal error: Call to undefined method Knp\Menu\MenuItem::setCurrentUri() in /Users/salvatore/Documents/workspace/mysite/vendor/sonata-project/admin-bundle/S
cheesemacfly
symfony2 doctrine2 centos symfony-2.1 cpanel
I have a symfony2 app, in my local pc with ubuntu and works well, but in server with CentOS and Cpanel not works, I obtained this error:Class “Propa\PageBundle\Entity\Page” is not a valid entity or mappedsuper class.CRITICAL – Doctrine\ORM\Mapping\MappingException: Class”Propa\PageBundle\Entity\Page” is not a valid entity or mapped superclass. (uncaught exception) at/home/estudi83/domains/serverprova.com.es/propa/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.phpline 216I prove:$
Braulio
symfony-2.1 fosuserbundle
I’m working with existing database and I want to use fields with FOSUserI want to use the attribute “usuario” instead “username”I’ve tried to login and I’ve got this error:Unknown column ‘t0.username’ in ‘field list’How can I do this work without rename my table field?
sprain
symfony2 symfony-2.1
I am getting the error Unknown Entity namespace alias ‘DummyUserBundle’ when using a custom entity field in a Symfony2 form type. I really don’t figure out what the reason is. The error only occurs if I am trying to customize the field.This fails:<?php namespace Dummy\Bundle\TasksBundle\Form\Type;use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Doctrine\ORM\EntityRepository;class TaskType extends AbstractType {public function buildForm(FormBuilderI
Web site is in building
I discovery a place to host code、demo、 blog and websites.
Site access is fast but not money