Error 200 with Server Request

25 views
Skip to first unread message

art...@gmail.com

unread,
Oct 13, 2015, 1:25:24 PM10/13/15
to ZnetDK
I get this error when I save a register in db:


The error say; Server Request: control=proveedorctrl, action=enregister - Error 200
Although this error is showed, the register is correctly inserted in bd.

Thank you very much for your help, I like znetdk, it´s a good project.

Pascal Martinez

unread,
Oct 13, 2015, 4:45:54 PM10/13/15
to ZnetDK
Hello,

Is there an error traced in the engine/log/errors.log file ? If yes, could you post it ?
In addition, could you post the source code of your action 'enregistrer' ?

Regards,

Pascal MARTINEZ

art...@gmail.com

unread,
Oct 16, 2015, 10:59:18 AM10/16/15
to ZnetDK
Hola Pascal, veo que hablas español, por lo que respondo mejor en español.

El engine/log/errors.log no registrar ningún error.

El código actual es el mismo que Znetdk tiene para prueba con Proveedores:
static protected function action_enregistrer() {
    /* Lecture des données de la requête HTTP */
    $request = new \Request();
    $row = $request->getValuesAsMap('id','nom','adresse','code_postal','ville');

    /* Enregistrement des données en Base de données */
    $proveedorDAO = new \app\model\ProveedorDAO();
    $result = $proveedorDAO->store($row);

    /* Réponse retournée au contrôleur de façade */
    $response = new \Response();
    if ($result) {
        $response->setSuccessMessage('Enregistrement',
            'Enregistrement du fournisseur réussi.');
    } else {
        $response->setFailedMessage('Enregistrement',
            "Echec d'enregistrement du fournisseur.");
    }
    return $response;
}

Gracias y saludos.

Pascal Martinez

unread,
Oct 16, 2015, 3:28:41 PM10/16/15
to ZnetDK
Hola,

Your error 'Server request' occurs because your PHP script proveedorctrl.php is not encoded in UTF-8.

It's the same for your PHP script created for the view Proveedores: that's for this reason the accentuated characters are not properly displayed.

I suppose your PHP scripts are currently encoded in ANSI.

To convert your scripts in UTF-8, you can use for example Notepad++ and select in the menu Encoding, the menu item 'Convert to UTF-8 without BOM'.

Let me know, once your scripts will be converted, if your problem is finally solved.

Regards,

Pascal MARTINEZ
Reply all
Reply to author
Forward
0 new messages