When I update my ubercart in /admin/reports/updates/update it goes about doing the update then I update the database and then my site breaks. I then go into my site via FTP and delete the ubercart module then place my backup version of ubercart in the modules directory and then my site doesn't come back on, I get this error

Fatal error: require_once() [function.require]: Failed opening required '/sites/all/modules/ubercart/uc_cart/uc_cart.controller.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/bootstrap.inc on line 3160

CommentFileSizeAuthor
#3 error.png24.29 KBfineartist99
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Are you really using 7.x-3.0-beta3? That's antique. What version are you upgrading from, and what version are you upgrading to?

There are lots of problems that can happen with a Drupal update, saying "my site breaks" isn't very informative and doesn't tell us anything that might help track down your problems. Replacing just the files with an older version is not something that will generally work, as the database needs to be restored as well to be consistent with the code version. You're just going to make things worse unless you find out what caused the original error that you haven't told us about.

fineartist99’s picture

7.x-3.0-beta3 to 7.x-3.6

I've restored the site onto a different part of the server. But I'm hesitant to do an Ubercart upgrade again, like I said. When I do the automatic update in /admin/reports/updates/update it woks just fine. But when I go to do the database update I get that error across the entire site

Fatal error: require_once() [function.require]: Failed opening required '/sites/all/modules/ubercart/uc_cart/uc_cart.controller.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /includes/bootstrap.inc on line 3160

That's all that I would see on my site, see screen shot attached.

fineartist99’s picture

FileSize
24.29 KB
fineartist99’s picture

I will do the update and see what happens. I'll let you know.

fineartist99’s picture

Ok, this time I did not run the database update and I went to clear the cache. My site never cleared the cache, or maybe it did but then my site turns all white again with only this error getting displayed

Fatal error: Call to undefined function entity_views_table_definition() in /home/eeshades/public_html/sites/all/modules/ubercart/uc_order/views/uc_order.views.inc on line 395

I will restore my site and try again and via FTP I'll remove ubercart then clear caches, then upload the newer version of ubercart. If you have any other great ideas let me know, thanks.

fineartist99’s picture

Ok, so I reinstalled my site that had ubercart 7.x-3.0-beta3 and rules 7.x-2.0-beta2

I unchecked all of the ubercart modules in the module listing before removing that module from my server. All was well. I then installed the newest version of ubercart 7.x-3.6, all was fine. Then I went to update my rules module b/c it is old and there is a newer version out - rules 7.x-2.6 and that's what broke my site. Thankfully I exported my database before updating rules and running the database update so I was able to quickly fix my broken site with just pointing my site to the backed up version of the database.

I will move forward. I'm closing this issue.

fineartist99’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
fineartist99’s picture

Status: Closed (won't fix) » Active

UPDATE

I was able to install Ubercart 7.x-3.0-rc4 and get the newest version of rules on my site. I'm not going to use any newer versions of Ubercart, I've wasted enough time trying to get my modules up to date.

Don't know why the newest version of Ubercart would break my site.

longwave’s picture

You should probably upgrade Entity module as well as Rules and Ubercart.

fineartist99’s picture

So I had my site working well, created a new product and added it to cart, went to checkout and boom, an error! Do you know how to get this fixed anyone?

The website encountered an unexpected error. Please try again later.
ERROR MESSAGEPDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'currency' in 'field list': INSERT INTO {uc_orders} (uid, order_status, order_total, primary_email, delivery_first_name, delivery_last_name, delivery_phone, delivery_company, delivery_street1, delivery_street2, delivery_city, delivery_zone, delivery_postal_code, delivery_country, billing_first_name, billing_last_name, billing_phone, billing_company, billing_street1, billing_street2, billing_city, billing_zone, billing_postal_code, billing_country, payment_method, data, created, modified, currency) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20, :db_insert_placeholder_21, :db_insert_placeholder_22, :db_insert_placeholder_23, :db_insert_placeholder_24, :db_insert_placeholder_25, :db_insert_placeholder_26, :db_insert_placeholder_27, :db_insert_placeholder_28); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => in_checkout [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => [:db_insert_placeholder_13] => 840 [:db_insert_placeholder_14] => [:db_insert_placeholder_15] => [:db_insert_placeholder_16] => [:db_insert_placeholder_17] => [:db_insert_placeholder_18] => [:db_insert_placeholder_19] => [:db_insert_placeholder_20] => [:db_insert_placeholder_21] => 0 [:db_insert_placeholder_22] => [:db_insert_placeholder_23] => 840 [:db_insert_placeholder_24] => [:db_insert_placeholder_25] => a:0:{} [:db_insert_placeholder_26] => 1389389165 [:db_insert_placeholder_27] => 1389389165 [:db_insert_placeholder_28] => USD ) in drupal_write_record() (line 7170 of /home/eeshades/public_html/includes/common.inc).

longwave’s picture

You need to run update.php.

TR’s picture

fineartist99: As I said in #1, you're just making things worse by your actions at this point. By upgrading to 7.x-3.6 you made database changes that can't be reversed, but then you replaced the code with an older version. That's just not going to work. You have to figure out what went wrong in the first place and fix that. And what went wrong is almost certainly not a problem with Ubercart ...

So back to my original question. You said "then I update the database and then my site breaks". You still haven't said what the error was at this point that led you to conclude the site was broken. What happened? If the problem was a white screen, that's almost certainly a memory issue or since you were using old versions of helper modules like Rules perhaps you were missing a needed function that's present only in current release - you would have seen either of these problems in your logs.

After that, you said "I then go into my site via FTP and delete the ubercart module then place my backup version of ubercart in the modules directory and then my site doesn't come back on". Well, yeah, that has nothing to do with Ubercart at this point, you can't just change the code to an older version after you've updated your database. That's not how Drupal works.

So for "Failed opening required '/sites/all/modules/ubercart/uc_cart/uc_cart.controller.inc' " the obvious question is, does that file exist on your server? You don't have two copies of Ubercart under sites/all/modules do you? (you can't do that in Drupal, even if you name it something different).

At this point you don't have a choice, you HAVE to use the latest version of Ubercart because you've already changed your database (unless you have a DB backup from before you started). And you have to upgrade to the latest version of all the modules Ubercart depends on, like Entity API and Rules and Views. When you upgrade a site these dependencies are usually the first things you should update. Actually, the first thing you should do is update Drupal core to the latest version.

7.x-3.0-beta3 and 7.x-3.0-rc4 are both really old, and there have been hundreds of improvements and bug fixes since then. Both are pre-release versions, which were known to have problems (which is why we didn't call them final releases), so it's not a good idea to use either of those unsupported versions.

It's unlikely that you've damaged anything or lost any data, but it's also unlikely that your site is going to run properly until you've completed the upgrade process for all your modules.

fineartist99’s picture

I updated all of my contributing modules and am going to backup the site files and database then I will update Ubercart. Although, my site was able to process a test order so maybe I should leave well enough alone. It does work.

Longwave seems to think leaving 7.x-3.0-rc4 installed would be fine no? I'd just hate to to spend another half an hour reinstalling the site again if it breaks when I do the update to Ubercart. And when I say breaks my site I mentioned what exactly happens in #2 and #3 has the screen shot.

So should I update Ubercart or just leave it as is because it's working as it should?

longwave’s picture

I didn't say that; there have been security releases since rc4 so I strongly recommend upgrading to the latest version. You should try a test upgrade on a separate copy of your site somewhere first if possible, and if that goes smoothly you can try it on the real thing.

fineartist99’s picture

Will do, I will let everyone know what happens.

longwave’s picture

Status: Active » Postponed (maintainer needs more info)

Please let us know how you got on.

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further information provided.