Giter VIP home page Giter VIP logo

g6k's People

Contributors

eureka2 avatar opportus avatar stsaklas avatar yanntoque avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

g6k's Issues

Erreur lors de l'installation sur la version Symfony 4.2 et plus

Bonjour,

Il y a une erreur d'installation depuis Symfony 4.2 et plus.

Message d'erreur :

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in I:\xampp\htdocs\TestProg\simulator\vendor\willdurand\js-translation-bundle\DependencyInjection\Configuration.php on line 20 and at least 1 expected in I:\xampp\htdocs\TestProg\simulator\vendor\symfony\config\Definition\Builder\TreeBuilder.php:26 Stack trace: #0 I:\xampp\htdocs\TestProg\simulator\vendor\willdurand\js-translation-bundle\DependencyInjection\Configuration.php(20): Symfony\Component\Config\Definition\Builder\TreeBuilder->__construct() #1 I:\xampp\htdocs\TestProg\simulator\vendor\symfony\config\Definition\Processor.php(50): Bazinga\Bundle\JsTranslationBundle\DependencyInjection\Configuration->getConfigTreeBuilder() #2 I:\xampp\htdocs\TestProg\simulator\vendor\willdurand\js-translation-bundle\DependencyInjection\BazingaJsTranslationExtension.php(24): Symfony\Component\Config\Definition\Processor->processConfiguration(Object( in I:\xampp\htdocs\TestProg\simulator\vendor\symfony\config\Definition\Builder\TreeBuilder.php on line 26

How not to install the demo when using Docker ?

Hi,

I use a Dockerfile for installation.

In my Dockerfile I use environment variables to have my db.
From centos 8 i install php, httpd and composer, then i use the command to get g6k

Something like this :

FROM centos8

ENV APP_LANGUAGE=fr
ENV DB_ENGINE=mysql
ENV DB_HOST=200.20.2.0
ENV DB_PORT=2222
ENV DB_USER=myUser
ENV DB_PASSWORD=myPassword
ENV DB_NAME=myBaseName

RUN yum -y update

RUN yum -y install \
		httpd \
		php \
		all-php-stuff \
	&& yum clean all

RUN yum upgrade -y && yum clean all

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/var/www/ --filename=composer

# Install g6k
RUN cd /var/www/ && php -d memory_limit=-1 composer -v create-project eureka2/g6k ./html/

RUN chmod -R 755 /var/www && chown -R apache:apache /var/www
RUN /usr/sbin/httpd -k restart

ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]

It works fine.

There is just one thing : i can't find a way to not install the demo. It seems that the default is "yes" and that you cannot configure it with an environment variable.

Is it possible ?

Thank you in advance for your answer.

Listboxes

Hi there,

I have an implementation of G6K running as an iFrame. Whilst the system works perfectly, there is an issue with the listbox component - because it's styled as an "absolute" position, it is not tracked in the DOM.

I have tried hacking the CSS and JS and feel the only way to do this reliably is to get rid of the JS listbox functionality. I want the default select box to appear again - how do you do this?

Many thanks

Rich

simulator and the registration card

Hello, my dear,

I want to know if we can test this simulator before we attempt installation.

My client would like to install a simulator with just a car plate information form and the registration card calculation is done automatically.

But I can’t find a visual of the result for this simulator.

Thank you so much.

Error when publishing simulator

Hi,
Can you help me please?
I tried to create a simulator and got this error when I looked at http://127.0.0.1/test/simulator/calcul/prix-carte-grise

Error : Exception: Unable to find the step whose id is '1'
at App.G6K.Model.Simulator.getStepById(Simulator.php:945)
at App.G6K.Controller.BaseController.runStep(BaseController.php:465)
at App.G6K.Controller.DefaultController.runCalcul(DefaultController.php:160)
at App.G6K.Controller.DefaultController.calcul(DefaultController.php:67)
at Symfony.Component.HttpKernel.HttpKernel.handleRaw(HttpKernel.php:158)
at Symfony.Component.HttpKernel.HttpKernel.handle(HttpKernel.php:80)
at Symfony.Component.HttpKernel.Kernel.handle(Kernel.php:201)
at (main)(index.php:37)
Code : 0
#0 C:\xampp\htdocs\test\simulator\src\G6K\Controller\BaseController.php(465): App\G6K\Model\Simulator->getStepById(1)
#1 C:\xampp\htdocs\test\simulator\src\G6K\Controller\DefaultController.php(160): App\G6K\Controller\BaseController->runStep(Object(Symfony\Component\HttpFoundation\Request), Array, 'prix-carte-gris...', 'Demo', false)
#2 C:\xampp\htdocs\test\simulator\src\G6K\Controller\DefaultController.php(67): App\G6K\Controller\DefaultController->runCalcul(Object(Symfony\Component\HttpFoundation\Request), 'prix-carte-gris...', 'Demo')
#3 C:\xampp\htdocs\test\simulator\vendor\symfony\http-kernel\HttpKernel.php(158): App\G6K\Controller\DefaultController->calcul(Object(Symfony\Component\HttpFoundation\Request), 'prix-carte-gris...', NULL)
#4 C:\xampp\htdocs\test\simulator\vendor\symfony\http-kernel\HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#5 C:\xampp\htdocs\test\simulator\vendor\symfony\http-kernel\Kernel.php(201): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#6 C:\xampp\htdocs\test\simulator\calcul\index.php(37): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#7 {main}

Thank you.

How to use simulator as API

Hi , i want to use the simulator as API to be implemented in an externel website , i have added the following lines to the "EUREKA\G6KBundle\Resources\ config\parameters.yml" file .

     api:
         mysimulator:
             step: 2
             action: calculate

my simulator works fine , as i have understood from the reading the code and the previous issue the api should run on :
/calcul/mysimulator/api
but cause of luck of Symfony knowledge i didn't know how to pass the arguments and as POST or GET Request , Thanks

The index page of simulators doesn't load

Hi,

I had some problem after installation with sources from "master" branch.
I've this message for example : "Impossible to access an attribute ("css") on a string variable ("Boîte à liste conforme RGAA")." when I tried to load index page

After investigation I've succeed to fix all error by modifying the source code.

Do you have similar problem ?

Best regards,

problem of test g6K

hello please i have a problem when i went to test my application:

  1. uncaught typeerror datepicker is nota function
    2)unable to find a datasource whose name is 'demo'
    Capture

displayable fields

$displayable = true;

Hello

Refering to the LOC the algorithm consider the step diplayable when at least one field is displayable. What if we have one field displayable = true and another false ? or there is a certainty that if one field is displayable all the others are ?

What if we want to make a pure informatif step with no fields ? i already try to make so all is goog the xml is valid but all what i'v got is a infinit loop testing the result with try it

Ths

Differenc between browser view and API result

Hi

I'm making some test with the API on the simulator provided here : https://www.data.gouv.fr/fr/datasets/simulateur-de-cout-du-certificat-dimmatriculation-carte-grise/

capture d ecran 2018-11-22 a 16 09 42

here is the same request's result using API version

"attributes": { "demarche": "1", "franceOuImport": "1", "typeVehicule": "1", "declareVehiculeDemonstration": "2", "puissanceAdministrative": "50", "energie": "1", "invalidite": "2", "receptionCommunautaire": "1", "tauxCO2": "350", "departement": "92", "taxeRegionaleY1": "2308.00", "taxeAdditionnelleFortePuissance": "0.00", "taxeFormationProfessionnelleY2": "0.00", "Y3_taxe": "0.00", "Y3_Malus": "10500.00", "taxeGestionY4": "4.00", "redevanceAcheminementY5": "2.76", "taxesAPayerY6": "12814.76" },

As you can see, the Y1 bis fileds is set but in the API result, it's still at 0 (: "taxeAdditionnelleFortePuissance": "0.00",

Thanks for your time

Nicolas

Issue during installation

I try to install it but I have this :
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In ArrayNode.php line 327:
!!
!! Unrecognized option "migrations_paths" under "doctrine_migrations". Availab
!! le options are "all_or_nothing", "column_length", "column_name", "custom_te
!! mplate", "dir_name", "executed_at_column_name", "name", "namespace", "organ
!! ize_migrations", "table_name".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

Exception when I want to edit or test a simulator

Hi,

After having installed g6k and the simulator "coût du certification d'immatriculation", I encouter the following issue:


Error: Call to protected method Symfony\Bundle\FrameworkBundle\Controller\AbstractController::getParameter() from context 'App\G6K\Model\Simulator'
at App.G6K.Model.Simulator.loadDatabases(Simulator.php:1909)
at App.G6K.Model.Simulator.loadEntities(Simulator.php:1567)
at App.G6K.Model.Simulator.load(Simulator.php:1526)
at App.G6K.Controller.SimulatorsAdminController.runIndex(SimulatorsAdminController.php:248)
at App.G6K.Controller.SimulatorsAdminController.index(SimulatorsAdminController.php:181)
at Symfony.Component.HttpKernel.HttpKernel.handleRaw(HttpKernel.php:158)
at Symfony.Component.HttpKernel.HttpKernel.handle(HttpKernel.php:80)
at Symfony.Component.HttpKernel.Kernel.handle(Kernel.php:201)
at (main)(admin.php:37)
#0 /var/www/vhosts/cartegrise24h.fr/api/src/G6K/Model/Simulator.php(1567): App\G6K\Model\Simulator->loadDatabases(Object(SimpleXMLElement))
#1 /var/www/vhosts/cartegrise24h.fr/api/src/G6K/Model/Simulator.php(1526): App\G6K\Model\Simulator->loadEntities(Object(SimpleXMLElement), Object(SimpleXMLElement))
#2 /var/www/vhosts/cartegrise24h.fr/api/src/G6K/Controller/SimulatorsAdminController.php(248): App\G6K\Model\Simulator->load('/var/www/vhosts...')
#3 /var/www/vhosts/cartegrise24h.fr/api/src/G6K/Controller/SimulatorsAdminController.php(181): App\G6K\Controller\SimulatorsAdminController->runIndex(Object(Symfony\Component\HttpFoundation\Request), 'cout-certificat...', NULL)
#4 /var/www/vhosts/cartegrise24h.fr/api/vendor/symfony/http-kernel/HttpKernel.php(158): App\G6K\Controller\SimulatorsAdminController->index(Object(Symfony\Component\HttpFoundation\Request), 'cout-certificat...', NULL)
#5 /var/www/vhosts/cartegrise24h.fr/api/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#6 /var/www/vhosts/cartegrise24h.fr/api/vendor/symfony/http-kernel/Kernel.php(201): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#7 /var/www/vhosts/cartegrise24h.fr/api/calcul/admin.php(37): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#8 {main}

THe exception is displayed even in front or admin.

For information, I already have an older version of the API (Symfony 2 version) which is working on the same server.
For this new installation, I created a neaw vhost, et a new database with associated user.
The database is not called "cout_certificat_immatriculation", but "cout_immat" (to avoid overwriting the datas of the current running version).

The database connexion is ok, I was able to test it without any issue et btw, the datas are visible when I go to data source in the admin.

So I'm wondering is the issue isn't the link between the simulator and the data source.
Where can I find this without using the admin as I can't load the simulator in it?
Maybe through an xml file somewhere in the sources?

Account ?

Hello I have a problem concerning the use of your script it asks me an account but in the documentation it is not written anywhere that it is necessary to use an account
www/calcul/login
https://prnt.sc/pvxddm

Impossible d'installer suite à mise à jour Symfony

Bonjour,

Suite à la mise à jour de Symfony, l'installation est impossible.

Message d'erreur :
Unrecognized options "dir_name, namespace, table_name" under "doctrine_migrations". Available options are "all_or_nothing", "check_database_platform", "connection", "custom_template", "em", "factories", "migrations", "migrations_paths", "organize_migrations", "services", "storage".

Piste pour l'upgrade :
https://github.com/doctrine/DoctrineMigrationsBundle/blob/3.0.x/UPGRADE.md

"Required" and "Required if visible" conditions on fields seem not be applied

Hello Jacques,

I'm setting up a "CoutCertificatImmatriculation" simulator for a client.

I believe the "Required" and "Required if visible" conditions on panel's fields are not applied.

To reproduce the issue:

  1. Go on https://www.service-public.fr/simulateur/calcul/cout-certificat-immatriculation
  2. Select the démarche: "Première immatriculation en France d'un véhicule"
  3. Click the "Calcul" action button

I'd expect to get error messages and not be able to submit the form...

installation problème for G6K with few errors

Hello,

Please help me or suggest me what i can do.

I have an installation problème for G6K with few errors bellow.
I do all the necessary prerequisites mentionned for symfony and g6k but the problème still there.

I do a copy past from the console bellow:

My server :
Debian 10
Apache2
Php 7.3

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires symfony/property-access ^4.3, found symfony/property-access[v4.3.0, ..., v4.4.30] but the package is fixed to v5.3.7 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 2
- Root composer.json requires symfony/property-info ^4.3, found symfony/property-info[v4.3.0, ..., v4.4.30] but the package is fixed to v5.3.7 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 3
- Root composer.json requires symfony/proxy-manager-bridge ^4.3, found symfony/proxy-manager-bridge[v4.3.0, ..., v4.4.27] but the package is fixed to v5.3.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 4
- Root composer.json requires symfony/serializer ^4.3, found symfony/serializer[v4.3.0, ..., v4.4.27] but the package is fixed to v5.3.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 5
- Root composer.json requires symfony/debug-bundle ^4.3, found symfony/debug-bundle[v4.3.0, ..., v4.4.27] but the package is fixed to v5.3.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 6
- Root composer.json requires symfony/stopwatch ^4.3, found symfony/stopwatch[v4.3.0, ..., v4.4.27] but the package is fixed to v5.3.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 7
- Root composer.json requires symfony/web-profiler-bundle ^4.3, found symfony/web-profiler-bundle[v4.3.0, ..., v4.4.28] but the package is fixed to v5.0.11 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

What's next?

Some files have been created and/or updated to configure your new packages.
Please review, edit and commit them: these files are yours.

symfony/framework-bundle instructions:

doctrine/doctrine-bundle instructions:

  • Modify your DATABASE_URL config in .env

  • Configure the driver (postgresql) and
    server_version (13) in config/packages/doctrine.yaml

symfony/phpunit-bridge instructions:

  • Write test cases in the tests/ folder
  • Run php bin/phpunit

App\G6K\Composer\ScriptHandler::installUsers
Installing the users of the administration interface
Can't connect to database : could not find driver
App\G6K\Composer\ScriptHandler::installDemo
Would you like to install the demo simulator? [y/N] y
Installing the demo simulator
Script App\G6K\Composer\ScriptHandler::installDemo handling the g6k-scripts event terminated with an exception

[PDOException]
could not find driver

XML errors lors de l'importation d'un simulateur

Bonjour,

Je rencontre l'erreur suivante lors de l'importation de la définition du simulateur des droits de succession :

XML Validation errors :
C:\fakepath\definitions-des-simulateurs_droits-succession.xml => Line 12: Element 'DataSet', attribute 'arbotypePage': The attribute 'arbotypePage' is not allowed.
ect.....
Administration G6K

Pas de problème pour l'import des sources de données juste les erreurs pour l'import de la définition... j'ai sans doute raté un truc mais je vois pas trop quoi....

Merci d'avance pour le coup de main :)

Error just after installation

Symfony\Component\Debug\Exception\FatalThrowableError: Argument 3 passed to FOS\UserBundle\Doctrine\UserManager::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in /media/mendrika/Data/dev/Ilo/G6K/var/cache/dev/ContainerJ0xUTMr/getFosUser_UserManagerService.php on line 13
at FOS.UserBundle.Doctrine.UserManager.__construct(UserManager.php:41)
at require(getFosUser_UserManagerService.php:13)
at ContainerJ0xUTMr.srcApp_KernelDevDebugContainer.load(srcApp_KernelDevDebugContainer.php:481)
at require(getFosUser_UserProvider_UsernameService.php:12)
... 19 more

xml error when publishing simulator

i try to use your application, but when i publish the simulator, i have an xml error
erreur G6K

im running sf 4.4.25
G6K : 4.48
php 7.4
MySQL 5.7
win 10
local env : wamp 3.2

also i wanna know what i must do after publishing the simulator to use it (it's not mentioned in the doc, it'll be nice if u add it)

g6k Simulator multiplies php-fpm processes

Hello,
Sincerely thank you for your contribution to improving the world.

I am currently running your simulator on nginx. I have noticed that when my android device (and other except my ubuntu laptop) tries to access the simulator, the php-fpm process multiplies exponentially and crashes.

Can you give me any indication so that I can find the causes of this problem?

Sincerely,

kiady

Can't install G6K : PHP Fatal error: Uncaught Error: Class 'Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle' not found

Hello,

I can't install the latest version G6K.

php -d memory_limit=-1 composer.phar create-project eureka2/g6k simulator/ 4.*

Everything is going fine until after the .env creation :

Creating the ".env" file
Enter the application environment [dev or prod] (prod): 
Enter the debug mode [0 or 1] (0): 
Enter the locale [en-GB, en-US, fr-FR, ...] (en-US): fr-FR
Enter the upload directory (%kernel.project_dir%/var/uploads): 
Enter the absolute path of the pdftk executable (~): 
Enter the mailer URL (null://localhost): 
Enter the database engine [sqlite, mysql or pgsql] (sqlite): 
Enter the database version (3.15): 
Enter the database path (%kernel.project_dir%/var/data/databases/g6k.db): 
Enter the HTTP proxy url [http://user:pass@host:port] (~): 
Enter the HTTPS proxy url [https://user:pass@host:port] (~): 
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  PHP Fatal error:  Uncaught Error: Class 'Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle' not found in /xxx/xxx/xxx/simulator/src/Kernel.php:33

Do you have a hint about what is causing this error ?

Thanks

Best regards

Fatal error: Uncaught Error: Class 'ResourceBundle' not found in /Users/andre/simulator/src/G6K/Composer/ScriptHandler.php:161

Salut, je tente depuis quelques jours d'installer le simulateur en local, mais aucune chance. Pouvez -vous m'aider ?
je suis débutant

Merci

voici l'erreure

Fatal error: Uncaught Error: Class 'ResourceBundle' not found in /Users/andre/simulator/src/G6K/Composer/ScriptHandler.php:161
Stack trace:
#0 /Users/andre/simulator/src/G6K/Composer/ScriptHandler.php(112): App\G6K\Composer\ScriptHandler::getEnvironmentVariables(Object(Composer\Script\Event), Array)
#1 phar:///Users/andre/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(341): App\G6K\Composer\ScriptHandler::buildDotenv(Object(Composer\Script\Event))
#2 phar:///Users/andre/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(220): Composer\EventDispatcher\EventDispatcher->executeEventPhpScript('App\G6K\Compose...', 'buildDotenv', Object(Composer\Script\Event))
#3 phar:///Users/andre/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(87): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))
#4 phar:///Users/andre/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(200): Composer\EventDispatcher\EventDispatcher->dispatch('symfony-scripts', Object in /Users/andre/simulator/src/G6K/Composer/ScriptHandler.php on line 161
$ php -d memory_limit=-1 composer.phar create-project

Error on import

Hi,

I install G6K apparently without errors, demo works fine, but when i try to import some data sources (sur les droits de successions) i've got this error :
g6k erreur-min

Not really an expert so don't really know what to do :)

Thx for the help

Business rules

Hello,
I have an issue with the business rules.
The taxeRegionaleY1 isn't divided by 2 for the vehicles more than 10 years.
Do I have to define something more than just import the json files?

Thank you in advance for your help,

Installing the users of the administration interface

Hello,

Symfony Version : 4.4.13

Can you please help me? During the installation, I had this error:

App\G6K\Composer\ScriptHandler::installUsers
Installing the users of the administration interface
Can't execute install users script : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(255) NOT NU' at line 1
Can't set sequence for table user : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'g6k.user' doesn't exist

Merci.

Widget abDatepicker is not installed

Hello,

thank you for the good job you did with the simulator.

So, I have an issue, I am trying to import a similator .xml and I got this error : 'Simulator Importer: The widget 'abDatepicker' doesn't exists'

Could you help me please ?

Warmest Regards,
Mamadou

Issue when trying to install g6k with php 7.4

Hi,

I Would like to install g6k on a new server on which php is running on version 7.4

Unfortunatelly I run into the following error during the installation process:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - mpdf/mpdf[v7.1.0, ..., v7.1.6] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 -> your php version (7.4.3) does not satisfy that requirement.
    - mpdf/mpdf[v7.1.7, ..., v7.1.9] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your php version (7.4.3) does not satisfy that requirement.
    - Root composer.json requires mpdf/mpdf ^7.1 -> satisfiable by mpdf/mpdf[v7.1.0, ..., v7.1.9].

As indicated one the github of the mpdf project, I should use version 8.0.4 pour php 7.4 but since I use the command from the installation section :
composer create-project eureka2/g6k simulator/ 4.*

which use a reciepe I believe, I don't really know how I can change the depedency version in that case.

Any idea on how I can process the installation with mpdf 8.0.4?

How to request a simulator as a webservice?

Hi,

I have successfully installed the project and import a simulator (as explained here: https://gitlab.com/pidila/sp-simulateurs-data/tree/master)

The simulator seems to works as entended, BUT, I would like to be able to request the simulator as a webservice.

So I try to look in the bundle config and find that there is a route defined for : /{simu}/api

Unfortunatelly when I try to request the route I get an exception :
"Error : API for this simulator is not implemented with code : 0"

When I start searching into the ApiController in order to figure out how I should process to configure an API for my simulator, but I'm a little lost.

Is it functionnal? Can you provide some help on that particular topic?

Buffer issue when publishing after validating via cmd + stream issue

Hello,

after importing the data sources and the simulator, the validation of the simulator via the g6k command took place without error but during the publication, I get a buffer error (no buffer to flush).

I just retested just now and the post seems to be going well but when saving the changes I have the following error:

ErrorException: Warning: file_put_contents (/ var / www / simulator / var / data / simulators / work / cost-certificate-registration.xml): failed to open stream: Permission denied

I have however changed the rights on the file and on the folder but nothing helps.

Thank you in advance for your help !

GET http://simulateur.tdl/calcul/admin not found

Hello! Thank you very for creating this application, it helps me a lot.
I'm just having a little problem.

I can run the program, login, and see the presentation of the demo simulation. But when I click on dashboard, there is nothing.

And in the console, it's written : GET http://simulateur.tdl/calcul/admin not found.

Can you help me please?

Thank you very much

Erreur lors de l'installation

Bonjour, @eureka2
Depuis deux jours j'essaie d'installer le simulateur, mais il n'y a pas moyen. Je me retrouve constamment confrontée à ça :
image
Or, ma version de composer est 2.1.6, ma version de Symfony est 4.25.7, et j'ai vérifié que tous les modules soient activés dans php.ini et dans le tableau d'info phpinfo(). Rien à faire. J'ai toujours le même problème. Il y a-t-il quelque chose que j'ai loupé?
Et étrangement, quand j'essaie d'installer une version plus ancienne du simulateur (3.*) l'installation aboutit.

400 errors with no details in G6K API mode

Hello,

I'm trying to use the G6K simulator as an API, therefore i made the changes inside the g6k.yml file, I imported the simulator definitions files (for the French "simulateur de cout de carte grise") and so on.

when I try the simulator in the graphical interface at this url {{base_url}}/cout-certificat-immatriculation, it works perfectly fine.

However, when it comes to use the API, I have some errors. I configured the g6k.yml file like this :
api: cout-certificat-immatriculation: step: 0 action: calculer
according to the "data" tab of this url : {{base_url}}/admin/simulators/cout-certificat-immatriculation which I think it is good.
(the simulator has 2 steps : step 0 with the button action 'calculer' and the step 1 with the action buttons 'retour' and 'nouveau calcul')
I tried the api with differents request parameters such as :
{{base_url}}/cout-certificat-immatriculation/api?IsCamionnette5Places=2&dateMiseEnCirculation=30%2F12%2F2016&declareVehiculeDemonstration=2&demarche=2&departement=02&energie=ESSENCE&invalidite=2&modificationEnergiePropre=2&puissanceAdministrative=11&receptionCommunautaire=2&step=0&tauxCO2=170&typeVehicule=1

but the response returns a 400 error with no details ("errors":[]) and in the symfony profiler I can see it is a 400 code error.

When I try with less request parameters, such as :

{{base_url}}/cout-certificat-immatriculation/api?IsCamionnette5Places=2&Vehicule_N1_Transport_voyageurs=Non&dateMiseEnCirculation=30%2F12%2F2016&declareVehiculeDemonstration=2&demarche=2&departement=02&energie=ESSENCE&invalidite=2&puissanceAdministrative=11&receptionCommunautaire=2&step=0&tauxCO2=170&typeVehicule=1

The response return a bad result.

I don't understand what is wrong and how could I get a more explicit 400 error ? Do you know what I could have misconfigured ?
I have the feeling the inside g6k.yml I should not have put step: 0,
because it seems like if a step is missing when I get some results, (even if it corresponds to what I can see in the simulator definition graphical interface).

Thanks in advance !

Problem during installation

Hello,
During the installation I have the following error message
"Installing the users of the administration interface
Unable to get database parameters: Unable to read the "eureka2/g6k.env" environment file."

I checked all prerequisites and I'am using composer 1.8.6, php7.1.3 on wamp 3.0.6 on Windows 10.
Can you help me please ?

Installation du simulateur de carte grise

Bonjour à vous,

Je suis en train d'essayer d'installer le simulateur de cartes grises du gouvernement. J'ai pu installé la source de données (fichier json + schéma). Je souhaite désormais importer le simulateur (format xml) et je reçois l'erreur suivante :
image

En vous remerciant pour votre aide

Cordialement,
Alexandre Crisa

Installation help

Hello

After doing the 2 php command, how can i run thé server ?

The command php app/console server:run deosn’t work

No documentation are mentionnied.

Any support ?

Thanks

NGinx

Not sure whether this is still applicable with the latest release, but it took me some time to get set up on NGinx (didn't realize that /admin was routed through /app_admin.php)...

# /etc/nginx/sites-enabled/your-site.com

##########################################
##########################################

##            your-site.com             ##

##########################################
##########################################

##   General server setup in default    ##

##########################################
##########################################

## Apex to WWW ##
## HTTPS ##
server {

  ## Native ##
  # listen 80;
  # listen [::]:80;

  ## Ports ##
  listen 443 ssl;
  listen [::]:443 ssl;

  ## Domain ##
  server_name g6k.your-site.com;

  ## Root ##
  root /var/www/calcul;

  ## Location ##
  rewrite ^/app\.php/?(.*)$ /$1 permanent;

  ## PHP ##
  try_files $uri @rewriteapp;

  ## Admin ##
  location /admin {
    rewrite ^(.*)$ /app_admin.php/$1 last;
  }

  ## Main ##
  location @rewriteapp {
    rewrite ^(.*)$ /app.php/$1 last;
  }

  ## SSL ##
  include /etc/nginx/ssl.conf; # n'est pas necessaire

  ## Certs ##
  #ssl_certificate     /etc/letsencrypt/live/your-site.com/fullchain.pem;
  #ssl_certificate_key /etc/letsencrypt/live/your-site.com/privkey.pem;

  ## Symfony ##
  ## PRODUCTION ENV ##
  location ~ ^/(app|app_admin)\.php(/|$) {
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    # When you are using symlinks to link the document root to the
    # current version of your application, you should pass the real
    # application path instead of the path to the symlink to PHP
    # FPM.
    # Otherwise, PHP's OPcache may not properly detect changes to
    # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
    # for more information).
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param DOCUMENT_ROOT $realpath_root;
    # Prevents URIs that include the front controller. This will 404:
    # http://domain.tld/app.php/some-path
    # Remove the internal directive to allow URIs like this
    internal;
  }

  ## Favicons ##
  location = /favicon.ico {
    access_log     off;
    log_not_found  off;
  }

  # static file 404's aren't logged and expires header is set to maximum age
  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  }

  ## PHP ##
  # return 404 for all other php files not matching the front controller
  # this prevents access to other php files you don't want to be accessible.
  location ~ \.php$ {
    return 404;
  }

  ## DENY ALL . FILES ##
  ## Don't need to use Apache's stuff in NGinx ##
  location ~ /\. {
    deny  all;
  }

  ## STATIC ASSETS ##
  ## Used to store images, CSS/JS etc ##
  location /(bundles|media) {
    access_log off;
    expires 30d;

    try_files $uri @rewriteapp;
  }

  ## LOGS ##
  error_log /var/log/nginx/g6k_error.log;
  access_log /var/log/nginx/g6k_access.log;

}

##########################################
##########################################

Would you want me to add to ReadMe?

Integrate a simulator in Symfony project

Hello, I wanted to know if it was possible to integrate the simulator on a symfony project.

I'm starting a project with symfony 5 and I prefer not to use an API for the moment.
I have read and used the other issues but without success unfortunately.

I take this opportunity to congratulate you for your work!

G6K as REST API

Can anyone help me to use G6K as API REST or just use bootstrap 4.5 instead of bootstrap 3. I want to modify its design or use it on wordpress! Thanks

TTFB too high

I just installed the simulator on my virtual machine and got a slow navigation with a ttfb over 10s,
Please help me if you got a solution for this.

Nothing displayed on the log.
Php version 7.4
opcache enabled
i tried to set the memory limit to -1 but no difference

Thank you !!

API step issue

Hi, me again,

I want to request the simulator API.

In my G6k package yml config file, I added the following lines:

# api configuration
    api:
        cout-certificat-immatriculation:
            step: 3
            action: calculer

In my previous installation (symfony 2 version), I have it running using the setp 3, that's why I used the step 3 here again.

I used postman to test the api, but get the following error:

{
    "links": {
        "self": "https://<my-api-url>/cout-certificat-immatriculation/api?dateMiseEnCirculation=YYYY-MM-DD&demarche=N&departement=NN&energie=N&puissanceAdministrative=N&step=3&tauxCO2=NNN&typeVehicule=N"
    },
    "errors": [
        {
            "status": "422",
            "title": "Unprocessable entity",
            "detail": "Argument 3 passed to App\\G6K\\Controller\\APIController::apiOutput() must be an instance of App\\G6K\\Model\\Step, null given, called in /path/to/sources/src/G6K/Controller/APIController.php on line 147",
            "source": {
                "pointer": "/data/"
            }
        }
    ]
}

Datas has been aninomyzed so you can see the parameters name in case there have changed (N = 1 number).

Any idea what's wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.