I have a new drupal site that I have been building. The last part is to install commerce. I installed the latest dev release and I keep getting these errors when enabling the different modules.

Notice: Undefined index: commerce_line_item in field_info_instances() (line 687 of /home2/mdbbqser/public_html/modules/field/field.info.inc).

Notice: Undefined index: commerce_payment_transaction in field_info_instances() (line 687 of /home2/mdbbqser/public_html/modules/field/field.info.inc).

Notice: Undefined index: commerce_product in field_info_instances() (line 687 of /home2/mdbbqser/public_html/modules/field/field.info.inc).

I tried uninstalling and setting the modules up again abut I keep getting the same errors. What can I do to fix them? I really don't want to start over I have sooooo much time setting up this site.

Help....

Thanks

Comments

rfulcher’s picture

Updated entity api to latest dev....same result

rfulcher’s picture

Updated to todays dev of commerce....

Notice: Undefined index: commerce_payment_transaction in field_info_instances() (line 687 of /home2/mdbbqser/public_html/modules/field/field.info.inc).

rszrama’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Never seen these problems before, so I wonder what other modules you have on the site. The commerce_payment_transaction table is the table for the Payment Transaction entity type Drupal Commerce defines, and it is not fieldable; not sure why that should be causing any notices. Also, be careful updating between dev releases, as you never know when a commit has added an update function.

If you think something went awry in installation, such as a field not being created properly, try first to use the http://drupal.org/project/commerce_repair module to see if it can resolve the issue.

There may in fact be a module conflict, but you're going to have to examine the other modules you have on the site and test them one by one to get to the bottom of it. As of right now, there are no known issues during installation of Commerce on its own.

rfulcher’s picture

Thanks for the information. I will first try the commerce repair. If that does not work then what is the best way to narrow down the module conflict. Would I just disable the modules one by one? There are a lot of modules loaded. I will at least determine if there are some I am not using and get those out of the way first.

Thanks for your help if is very much appreciated....

rfulcher’s picture

I have uninstalled several modules. Also upped the PHP script memory limit to 256. I went to install the commerce module and got this quick flash of an error:

Installing commerce
Error messageWarning: rmdir() [function.rmdir]: No such file or directory in drupal_rmdir() (line 2369 of /home2/mdbbqser/public_html/includes/file.inc).
100%
Completed 1 of 1.

Release and Dev do the same. What is file.inc?

rszrama’s picture

Hmm, it's just a core part of Drupal itself that has file handling functions, nothing to do with Drupal Commerce.

rfulcher’s picture

I have tired everything except for starting over. I have disabled all the modules I can (Don't want to uninstall them). I eventually had to replace the drupal modules & includes directory. Every time I install I get the Notice: Undefined index: commerce_line_item in field_info_instances() (line 687 of /home2/mdbbqser/public_html/modules/field/field.info.inc).

I have tried the released version and the dev version. Is there anything else I can do to not have to recreate the site? I have spent sooooo many hours getting the rest of the site setup.....data entered.....soooo much stuff to have to recreate with another install...

I updated views - adddressfield - ctools - entity - rules all to the latest dev with no change.

I know this has something to do with this site because I have another e-commerce site I am setting up and decided to install commerce first and it worked. What other items can I try to get to the bottom of things....

I can't take another 40 hours to recreate already had to do it once switching form go daddy hosting..... :(

rszrama’s picture

If it's a difference between the two sites, what are the differences? Different modules? Different field types? Anything to go by at all?

robwithhair’s picture

I too have had issues with this error Notice: Undefined index: commerce_payment_transaction in field_info_instances() (line 687 of /home/quickstart/websites/longhairedmusic.com/www/modules/field/field.info.inc).. Commerce repair module didn't help me. I did run out of memory on installation of price module so I'm going to revert my database and try again. Worth noting that I did have 128MB allocated in php.ini. Upped to 512MB just to be on the safe side. Will let you know if this resolves the error.

... Yes that seems to have done it. Although I did have to manually delete the commerce tables and go into the system table and remove any variables I could see associated with the commerce module. Thank goodness for GIT and thank goodness for 'The Definitive Guide To Drupal 7' book for making me learn about git and drush.

I should mention however that I could see it being very difficult for a non programmer to completely remove and re-install commerce should there be an issue with the installation or something. I couldn't find a how-to or better a script or module for it, although I could be wrong. Maybe I'll have a go when I'm finished with my website.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
rszrama’s picture

Thanks for the link, Dave! Totally lost sight of Randy's issue when he pushed it upstream. : )

rfulcher’s picture

Ryan,

The difference between the sites is one was a clean install (only the required modules for commerce were installed). I have had issues with memory and had to bump mine up to 256. I strongly think that was what the issue was since robwithhair ran into the same thing. At times when I would enable a module it would hang the site and I would have to reload the page. Otherwise the site was performing well and acting normally. I still have the site backup and will try and clean out the table again like robwithhair discussed.

Thanks

rfulcher’s picture

robwithhair,

Can I get more info from you on the table that I would have to clear out and delete to fully remove commerce.

Thanks very much and I am so glad to see I did not have an isolated issue (However not suggesting that I am happy you had an issue :) )

robwithhair’s picture

I guess you could try the uninstall from the modules uninstall tag for all the commerce modules which should remove the correct tables but as my commerce install was not playing ball I removed the tables manually.

I BACKED UP THE DATABASE and disabled commerce modules, removed every table with 'commerce' in it's name, including ones starting with field_data and field_revision. Went into the field_config table and removed any records with 'commerce' in them, then went to the system table and removed any records with 'commerce' in them. If on enabling the commerce modules again (with enough memory allocated) you get an error that a table already exists then you've probably missed one so repeat the process. I'm not 100% sure I haven't missed something out as it was a while ago now but that should do the trick.

Like I say, try the uninstall first if the offending module is listed there, it should remove the correct tables and take a backup of the database before you get going. You'll probably have to clear the drupal cache at certain points but I can't remember when I did it, probably lots.

mattsmith3’s picture

rfulcher did you get this fixed? I'm in the same boat right now and I have no idea what to do. I've cleaned out the modules, deleted all the db tables, rebuilt the registry, and used commerce repair and done all in varying combinations too... and basically tried everything I know how to. I've been at this for two evenings now.. probably re installed commerce about 12 times and I can't get it to turn on the sub-modules without kicking all of these insane errors.

mattsmith3’s picture

looks resolved.. should I try upgrading to 7 dev to resolve this issue?

rfulcher’s picture

Mattsmith3

I did figure out what the issue was. It all was related to PHP memory. I was not getting any warning or errors but saw several posts about other modules with the same behavior I was seeing (white screen after module install needing to reload the page, then the errors stated above). I switched my shared hosting over to hostmonster and upped my PHP memory limit to 256M and then started the process of building my site over again. Have not had any issues since you can check out the site www.mdbbqservices.com .

I believe that unless you are really knowledgeable about the internal workings you will not be able to recover from this issue. I know you can manually clean a lot of things out but I don't know how to do that and where all the data resides in the DB.

My suggestion is to find a host that can allow you to raise your PHP memory limit if you are working with Drupal. I have another client that I built a site for a while back and they were fine up until the last month when the decided they wanted to do some multimedia stuff. Their host limited them to 20MB so they could not upload files via Drupal. I had to move them also to hostmonster....

Hope this helps.

kdborg@gmail.com’s picture

Also having this issue. I've cleared out everything that has "commerce" in the database. Verified this by dumping to a file and grep'd for commerce. My PHP limit is 512MB. Dependencies for both stable and dev versions of commerce are met and both get error.

The only things that has worked for me has been to start with a fresh install of Drupal.

kdborg@gmail.com’s picture

What ended up working for me is:
1) Wipe the database clean. I dropped the database and recreated it... after backups of course.
2) Install one module at a time following the dependencies. Memory limit on the server was 128MB.

Now I hope I don't have to do that again.

Other useful(?) information:
1) Using old database and going one module at a time didn't work.
2) Using clean database and going one module or multiple modules at a time did work on a server with 512MB php memory limit.

So, I'm guessing in the database got messed up at some point. But there were no references to 'commerce' in the sql dump and there was a reference to 'commerce_line_item'.

Hopefully it isn't an intermittent bug either. Those are the worst!