⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Errors not appearing



zuratharamon
  • profile picture
  • Member

Posted 29 November 2011 - 08:52 AM

Καλημέρα Γιάννη και συγχαρητήρια για το codeigniter. Μας έχεις σÏŽσει σε κάποια πράγματα που χρειάζονται επανάληψη.
Lets switch to EN so that everybody can understand

I'm facing an issue, whenever there is an error in the SQL query (either when searching or trying to add a record where i'm violating a unique index) then no error message appears in Grocery.
I get the error in Firebug, but not in the interface.

The following response is from the /insert function

<body>
<div id="container">
<h1>A Database Error Occurred</h1>
<p>Error Number: 1062</p><p>Duplicate entry '001' for key 'order_name'</p><p>INSERT INTO `orders` (`order_name`, `order_date`, `supplier_id`, `order_price`, `order_tva`, `order_attachment`) VALUES ('001', '2011-11-16 00:00:00', '1', '100', '100', '')</p><p>Filename: C:\wamp\www\erp_ci\system\database\DB_driver.php</p><p>Line Number: 330</p> </div>
</body>


In the search (from the grid) I get the same behaviour

Any idea how to treat this and show the error message to the users, instead of an endless loading?

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 01 December 2011 - 22:13 PM

[quote name='zuratharamon' timestamp='1322556746' post='66']
Καλημέρα Γιάννη και συγχαρητήρια για το codeigniter. Μας έχεις σÏŽσει σε κάποια πράγματα που χρειάζονται επανάληψη.
Lets switch to EN so that everybody can understand

I'm facing an issue, whenever there is an error in the SQL query (either when searching or trying to add a record where i'm violating a unique index) then no error message appears in Grocery.
I get the error in Firebug, but not in the interface.

The following response is from the /insert function

<body>
<div id="container">
<h1>A Database Error Occurred</h1>
<p>Error Number: 1062</p><p>Duplicate entry '001' for key 'order_name'</p><p>INSERT INTO `orders` (`order_name`, `order_date`, `supplier_id`, `order_price`, `order_tva`, `order_attachment`) VALUES ('001', '2011-11-16 00:00:00', '1', '100', '100', '')</p><p>Filename: C:\wamp\www\erp_ci\system\database\DB_driver.php</p><p>Line Number: 330</p> </div>
</body>


In the search (from the grid) I get the same behaviour

Any idea how to treat this and show the error message to the users, instead of an endless loading?
[/quote]

I know this issue and I have it as a future feature (better errors on failure). A quick tip just to know , in the callbacks you can return false and you will have an error on your page. For now it's only included in insert,update and delete callback. It's a simple error. I also have in mind to have something like debug mode. To give information for the developers of some steps , erros etc.

ΕυχαριστÏŽ για τα καλά σου λÏŒγια και χαίρομαι να βλέπω codeigniterάκιδες στην Ελλάδα γιατί πολύ joomla έχει πέσει και δεν πάμε καλά :P