For this alpha version plus all over versions of Ecommerce back to 4.7, I have never been able to get the modules to create database tables. I will upload them to my server like all other modules, enable in my modules area, run the update script, and then find that none of the databases have been created. They never get created, ever.
They way I have always gotten around this is to do one of two things:
1. Read the .install file and manually enter the database tables by copy/paste the CREATE lines of code. Very time comsuming since EC has like 30 tables when full installed.
2. Use devel.module to "reinstall modules" which flushes and drops database tables and re-creates the tables from scratch. This has usually worked with all the stable releases.
I had thought this was a Safari/Konqueror problem, I guess there is a bug with Safari handling the upload of things that are in CSS hidden fields, but that is not the case. I tried this with Firefox and it behaves the same. Also, I should point out that all other non-ec modules install as they should, all of the database tables created as they should.
Just so you can see whats going on, here are the error messages that I get when I install store.module and navigate to the ec admin area. After I manually install the tables, and enable more EC sub modules, I continue to get more messages along these lines, just referencing different tables:
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT COUNT(txnid) FROM ec_transaction WHERE (allocation = 0 OR workflow = 2) AND workflow IN (1, 2, 3, 0) in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT COUNT(txnid) FROM ec_transaction WHERE allocation = 2 AND workflow IN (1, 2, 3, 0) in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT COUNT(txnid) FROM ec_transaction WHERE allocation = 2 and workflow = 6 in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT COUNT(txnid) FROM ec_transaction WHERE created >= 1188619200 AND allocation = 2 AND workflow = 6 in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT SUM(gross) FROM ec_transaction where created >= 1188619200 AND allocation = 2 AND workflow = 6 in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT COUNT(DISTINCT uid) FROM ec_transaction in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_product' doesn't exist query: SELECT COUNT(nid) FROM ec_product in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
* user warning: Table 'seanjuan_square.ec_transaction' doesn't exist query: SELECT SUM(gross) FROM ec_transaction where created >= 1167627600 AND allocation = 2 AND workflow = 6 in /home/seanjuan/public_html/squarefour/includes/database.mysql.inc on line 172.
I realize there weren't many other requests like this so there must be some specific problem of mine that effects EC module's ability to automatically install tables. I can offere a look into my shared server account so you can see what might be causing this. (I also manage a VPS and have had similar problems.) Maybe in this small way I can help with solving this problem becuase I'm just not a code warrior with the chops to work this out. Otherwise, let me know how I can help!
Sean
Comments
Comment #1
gordon commentedThe only time this happens is when the installation instructions are not followed or trying to install on a system which had a broken installation.
Comment #2
seaneffel commentedGordon, your response is discouraging since I have been seeing this for two years consistenly, and come to expect extra time manually creating databases when I install EC on any drupal build. I had reported on this issue before in other posts.
I follow all module installation steps meticulously, and even on the first install on a clean Drupal installation I have always experienced the same thing. I've also dropped out all of the tables and started from scratch -today- with both the 3 and 4 versions and also experience the same thing - no database tables created.
I'm ruling out that this only happens when installing on top of a broken installation, and I am also ruling out the not following directions possibility, and I'm going to suggest that there is something else at work here. I'd really like to show you what is happening some how so that I can help improve your excellent module and in turn feel better about relying on your module when I need to.
Just so we are on the same page, here are the installation instructions:
********************************************************************
INSTALLATION:
Note: It is assumed that you have Drupal up and running. If you are
having problems, please review the Handbook, especially
http://drupal.org/node/43767. Besides Drupal core and ecommerce itself,
token.module (http://drupal.org/project/token) is also required to be installed
and active.
Preparing for Installation:
---------------------------
Note: Please back up your site and database.
1. Download and install the token module:
http://drupal.org/project/token
2. Download and place the entire ecommerce directory into your desired contrib
modules location: eg. /sites/all/modules/
3. Enable core modules by going to:
> Administer > Site Building > Modules.
With E-Commerce 5, there are the modules are grouped according to function.
The first module to install is Store module. This will install every other
mandatory E-Commerce module.
4. Having installed the main modules, now install the other modules you'd like activated.
You'll at least want to install a product module like Generic, and a payment
module like COD.
5. Drupal 5 introduced a cleaner administration section. You can find E-Commerce
settings in two blocks - Just click on Administer then click on:
E-Commerce -- day to administration of your store.
E-Commerce configuration -- settings for setting up your store.
Individual module settings are also listed there with their descriptions.
6. Grant the proper access to user accounts under:
> Administer > User Management > Access control
7. Create new products via:
> Create content > Product
8. Optionally, enable the cart block via
> Administer > blocks :: Shopping Cart
Comment #3
gordon commentedI am installing e-Commerce over and over again, and I do not get these problems. And I am installing on all types of systems.
Please help me help you. You have not given any information that could help solve this issue for you.
You must not be following the instruction esp. step 3
Comment #4
baloneysammitch commentedHey all, I'm just chiming in saying I'm having this exact same problem. I'm still looking into this but I'll get back to you all when I figure out why.
Comment #5
seaneffel commentedMore information on how I'm installing (from scratch):
I download the EC package for my matching Drupal version, unpack and upload to my site. I'm using an FTP client to do this work since I don't have command line access.
I follow the instructions and install the Store module first, by navigating to the modules layout, enabling, submitting, and like a good guy I run the update script even though I know there are no old EC tables in my database, its just a habit. The updater gives me an error that some tables don't exist, and I check and find that no EC tables were created when I enabled the module. I feel doubt, so I disable and re-enable the store module again and check for existing tables with phpmyadmin. Again, no tables created.
I move on a step further and attempt to enable a few more modules in the EC bundle, like cart and payment and paypal, and after enabling them there are no tables created for ec_* anywhere in my database.
So, because I've had this experience before with the EC modules, I break out my trusty Devel.module which I keep lurking in the background of each Drupal site I build out, and use its "reinstall module" to properly create the tables. I check my database again and find that now, finally, I have about ten or so ec_* tables where they ought to be. I move forward with configuring the settings and everything is finally happy.
If installation were the only issue then I can work around it, but I also have similar problems when upgrading to newer versions of EC, though much less annoying.
I have thought the following things over these last two years working with your module:
1. That this was an issue with my host, but decided no since I have seen it on many shared and at least one VPS before.
2. That there was some permission issue or chmod with the files through uploading them via FTP that prevented something from fireing off to make the tables, but decided no during one test last year where I uploaded and unpacked via commandline, presuming the permissions were preserved from their original state.
3. That this could be a platform problem and some aspect of my Mac based system wasn't working as intended. This is still unanswered, I have had issues with the video module and a few others not playing nicely with my Safari browser. There is a nagging Konqueror issue that Apple has not fixed: http://drupal.org/node/150863
Hopefully this is a better description of my issue, and maybe can contribute to a solution. Let me know how else I can help.
Sean
Comment #6
seaneffel commentedI've just got an email from username two_wheeler that said he tried everything listed on this thread to get his tables to install for EC, and none of my options have worked for him. There is an additional way in which I created the tables, it was manually through phpmyadmin.
I took a look inside each of the module subfolders and found the .install file. Under my matching database type (my case is mysql) I copied the following into phpmyadmin's SQL operation field. This is the first mysql table that should be created by the store module:
And before I submitted, I was sure to delete the { and } from around the table name or else I got errors.
Its a real drag, many of the modules have like 3 or 4 tables each, but this is what one must do when the EC tables do not install automatically. This or attempt again with the Devel.module to "reinstall" the module and tables.
I'm hoping the EC maintainer pays some serious attention to this thread, its seems to be coming out that its not a problem that is isolated to me, nor a user error that could be so common.
Thanks!
Comment #7
(not verified) commented