Project:iDEAL Easy | Ubercart Payment
Version:6.x-1.5
Component:Code
Category:bug report
Priority:critical
Assigned:keesje
Status:needs review

Issue Summary

When activating the modules the following errors appear and no table is created in MySQL.

     * warning: Invalid argument supplied for foreach() in /sitedir/includes/common.inc on line 3283.
    * warning: Invalid argument supplied for foreach() in /sitedir/includes/common.inc on line 3204.

on cart/checkout the following appears:
  user warning: Table 'db.uc_payment_ideal_easy' doesn't exist query: SELECT description FROM uc_payment_ideal_easy WHERE order_id = 140 in /.../sites/all/modules/uc_ideal_easy/uc_ideal_easy_payment.module on line 170.

and on /cart/checkout/review

     * user warning: Table 'db.uc_payment_ideal_easy' doesn't exist query: DELETE FROM uc_payment_ideal_easy WHERE order_id = 141 in /.../sites/all/modules/uc_ideal_easy/uc_ideal_easy_payment.module on line 177.
    * user warning: Table 'db.uc_payment_ideal_easy' doesn't exist query: SELECT description FROM uc_payment_ideal_easy WHERE order_id = 141 in /.../sites/all/modules/uc_ideal_easy/uc_ideal_easy_payment.module on line 170.

Using Drupal 6.12 and Ubercart 6.x-2.0-rc6. So all prerequirements are met, right?
Marked as critical as this stands in the way of using the module, please change if this is incorrect.

Comments

#1

Priority:critical» normal
Status:active» needs work

The problem doesn't seem to be specific to the Ideal Easy payment module. My own checkout pane module was experiencing the same problems.

The problems went away when I renamed the table created by the module to be exactly the same as the module name. Apparantly something in my install is bugged.

I 'fixed' this specific problem by doing the same to the ideal easy module on my setup (renaming table to uc_ideal_easy_payment instead of uc_payment_ideal_easy ). I could sent you the fix (a patch would unwieldy I think.)

#2

Status:needs work» postponed (maintainer needs more info)

Thanks for posting.
Please be more specific, is the install hook broken? Did you have old D5 tables converted, having another name perhaps? Is your own module assuming table names have to be the same as module names?

I do not have a D6 project using this module at hand to test this.

#3

It is a fresh D6 / UC2 install. Not upgraded from D5. The problem with installing modules seems to be specific to my site and not related to the Ideal Easy payment module. One of my own modules had similar problems.
I have no idea what is broken (install hook or otherwise), but my workaround (making sure the db table has the same name as the module I'm trying to install) is good enough for now.
I believe the problem lies with my install and not the module, so maybe it is best to close this issue.

I do have some others issues with the module, but I will open another issue for that as it is not directly related to this one.

#4

Title:errors while activating and using module» drupal_install_schema not used correctly
Priority:normal» critical
Status:postponed (maintainer needs more info)» needs review

I have found the problem (and solution.) Both our modules were not supplying drupal_install_schema() with the module name but with the schema name. Same goes for drupal_uninstall_schema().

See http://api.drupal.org/api/function/drupal_install_schema/6 for correct usage.

I have included a patch. It only changes uc_payment_ideal_easy to uc_ideal_easy_payment in forementioned functions. Solves the issue on my installs (tested on 3 servers / drupal+uc setups).

This blocks a succesful install in a fresh D6 install, so I marked it as critical. Attached a patch , so changed status to needs review. Please correct if I'm in error here.

AttachmentSize
patch.ideal_.easy_.v1.6.fix_.install.schema.patch 514 bytes

#5

Assigned to:Anonymous» keesje

Waiting for community review

#6

works for me... no more error message when installing

#7

Got the same 2 errors in common.inc after enabeling the module.
After applying the above patch i get :

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, `transaction_id` NOT NULL, `description` VARCHAR(9) NOT NULL, `ord' at line 2 query: CREATE TABLE uc_payment_ideal_easy ( `order_id` NOT NULL, `transaction_id` NOT NULL, `description` VARCHAR(9) NOT NULL, `order_status` NOT NULL, `return_succes` TEXT NOT NULL, PRIMARY KEY (order_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /www/htdocs/fixedgeb/includes/database.inc on line 529.

Using Drupal 6.14 and Ubercart 6.x-2.2

#8

Just to get started testing this module, i changed uc_ideal_easy_payment.install to get it working.

I have attached it for your info

AttachmentSize
uc_ideal_easy_payment.install.txt 1.47 KB

#9

@whackler, thanks, please notify your results here.

#10

Kees, i changed the install script so after enabling the module the db tables are created.
For testing the module : im still busy with that part as this is my first implementation of iDeal

I will post my results soon

#11

My drupal doesn't create a table at all...

The patch didn't work for me, changing the uc_ideal_easy_payment.install didn't work eather :(

No database is being made...

Is there anybody who can give me a mysql query to install the (uc_ideal_easy_payment) database manually?

#12

deleted (duplicate)

#13

This error occurred on my fresh Drupal 6.20 + uc_ideal 6.x-1.4 install.

I applied the patch and it is NOT working.
No database table is created.

I manually executed this query in phpmyadmin to install the table (not a nice solution of course)

CREATE TABLE uc_payment_ideal_easy (
order_id mediumint(9) NOT NULL,
transaction_id mediumint(9) NOT NULL,
description varchar(64) NOT NULL,
order_status tinyint(4) NOT NULL,
return_succes tinytext NOT NULL,
PRIMARY KEY (order_id))

#14

Version:6.x-1.4» 6.x-1.5

Changed version, because this new (made using git) patch is for the 1.5 version.
Patch fixes the problem with the DB table not being created.
This was due to an incorrect call of drupal_install_schema(), see http://drupal.org/node/323314 for more details.

HOWEVER it does NOT fix the issue with the incorrect use of the schema API, thus it gives rise to SQL errors.
See #567868: "You have an error in your SQL syntax" when installing in D6 for a fix.

AttachmentSize
562230-install-schema-fix-14-D6.patch 548 bytes
nobody click here