I am using Drupal 7.19. i have the following error in sending the gift to others:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mallbar_demo_13.d7_d7_node_gift' doesn't exist: INSERT INTO {{node_gift}} (nid, sid, rid, comment, time_stamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 155 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 41 [:db_insert_placeholder_3] => asfsd [:db_insert_placeholder_4] => 1360031080 ) in nodegift_buy_form_submit() (line 464 of /home/mallbar/www/demo13/sites/all/modules/nodegift/nodegift.module).
Comments
Comment #1
drupalprojects commentedI just tried to make a fresh install of nodegift module on a fresh drupal7 install and it works without any errors. Let me know if you still have any issues.
Thanks!
Comment #2
drupalprojects commentedComment #3
Phase10 commentedI got the same issue. (as the guy over here has, too: https://www.drupal.org/node/2029439)
Problem is, the module is searching for the wrong table. It uses the prefix twice, so it can't find the right one.
(for example d7_d7_node_gift instead of d7_node_gift or in my case DruBey_DruBey_node_gift instead of DruBey_node_gift)
But I don't know where to find the solution.
Comment #4
drupalprojects commentedHmm... Please, check if node_gift table exists in your database. If yes - provide its full name. Also, please, let me know if you have multiple database connections in your settings.php.
Thanks!
Comment #5
Phase10 commentedComment #6
Phase10 commentedHi there!
the node_gift table exists in my database, it is called "DruBeynode_gift".
There is just one database connection in my settings.php,
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'db684712556',
'username' => 'myusername',
'password' => 'mypassword',
'host' => 'myhost',
'port' => '',
'driver' => 'mysql',
'prefix' => 'DruBey',
),
),
);
The "User's gift"-page connects to the right table (DruBeynode_gift), just
when I want to buy a gift, it tries to connect to DruBeyDruBeynode_gift.
Don't know why though.
Thanks for your help! :-)
Comment #7
Phase10 commentedI think I found the solution!
In line 468 of nodegift.module I changed
db_insert("{node_gift}")->fields($fields)->execute();to
db_insert("node_gift")->fields($fields)->execute();It works so far. Though I'm still testing.
Comment #8
Phase10 commentedComment #10
drupalprojects commentedThe issue has been fixed. Thanks all for help.