I've encountered an issue with my CSS sprite sheet that my CSS file seems unable to locate the image. Despite following the provided solution here, I'm still facing the same problem. The directory structure of my bundle is as follows: src/ v ...
Currently, I am experimenting with cross-site scripting using Jquery and PHP/Symfony (HttpFoundation Component), but I'm facing difficulties in obtaining the necessary data from the server. My objective is to have Jquery fetch JSON from the local dom ...
My experience lies in PHP, but I am fairly new to Symfony. Let's say I have a service that requires an unknown quantity of another service. It is not practical to inject it as I don't know how many instances would be needed. I could potentially use the Con ...
I have a Vue application with a Symfony backend. I am using TinyMCE to edit documents that are generated by mpdf. In the mpdf twig content, I need to add a page footer on certain pages and exclude it on others. To achieve this, I have created custom HTML t ...
I am trying to implement a functionality where clicking on an image opens a window to select a new image and update the screen. However, when attempting to change the picture in the database, I encountered the following error: Catchable Fatal Error: Arg ...
I've been grappling with this error for a while now. I'm currently developing an Angular app (version 1.6.1) and encountering issues when trying to call a delete method on the API, which is built in symfony 3. Initially, I faced a preflight error while us ...
After being inactive for two hours, the system logs me out automatically. However, whenever I refresh the page, an error message appears stating that Silex cannot find the attribute displayName on a null attribute. The layout view contains: {{ app.user.dis ...
I'm trying to make a request without using a submit button, only by selecting an option. So far, I've attempted to achieve this using JavaScript but haven't had any success. Here's my form code: $form = $this->createFormBuilder() ...
New to working with Symfony2. I'm attempting to set up a service in my application by following the instructions in the Symfony documentation. Below is the code I have so far: File BC/MBundle/Resources/config/services.yml: --- services: metas: ...
I am currently working on integrating vue.js with Symfony. While this Vue.js configuration worked flawlessly in Laravel, I am facing difficulties with Symfony and unfortunately, I need to use Symfony for this particular project. My webpack.config.js is se ...
One of the features in my Question entity is its 'OneToMany' relationship with Answer. My current query involves creating a unique endpoint with the path='question/{id}/add_answer', specifically designed for adding an answer to a specific question. How c ...
Upon clicking a button, I have implemented a method that is triggered by an Ajax request. /** * @param Request $request * * @Route("/add", name="rapid_access_add", options={"expose"=true}) * @Method({"GET"}) * * @return Response */ public function ...
I am attempting to display a column for Full name that combines the firstName and lastName properties from my entity. How should I go about this? Below is the Entity and Admin.php code snippets: class test{ private firstName; //other properties privat ...
In my Symfony Form, I am attempting to display a SelectField with various icons. Here is what my ChoiceType looks like: ->add('icon', ChoiceType::class, [ 'choices' => [ '' => '', '' = ...
Just starting out with Symfony here! Why would using a Listener as a Service be advantageous over just a Service? I've been checking out the documentation and I noticed that I can utilize a Listener as a Service: However, there's also the option of usin ...
I am currently working on a project that involves a Symfony 5 and Vue 3 application. In this setup, a Symfony controller creates a form and provides its HTML through a JSON response. The code snippet below shows how the form HTML is returned as a string: i ...
Using Symfony 4... Executing the following command: php -d memory_limit=-1 composer.phar require form The process is successful up to this point... ./composer.json has been updated Loading composer repositories with package information Updating depend ...
I currently have four tables - EdiTransaction, EdiTransactionDetail, EdiDocType, and Edi997Details. The EdiTransaction table has relationships with EdiDocType and EdiTransactionDetail, while Edi997Details is only related to the EdiTransaction table. I am w ...
As I work on building an application using Symfony2 platform, I encounter an issue with a simple AJAX request that is triggered on document ready. jQuery.ajax({ url: 'test.php', type: 'POST', data: { 'test&apos ...
After creating an SQL script with a large amount of data and running it in a postgresql Database, I encountered an issue while using the Doctrine2 ORM within the application to manage the database. The specific problem I am facing is as follows: When in ...
After successfully setting up the SonataIntlBundle bundle, I noticed that the default format_date displays dates as day-number month-name year. {{ date_time_object | format_date }} => '1 août 2011'Source Now, I am looking to personalize this default ...
In one of the services within my application, there is a need to access a specific $_SERVER variable provided by apache known as $_SERVER['GEOIP_COUNTRY_CODE']; What options are available to fulfill this requirement effectively? At the moment, ...
I followed the tutorial on Symfony's documentation titled "How to Create an Authentication Endpoint using JSON in Symfony". However, I encountered a problem when making an AJAX call at my login handler. Instead of successfully logging in, I received a 500 ...
Below is the routing information for the post route: cacic_uorg_type_excluir: pattern: /uorg/type/excluir/{idUorgType} defaults: { _controller: CacicCommonBundle:UorgType:excluir, idUorgType: null} requirements: idUorgType: \d+ This represents ...
Working on my Symfony project, I frequently need to display various views in table format. I wish I could easily update the data by clicking on table cells, entering new information, and saving it dynamically. After exploring jqGrid, DataTable with jEdit ...
Currently I am working on a project using Symfony 4, and I have set up a ManyToMany relationship with a junction table. This setup allows entity A to have multiple instances of entity B, and vice versa. In this scenario, entity A is the owner of entity B. ...
Seeking assistance on how to update the DateTime using Doctrine in my controller. The main objective of this page is to enable users to upload photos to a database, with only one upload allowed per user. Although everything else is functioning properly, ...
I'm currently working on implementing a dynamic text field with AJAX autocomplete functionality. In order to handle the AJAX call, I have created a method in the controller. public function cityAction(Request $request) { $repository = $this-> ...
Is there a way to disable the rendering of HTML responses in Twig? I am currently working on a RESTful API and my goal is to completely prevent HTML rendering. For instance, if I access /foo/bar without an oAuth Access Token, Symfony2 should reply with a ...
Working with Symfony2, I have a requirement to pass a parameter from the Controller to the FormType. Here is my Action snippet: public function addAction(Request $request) { $employee = $this->getUser(); if (null === $employee) { ...
Currently, I am in the process of developing a front-end application using Durandal/Knockoutjs along with a web service backend created with Symfony2 that utilizes Doctrine for database access. In my project, I have two entities that are related in a one- ...
I am encountering an issue with the single table inheritance mapping for Doctrine ORM, also known as STI. It appears that having a one-to-many association from the STI entity to another entity is not possible. I have two entities named Customer and Suppl ...
In my database, there is a column named "refused" which can have values of 0, 1, or NULL. I am trying to retrieve rows that only have values of 0 and NULL. My attempt so far has been using the following code: ->andWhere('b.refused IS NULL') While th ...
I'm working on a Twig file where I need to create a table and populate it with data using a loop. The issue is that all my field names are the same, so I want to add a counter variable to differentiate them. How can I achieve this? Below is the code ...
I'm struggling to figure out how to update or delete fullcalendar events in my Symfony project. When adding a new event, I open a modal window with a form for submitting the event and inserting it into the database. This is my working controller: $ ...
Perform an ajax POST request with no response: Here is the ajax request code snippet: $.ajax({ method: 'POST', url: "{{ path('app-like-add') }}", data: { imageId: id }, success: function(response) { if (respons ...
I am in the process of setting up a form to register food products in my database. Along with each product, I also want to include a list of ingredients found on the product packaging. For these two entities, I have created the following classes: Ingredi ...
I created a form called "AddressType" with an event listener that functions correctly when used independently. Below is the code: namespace NcClientsBundleForm; use SymfonyComponentFormAbstractType; use SymfonyComponentFormFormBuilder; use NcCli ...
Hello there and thank you for assisting me. English is not my mother language, so please bear with me. :) Whenever I choose an item from the selectbox, I am greeted with a "no results found" message. However, upon inspecting the developer toolbar, I notic ...
I am trying to inject the EntityManager instance into the constructor of my controller. Here is the code I have: namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Doctrine\ORM\ ...
Having recently subscribed, I have come to seek assistance on a platform where I have previously found many solutions to my issues. I have completed a course on Openclassrooms (Transitioning to a Professional PHP Architecture) which has equipped me with t ...
In the process of developing a RESTful API, I am utilizing Symfony2 along with FOSRestBundle and an OAuth 2 server library to enhance functionality. When handling requests, it is important to consider the various responses and status codes that can be sen ...
My Controller relies on Annotations for Route, Method, Template and ParamConverter. However, I am encountering an error whenever I make any changes to the file, even if it's just a minor edit like a whitespace change or comment. Cannot import resourc ...
I am faced with the following two entities : KTH : namespace NaukaOneBundleEntity; use DoctrineORMMapping as ORM; use DoctrineCommonCollectionsArrayCollection; /** * NaukaOneBundleEntityKth * * @ORMTable(name="kth") * @ORMEntity */ class K ...
Hey there! I recently tried to follow the advice provided in this article: How do I go about removing fields from the admin user create page of Sonata User Bundle? I attempted adding/removing lines to the registration form of Sonata Userbundle, but encou ...
Currently, I am employing docker-compose with PHP 7.2 from the phpdockerio/php72-fpm:latest image. services: webserver: image: nginx:alpine The configuration for nginx is as follows in nginx.conf: user nginx; pid /var/run/nginx.pid; ev ...
I have defined parameters as follows: parameters: config1: title: Title 1 data_proc: getDataOne options: [things, stuff] config2: title: Title 2 data_proc: getDataTwo options: [things, stuff] #... A ...
Within my entity, I have a field named linkedDocuments: class Documents { /** * @ORM\ManyToMany(targetEntity="App\Entity\Documents") * @ORM\JoinTable(name="documents_documents", * joinColumns={@JoinColumn(name="link_origi ...
I've developed a CLI app that utilizes the Symfony 3 fileSystem component to create a file. Everything works perfectly, but when I package the app into a Phar archive, Symfony is unable to write the file. Here's how I created the Phar archive: ...
I'm currently testing image uploads using Selenium/Mink with Behat in a Symfony application running within a Docker container. Instead of using $driver->attachFileToField('#id-of-input', $filePath), I am attaching the file directly to th ...
Looking to remove specific data and retrieve the number of deletions made. Below is the code I am using: public function deleteMyData() : ?int { $qb = $this->connection->createQueryBuilder() ->delete('myTable') -> ...
I have a controller that retrieves data from my database, formats it as valid JSON, but the HTTP response is text/html instead of application/json. This causes issues with getJSON not working properly. Should getJSON work regardless? public function send ...
Hey there! I have a query regarding caching and rendering controllers. I've implemented $kernel->loadClassCache() in my app.php file to enable app caching. It's working fine as my site is now performing much faster :). However, I'm facing an issue wit ...
I recently delved into the world of AJAX and Json, working on creating a call for a thread of comments to be displayed on my webpage. After the controller finishes loading, it returns an array of objects in Json format: '[{"usr":"gigi","usrpic":"4993 ...
In my Symfony2 / Doctrine 2 application, I encounter an issue when attempting to run `fos:elastica:populate`: [ElasticaExceptionBulkResponseException] Error in one or more bulk request actions: index: /foodmeup/offer/4 caused MapperParsingExc ...
My application is located in a subdirectory at www.example.com/application/v1 and I have a third-level domain set up at v1.example.com. I am using Symfony2 and this is the content of my .htaccess: DirectoryIndex app.php <IfModule mod_negotiation.c> ...
I'm creating a website that showcases various projects with a menu. This menu allows users to filter projects by language. However, I'm facing an issue with the query to retrieve projects for a specific language. I have two entities: Project and Language: ...
Currently utilizing Symfony version 5.3.7 and incorporating the @Assert annotations for validating a new user during registration. Struggling to grasp the documentation and looking to comprehend how to apply these annotations for entity validation. Tried e ...
I have been working on modifying the default areas of the fosuserbundle registration form. I managed to add all the necessary fields I wanted by updating the database and customizing with the bootstrap cdn. However, I encountered an issue when attempting t ...
Is there a way to extract values from JSON data that have been placed into my classes (Match, Player)? I attempted using a foreach loop, but found it challenging since the data is stored in classes. Can someone provide guidance on how to tackle this issue ...
Is there a way to reload a form inside a materialize modal with empty fields without closing the modal after submitting? The issue is that currently, when the submit button is clicked, the modal closes and redirects. <div class="modal" id="docM ...
I came across this solution but unfortunately, I couldn't get it to work... Here is my code, along with what I've tried and the results I'm getting: My Code 1/ My Security Provider : $app->register(new Silex\Provider\Session ...
In my database, I have 'category' and 'product' tables. Categories are displayed in a dropdown select box on the product form. When editing a product, I want the saved category in the product table to be automatically selected in the category dropdown on t ...
Utilizing Angular JS code, I employ a method to submit a file and additional fields (along with a CSRF token) to a Symfony controller. var formObject = new FormData; formObject.append('email', self.careers[index].application.email); formObject.appe ...
Is it possible to include an icon in a post using the sw_icon command? For instance: {% sw_icon 'head' %} Are there any alternatives to using 'head' for this command? ...
I am currently encountering an issue while attempting to retrieve data using Angular from my Symfony API, which returns JSON: "Cross-Origin Request Blocked: The Same Origin Policy prohibits reading the remote resource at http://localhost:8000/custom ...
I am currently working on a project with Symfony2 and I have a question regarding receiving arguments from a template in a controller. My goal is to take the value of the argument and store it in the database. The argument's value will be generated by ...
In my SYMFONY 3.0 Project, I am looking to upgrade from PHP5.5 to PHP7.1. While exploring the "php.ini" file for the necessary changes, there is one unresolved issue: Previously, under PHP5.5, I utilized the extension accelerator php_apcu.dll. However, i ...
Currently, I am working on a project involving Symfony2, Doctrine, and AngularJS. While Symfony2 and Doctrine are not causing any issues, I am facing difficulties when using an ajax request with AngularJS. The problem lies in either the data not loading pr ...
My issue lies with api-platform.com's event not attaching to my listener. Despite trying multiple combinations from their event matrix, the trigger still remains elusive. # services.yml user_access_listener: class: AppBundleEventListenerUserAc ...
While working on my project using everyday assetic in work (OS: Win7), I encountered an error today when I ran the command: php bin/console assetic:watch. The error message I received was: [SymfonyComponentDebugExceptionContextErrorException] Notice ...
I'm hoping I haven't overlooked anything important. Following the instructions provided in this link, I have successfully installed HWIOauthBundle (along with FOSUserBundle): https://gist.github.com/danvbe/4476697 I copied code from the files t ...
Currently, I am in the process of updating an older PHP application. I am attempting to utilize Symfony's dependency injection component to inject services into controllers (and other services), but I am encountering difficulties as the Symfony docum ...
When transitioning from Symfony 3 to Symfony 4, what is the equivalent of the view directory? I am currently developing a simple todo list application in Symfony 4 and cannot locate the resources folder for creating views. ...
I am working with a basic controller and need to utilize the entity manager: <?php namespace HanziGameMainBundleController; use SymfonyBundleFrameworkBundleControllerController; use HanziGameMainBundleEntityHanzi; class DefaultController ex ...