arnaudcoquelet / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 0 forks source link

missing column? #867

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
fusionpbx fresh install revision r7879 (trunk from 26 february 2015)

trying to add new destination does just nothing.
1. go to Destinations
2. click "+"
3. fill the only the "Destination" field and click "save"
4. the form returns empty (message about success displayed for some time) but 
no error message

I debugged a bit in php and got the following:
in destination_edit.php at line 378 "//save the destination", the var_dump of
$orm->message 
after the
$orm->save($_POST);

looked like this:
array(4) {
  ["message"]=>
  string(11) "Bad Request"
  ["code"]=>
  string(3) "400"
  ["uuid"]=>
  string(36) "24754010-7fbd-448a-b686-32dfd264d62b"
  ["details"]=>
  array(2) {
    [0]=>
    array(5) {
      ["name"]=>
      string(12) "destinations"
      ["message"]=>
      string(2) "OK"
      ["code"]=>
      string(3) "200"
      ["uuid"]=>
      string(36) "24754010-7fbd-448a-b686-32dfd264d62b"
      ["sql"]=>
      string(379) "INSERT INTO v_destinations (destination_uuid, destination_type, destination_number, destination_context, fax_uuid, destination_cid_name_prefix, destination_accountcode, destination_enabled, destination_description, domain_uuid) VALUES ('24754010-7fbd-448a-b686-32dfd264d62b', 'inbound', '111111', 'public', null, null, null, 'true', null, 'a060445c-6afa-4bf1-9a7b-29a6d82b41f0');"
    }
    [1]=>
    array(4) {
      ["name"]=>
      string(16) "dialplan_details"
      ["message"]=>
      string(95) "SQLSTATE[HY000]: General error: 1 table v_dialplan_details has no column named destination_uuid"
      ["code"]=>
      string(3) "400"
      ["sql"]=>
      string(245) "INSERT INTO v_dialplan_details (destination_uuid, dialplan_detail_uuid, dialplan_detail_type, dialplan_detail_order, dialplan_detail_data) VALUES ('24754010-7fbd-448a-b686-32dfd264d62b', 'bbc52b09-7e8e-489a-8e0c-ce413e8368f6', null, '10', null);"
    }
  }
}

the post request sent:
array(10) {
  ["destination_type"]=>
  string(7) "inbound"
  ["destination_number"]=>
  string(6) "111111"
  ["destination_context"]=>
  string(6) "public"
  ["dialplan_details"]=>
  array(1) {
    [0]=>
    array(3) {
      ["dialplan_detail_type"]=>
      string(0) ""
      ["dialplan_detail_order"]=>
      string(2) "10"
      ["dialplan_detail_data"]=>
      string(0) ""
    }
  }
  ["fax_uuid"]=>
  string(0) ""
  ["destination_cid_name_prefix"]=>
  string(0) ""
  ["destination_accountcode"]=>
  string(0) ""
  ["destination_enabled"]=>
  string(4) "true"
  ["destination_description"]=>
  string(0) ""
  ["domain_uuid"]=>
  string(36) "a060445c-6afa-4bf1-9a7b-29a6d82b41f0"
}

so there seems to be a missing column (sqlite3 output):
sqlite> .schema v_dialplan_details
CREATE TABLE v_dialplan_details (
domain_uuid text,
dialplan_uuid text,
dialplan_detail_uuid text PRIMARY KEY,
dialplan_detail_tag text,
dialplan_detail_type text,
dialplan_detail_data text,
dialplan_detail_break text,
dialplan_detail_inline text,
dialplan_detail_group numeric,
dialplan_detail_order numeric);
sqlite> .schema v_destinations
CREATE TABLE v_destinations (
domain_uuid text,
destination_uuid text PRIMARY KEY,
dialplan_uuid text,
fax_uuid text,
destination_type text,
destination_number text,
destination_caller_id_name text,
destination_caller_id_number text,
destination_cid_name_prefix text,
destination_context text,
destination_app text,
destination_data text,
destination_enabled text,
destination_description text,
destination_accountcode text);

Original issue reported on code.google.com by sp...@spali.ch on 26 Feb 2015 at 12:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r7986.

Original comment by sevenate on 18 Mar 2015 at 7:28

GoogleCodeExporter commented 9 years ago
Resolved with r7986.

Please update and verify.  Thanks.

Original comment by sevenate on 18 Mar 2015 at 7:28