How to redirect to a specific section of a page?
At the bottom of my HomepageI have a contact form. After the user submits the form I want to redirect him to that specific Section.Which is the bottom of the page. (So he can see the form errors, or he...
View ArticleSymfony 4, Intercept the redirect of an unauthorized user to the login page
How to intercept a redirect to the login page if an unauthorized user is trying to get into a secure space?I want handling redirect and throw a 404 error. I know how to do this in each individual...
View ArticleCan't install the jwt-refresh-token-bundle
I'm working on a Symfony4 project (PHP 7.2.4) on Windows10 OS.When i try to install jwt-refresh-token-bundle by doing :composer require "gesdinet/jwt-refresh-token-bundle", i get the following error...
View ArticleSymfony4 / Docker: SQLSTATE[HY000] [2002] Connection refused
i have a problem with Symfony 4 and database connexion.I try to make migration with php bin/console make:migration but then i face the connection refused error. In AbstractMySQLDriver.php line 113: An...
View ArticleEasyAdmin 3 create custom field
I'd like to create custom autocomplete field with externe api call.I'm using doc Create custom fieldsBut my template is not used.public static function new(string $propertyName, ?string $label = null):...
View ArticleSymfony 4 Undefined Function Error Enhancer not found
After the upgrade from Symfony 4.2 to 4.4, the Debugger Class showed me, that I should change fromuse Symfony\Component\Debug\Debug;touse Symfony\Component\ErrorHandler\Debug;But after this, the...
View ArticleSymfony 4 global route prefix
I can't find any info about the global route prefix in a Symfony 4 application. The only thing I've found is annotating the controllers with @route. But I don't use annotations and I need all the...
View ArticleSymfony 4 MongoDB ODM One to ONe relationship is not working
I am facing an error with symfony and mongoDB odm on one to one relationshipfor example i have a user that has Work .User Class:/** * @MongoDB\Document * @MongoDBUnique(fields="email") */class User...
View ArticleSymfony upgrade give me error from 4.1 to 4.4
I just made the migration from symfony 4.1 to 4.4I have this error:Argument 1 passed to App\EventListener\KernelRequestListener::__construct() must be an instance of...
View ArticleHow to get the path of the image in symfony twig?
I need to add image into the email. My images are located inside the public folder. I have defined in my twig.yaml like this:twig: globals: image_dir: '%kernel.project_dir%/public/images/logos'...
View ArticleHow to attach image to the email using symfony mailer?
I need to add image into the email. My images are located inside the public folder. I have defined in my twig.yaml like this:twig: globals: image_dir: '%kernel.project_dir%/public/images/logos'...
View ArticleDisallow adding|removing|updating item in relational field based on user...
This is a follow up to my previous question Security voter on relational entity field when not using custom subresource pathSo the situation is, image you having ManyToMany relationship between...
View Articlehow to get the image depend an article in a relation one to many?
1.Im looking for get the images of a banner.2.Every banner has many images with a relation OneToMany.3.i think i have just select the banner where isActive= true and get the collection of images but...
View ArticleCircular referencing in Symfony forms
I am currently building a Symfony 4.4 API that is capable of adding objects to a database. Since I believe that my problem can be explained and resolved using only theory I won't add my actual code...
View ArticleSemantic UI with Symfony Webpack Encore
I can not find how to integrate Semantic UI with Webpack Encore for my Symfony 4 project.Is it the only way to load npm and build the semantic folder with gulp. Than copy to assets and let them build...
View ArticleCron task won't run even if specified in file [closed]
I have problem when running cron task in Symfony.I tried command that it's set to run manually and it work but when I set cron it does not. I have two cron jobs in crons file and the first one works...
View ArticleDatetime range won't select specific date
I have a method to return results from db from startDate to endDate passing in like parameters in postman.Everything seems to be working fine but it returns all results from database.I think that...
View Articlebest way to get current objec before update - put api platform
I created a put operation to my Orders class. I need to check if the order is canceled (status: 5) before updating the object. I need to get the current object (like it is in the database) to know the...
View ArticleWebpack - Materialize with Symfony
I'm running a project on Symfony. I want to use for the first Time, Symfony 4, Webpack and Vagrant/Homestead.My host is a Windows 10My project is host on a VM made with vagrant/Homestead on...
View ArticleAssociationField does not save the entered values
AssociationField does not save the entered values in DB.I select Tag and click save. And does not save.I've tried everything, and I can't figure it out.I even recorded a...
View Article