265 questions
0
votes
1
answer
100
views
symfony2 "find" is not finding all results in db
In a project I am working on at the moment is not finding the part number in the database
its using symfony 2.7 and doctrine. Ive tried find, findBy, findOneBy, and findAll still none of them is able ...
0
votes
0
answers
37
views
Symfony 2 Production Setup Error on shared hosting - Contd
Continuing on from here:
Symfony 2 Production Setup Error: "redirected you too many times."
I tried some more things. I realised if I created a symlink from public_html to the web folder and ...
0
votes
1
answer
37
views
Symfony2.7 - Call a service into a formhandler return Fatal error: Call to a member function on null
I have a symfony 2.7 website that I have to add some functionalities to.
The last developers used formHandler in order to manage forms and keep controllers as clean as possible (that works fine). ...
0
votes
1
answer
221
views
Symfony 2.7, form won't submit if field is blank
I have a classic form, with a few 'entity' type fields and one collection type fields. Those aren't causing any issue.
When I put data in all the field, except the description field, as I want it to ...
0
votes
1
answer
74
views
Controller sends null value in a set command in Symfony2
I have a controller that inserts new records, but sends NULL value to idUsuario which is the ID of the user who is creating the new record.
I have already checked the entity file, the estructure of ...
0
votes
1
answer
305
views
Order data by datetime Symfony 2
I have an array that contains data. I want to show my data by date (the new data at the head of the list) using the attribute "CreatedAt" which type is datetime.
here's my controller:
{
$...
0
votes
2
answers
275
views
Notification dropdown symfony
I have a notification icon. When user clicks on it, a dropdown appears and shows a list. I want to filter list to only show what's related to the connected user.
{% if app.user.roles[0] == "...
0
votes
1
answer
193
views
Problems having two different forms in the same twig file
I have been experiencing problems with embedding a controller that creates a form where you can upload files. When the controller is rendered in certain parts of the twig file, I get this error:
An ...
0
votes
0
answers
609
views
PHP-FPM is slow only for the sub domain
We have a project running in nginx/php-fpm which is basically a multi-site setup build on Symfony 2.7 and we're working on the next version of the site which is basically adding an another site to the ...
1
vote
1
answer
314
views
Process multiple operations in SOAP server with Zend
I'm testing a SOAP server which must receive multiple operations in one single request. The server is configured with Symfony 2.7, PHP 7.1, and zend-soap 2.7. I can't upgrade now the versions of ...
1
vote
0
answers
1k
views
Remove entity not working inside the form easy admin bundle
I have this code :
{{ form_start(form, {'attr': {'class': 'form-vertical edit-form', 'id': 'new-users-form', 'data-view': 'new'}}) }}
<div class="row">
<div class="field-group col-xs-12 ...
0
votes
0
answers
167
views
trying to install mmoreram/gearman-bundle gives error on symfony 2.7
Looks like I'm missing something or maybe wrong doctrine version.
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "...
0
votes
0
answers
700
views
Setting default value in a Sonata Admin dropdown
I am working on a Symfony 2.7 application that uses the Sonata admin bundle. I have a form defining a Video that allows users to select a Country of origin from a dropdown. Each user entity already ...
3
votes
1
answer
5k
views
Rewrite curl with Guzzle (File Upload) - PHP
I'm trying to upload a file to my server and then send that file to Zendesk. The Zendesk docs show how:
curl "https://{subdomain}.zendesk.com/api/v2/uploads.json?filename=myfile.dat&token={...
1
vote
0
answers
1k
views
PHP Defining Global Constants inside a Class
In PHP, how do you define a global constant (using the define method) inside a class? I would like my constant to be defined globally after a class has been instantiated.
Looks like this:
class ...
1
vote
0
answers
70
views
How to add a button in Akeneo that is going to display certain content?
I am a beginner in using Akeneo, but I know how to follow up a documentation.
https://docs.akeneo.com/cookbook/ui_customization/add_a_custom_button_to_product_edit_form.html
I tried this, and it ...
0
votes
1
answer
1k
views
Specifying a blank argument in symfony service
I'm trying to define a custom SwiftMailer Transport in symfony as a service and nearly got it, apart from the service definition. The XML below is from the Swiftmailer-Mailgun-bundle and this works, ...
0
votes
1
answer
687
views
How to iterate over subforms in Twig to display validation errors?
I want to iterate over all fields in my form and display the error (validation) message by mismatching. I use the following code and it works for all field which are located directly in the form ...
1
vote
0
answers
1k
views
How to fix OutOfMemoryException in Symfony 2.7
I use a really memory intensive function to generate a csv export file from diffrent SQL tables and values.
When i choose a dataset where is to large, than i get this error:
OutOfMemoryException in ...
0
votes
0
answers
176
views
symfony2 @Assert\File empty in database
I'm trying to upload an excel file in a symfony2 form, but without giving any errors, it's not inserting anything in this field. Other fields are filled in well in my database. Anyone has an idea?
I ...
2
votes
1
answer
1k
views
Symfony 2.7 : EntityType - force no result in query builder
I didn't find a post to resolve my problem, hope it is not a duplicate.
In a Symfony Form, I declared an entity field.
$form->add($builder->getFormFactory()->createNamed(
'...
1
vote
1
answer
2k
views
How to add global event listener in symfony forms
I want to add event listener to all symfony forms on pre_set_data.
I have service and tag for this { name: kernel.event_listener, event: form.pre_set_data, method: onSetData}
The event listener is ...
-2
votes
1
answer
228
views
Execute huge sql file
I'm trying to create a function which create a "huge" sql file (10 MB) with lots of INSERT queries.
Generating the file is done, now I'd like to execute the sql.
In PHP, I would do:
$connexion = ...
1
vote
2
answers
115
views
Doctrine : SELECT a relationned entity
I have 2 entities :
LinkServInfra
Serv
LinkServInfra entity :
id
serv (relation OneToOne to Serv)
infra (ManyToOne to another entity)
Now, I'd like to get a list of Serv based on infra.
So I tried ...
0
votes
1
answer
321
views
Symfony 2.7 - Service is not loaded/registered
Working on Symfony 2.7 -
I created a new service (ipad.registerchecksum) in a custom bundle and now I try to use it as an argument in another service (ipad.download_history) in another custom bundle ...